Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxMNIReaderWriter.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 CXMNIREADERWRITER_H
13 #define CXMNIREADERWRITER_H
14 
15 #include "org_custusx_core_filemanager_Export.h"
17 #include "cxForwardDeclarations.h"
18 class QColor;
19 class ctkPluginContext;
20 
21 namespace cx
22 {
23 
24 class org_custusx_core_filemanager_EXPORT MNIReaderWriter : public FileReaderWriterImplService
25 
26 {
27 public:
28  MNIReaderWriter(PatientModelServicePtr patientModelService, ViewServicePtr viewService);
29 
30  bool isNull();
31  QString canReadDataType() const;
32  bool canRead(const QString &type, const QString &filename);
33  DataPtr read(const QString &uid, const QString &filename);
34  std::vector<DataPtr> read(const QString &filename);
35  bool readInto(DataPtr data, QString path);
36 
37  QString canWriteDataType() const;
38  bool canWrite(const QString &type, const QString &filename) const;
39  void write(DataPtr data, const QString &filename);
40 
41  void setVolumeUidsRelatedToPointsInMNIPointFile(std::vector<QString> volumeUids);
42 
43 private:
44  QColor getRandomColor();
45  std::vector<QString> dialogForSelectingVolumesForImportedMNITagFile( int number_of_volumes, QString description);
46  bool validateKnownVolumeUids(int numberOfVolumesInFile) const;
47 
48  PatientModelServicePtr mPatientModelServicePrivate;
49  ViewServicePtr mViewService;
50 
51  std::vector<QString> mVolumeUids;
52 };
53 }
54 
55 #endif // CXMNIREADERWRITER_H
boost::shared_ptr< class ViewService > ViewServicePtr
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Namespace for all CustusX production code.