CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxCgeoReaderWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXCGEOREADERWRITER_H
13 #define CXCGEOREADERWRITER_H
14 
15 #include "org_custusx_ceetron_Export.h"
17 
18 namespace cx
19 {
27 class org_custusx_ceetron_EXPORT CgeoReaderWriter : public FileReaderWriterImplService
28 {
29 public:
30  Q_INTERFACES(cx::FileReaderWriterService)
31 
32  CgeoReaderWriter(PatientModelServicePtr patientModelService);
33 
34  bool isNull();
35 
36  bool canRead(const QString &type, const QString &filename);
37  std::vector<DataPtr> read(const QString &filename);
38  DataPtr read(const QString &uid, const QString &filename);
39  QString canReadDataType() const;
40  bool readInto(DataPtr data, QString path);
41 
42  QString canWriteDataType() const;
43  bool canWrite(const QString &type, const QString &filename) const;
44  void write(DataPtr data, const QString &filename);
45  QByteArray convertToQByteArray(DataPtr data);
46 private:
47  void writeToStream(DataPtr data, QDataStream &out);
48 };
49 
50 }
51 #endif // CXCGEOREADERWRITER_H
Write triangular mesh to .cgeo format for Ceetron.
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Namespace for all CustusX production code.