CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxCustomMetaImage.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 #ifndef CXCUSTOMMETAIMAGE_H_
12 #define CXCUSTOMMETAIMAGE_H_
13 
14 #include "cxResourceExport.h"
15 
16 #include <QString>
17 #include "cxTransform3D.h"
18 #include "cxDefinitions.h"
19 
20 namespace cx
21 {
22 
23 cxResource_EXPORT IMAGE_MODALITY convertToModality(QString modalityString);
24 cxResource_EXPORT IMAGE_SUBTYPE convertToImageSubType(QString imageTypeSubString);
25 
26 typedef boost::shared_ptr<class CustomMetaImage> CustomMetaImagePtr;
27 
35 class cxResource_EXPORT CustomMetaImage
36 {
37 public:
38  static CustomMetaImagePtr create(QString filename) { return CustomMetaImagePtr(new CustomMetaImage(filename)); }
39  explicit CustomMetaImage(QString filename);
40 
41  Transform3D readTransform();
42  void setTransform(const Transform3D M);
43 
44  IMAGE_MODALITY readModality();
45  IMAGE_SUBTYPE readImageType();
46  void setModality(IMAGE_MODALITY value);
47  void setImageType(IMAGE_SUBTYPE value);
48 
49  QString readKey(QString key);
50  void setKey(QString key, QString value);
51 
52 private:
53  QString mFilename;
54 
55  void remove(QStringList* data, QStringList keys);
56  void append(QStringList* data, QString key, QString value);
57 
58 };
59 
60 }
61 
62 #endif /* CXCUSTOMMETAIMAGE_H_ */
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
IMAGE_MODALITY convertToModality(QString modalityString)
boost::shared_ptr< class CustomMetaImage > CustomMetaImagePtr
IMAGE_SUBTYPE convertToImageSubType(QString imageTypeSubString)
utility class for accessing metaheader files.
static CustomMetaImagePtr create(QString filename)
Namespace for all CustusX production code.