MeVisLab Toolbox Reference
mlDcmDRTIconImageSequenceInterface.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
4//
5// NOTE:
6// This file has been generated automatically by
7// FMEwork/ReleaseMeVis/Configuration/CodeGenerators/dcmtkToMLConverter/convertDcmtkToML.py
8// using the template file
9// FMEwork/ReleaseMeVis/Configuration/CodeGenerators/dcmtkToMLConverter/MLDcmtkAccessoriesNew/templates/DcmSequenceInterface.h
10//
11// Destination project:
12// FMEwork/ReleaseMeVis/Sources/Shared/MLDcmtkAccessoriesNew/DcmSequenceInterfaces
13//
14//----------------------------------------------------------------------------------
16
21//----------------------------------------------------------------------------------
22
23#ifndef __mlDcmDRTIconImageSequenceInterface_H
24#define __mlDcmDRTIconImageSequenceInterface_H
25
26// Local includes
27#include "mlDcmtkAccessories.h"
28
29// Dcmtk includes
30//#include "mlDcmDRTIconImageSequenceInterface.h" //DRTIconImageSequence
31
32
33// ML includes
34#ifndef __mlModuleIncludes_H
35#include "mlModuleIncludes.h"
36#endif
37
39
40// ------------------------------------------------------------------
42// ------------------------------------------------------------------
44{
45 public:
46
48 {
49 public:
50
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
52
54
55 Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
56
57 Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
58
59 virtual ~Item() {}
60
61 DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
62
63 bool isValid() const { return _dcmItem.get() != nullptr; }
64
65
66 // BitsAllocated (0028,0100) vr=US, vm=1, type=1
67 bool getBitsAllocated(MLuint16& parameter) const;
68 std::string getBitsAllocatedTag() const { return "(0028,0100)"; }
69 bool setBitsAllocated(MLuint16 parameter);
70
71 // BitsStored (0028,0101) vr=US, vm=1, type=1
72 bool getBitsStored(MLuint16& parameter) const;
73 std::string getBitsStoredTag() const { return "(0028,0101)"; }
74 bool setBitsStored(MLuint16 parameter);
75
76 // BluePaletteColorLookupTableDescriptor (0028,1103) vr=US_SS, vm=3, type=1C
78 std::string getBluePaletteColorLookupTableDescriptorTag() const { return "(0028,1103)"; }
80
81 // Columns (0028,0011) vr=US, vm=1, type=1
82 bool getColumns(MLuint16& parameter) const;
83 std::string getColumnsTag() const { return "(0028,0011)"; }
84 bool setColumns(MLuint16 parameter);
85
86 // GreenPaletteColorLookupTableDescriptor (0028,1102) vr=US_SS, vm=3, type=1C
88 std::string getGreenPaletteColorLookupTableDescriptorTag() const { return "(0028,1102)"; }
90
91 // HighBit (0028,0102) vr=US, vm=1, type=1
92 bool getHighBit(MLuint16& parameter) const;
93 std::string getHighBitTag() const { return "(0028,0102)"; }
94 bool setHighBit(MLuint16 parameter);
95
96 // ICCProfile (0028,2000) vr=OB, vm=1, type=3
97 bool getICCProfile(int& parameter) const;
98 std::string getICCProfileTag() const { return "(0028,2000)"; }
99 bool setICCProfile(int parameter);
100
101 // LargestImagePixelValue (0028,0107) vr=US_SS, vm=1, type=3
102 bool getLargestImagePixelValue(MLuint16& parameter) const;
103 std::string getLargestImagePixelValueTag() const { return "(0028,0107)"; }
105
106 // PhotometricInterpretation (0028,0004) vr=CS, vm=1, type=1
107 bool getPhotometricInterpretation(std::string& parameter) const;
108 std::string getPhotometricInterpretationTag() const { return "(0028,0004)"; }
109 bool setPhotometricInterpretation(std::string parameter);
110
111 // PixelAspectRatio (0028,0034) vr=IS, vm=2, type=1C
112 bool getPixelAspectRatio(std::string& parameter) const;
113 std::string getPixelAspectRatioTag() const { return "(0028,0034)"; }
114 bool setPixelAspectRatio(std::string parameter);
115
116 // PixelRepresentation (0028,0103) vr=US, vm=1, type=1
117 bool getPixelRepresentation(MLuint16& parameter) const;
118 std::string getPixelRepresentationTag() const { return "(0028,0103)"; }
120
121 // PlanarConfiguration (0028,0006) vr=US, vm=1, type=1C
122 bool getPlanarConfiguration(MLuint16& parameter) const;
123 std::string getPlanarConfigurationTag() const { return "(0028,0006)"; }
125
126 // RedPaletteColorLookupTableDescriptor (0028,1101) vr=US_SS, vm=3, type=1C
128 std::string getRedPaletteColorLookupTableDescriptorTag() const { return "(0028,1101)"; }
130
131 // Rows (0028,0010) vr=US, vm=1, type=1
132 bool getRows(MLuint16& parameter) const;
133 std::string getRowsTag() const { return "(0028,0010)"; }
134 bool setRows(MLuint16 parameter);
135
136 // SamplesPerPixel (0028,0002) vr=US, vm=1, type=1
137 bool getSamplesPerPixel(MLuint16& parameter) const;
138 std::string getSamplesPerPixelTag() const { return "(0028,0002)"; }
140
141 // SmallestImagePixelValue (0028,0106) vr=US_SS, vm=1, type=3
142 bool getSmallestImagePixelValue(MLuint16& parameter) const;
143 std::string getSmallestImagePixelValueTag() const { return "(0028,0106)"; }
145
146
147 private:
148
149 DCMTree::TreePtr _dcmItem;
150
151 };
152
154
156 DcmDRTIconImageSequenceInterface(std::vector<DcmDRTIconImageSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
157
159 for(size_t i=0; i < treePtrSeq.size(); i++)
160 {
162 }
163 }
164
167 // BitsAllocated (0028,0100) vr=US, vm=1, type=1
168 bool getBitsAllocated(unsigned long idx, MLuint16& parameter) const;
170 std::string getBitsAllocatedTag() const { return "(0028,0100)"; }
171 bool setBitsAllocated(unsigned long idx, MLuint16 parameter);
172
173 // BitsStored (0028,0101) vr=US, vm=1, type=1
174 bool getBitsStored(unsigned long idx, MLuint16& parameter) const;
176 std::string getBitsStoredTag() const { return "(0028,0101)"; }
177 bool setBitsStored(unsigned long idx, MLuint16 parameter);
178
179 // BluePaletteColorLookupTableDescriptor (0028,1103) vr=US_SS, vm=3, type=1C
180 bool getBluePaletteColorLookupTableDescriptor(unsigned long idx, MLuint16& parameter) const;
182 std::string getBluePaletteColorLookupTableDescriptorTag() const { return "(0028,1103)"; }
184
185 // Columns (0028,0011) vr=US, vm=1, type=1
186 bool getColumns(unsigned long idx, MLuint16& parameter) const;
187 bool getColumns(DCMTree::TreePtr item, MLuint16& parameter) const;
188 std::string getColumnsTag() const { return "(0028,0011)"; }
189 bool setColumns(unsigned long idx, MLuint16 parameter);
190
191 // GreenPaletteColorLookupTableDescriptor (0028,1102) vr=US_SS, vm=3, type=1C
192 bool getGreenPaletteColorLookupTableDescriptor(unsigned long idx, MLuint16& parameter) const;
194 std::string getGreenPaletteColorLookupTableDescriptorTag() const { return "(0028,1102)"; }
196
197 // HighBit (0028,0102) vr=US, vm=1, type=1
198 bool getHighBit(unsigned long idx, MLuint16& parameter) const;
199 bool getHighBit(DCMTree::TreePtr item, MLuint16& parameter) const;
200 std::string getHighBitTag() const { return "(0028,0102)"; }
201 bool setHighBit(unsigned long idx, MLuint16 parameter);
202
203 // ICCProfile (0028,2000) vr=OB, vm=1, type=3
204 bool getICCProfile(unsigned long idx, int& parameter) const;
205 bool getICCProfile(DCMTree::TreePtr item, int& parameter) const;
206 std::string getICCProfileTag() const { return "(0028,2000)"; }
207 bool setICCProfile(unsigned long idx, int parameter);
208
209 // LargestImagePixelValue (0028,0107) vr=US_SS, vm=1, type=3
210 bool getLargestImagePixelValue(unsigned long idx, MLuint16& parameter) const;
212 std::string getLargestImagePixelValueTag() const { return "(0028,0107)"; }
213 bool setLargestImagePixelValue(unsigned long idx, MLuint16 parameter);
214
215 // PhotometricInterpretation (0028,0004) vr=CS, vm=1, type=1
216 bool getPhotometricInterpretation(unsigned long idx, std::string& parameter) const;
217 bool getPhotometricInterpretation(DCMTree::TreePtr item, std::string& parameter) const;
218 std::string getPhotometricInterpretationTag() const { return "(0028,0004)"; }
219 bool setPhotometricInterpretation(unsigned long idx, std::string parameter);
220
221 // PixelAspectRatio (0028,0034) vr=IS, vm=2, type=1C
222 bool getPixelAspectRatio(unsigned long idx, std::string& parameter) const;
223 bool getPixelAspectRatio(DCMTree::TreePtr item, std::string& parameter) const;
224 std::string getPixelAspectRatioTag() const { return "(0028,0034)"; }
225 bool setPixelAspectRatio(unsigned long idx, std::string parameter);
226
227 // PixelRepresentation (0028,0103) vr=US, vm=1, type=1
228 bool getPixelRepresentation(unsigned long idx, MLuint16& parameter) const;
230 std::string getPixelRepresentationTag() const { return "(0028,0103)"; }
231 bool setPixelRepresentation(unsigned long idx, MLuint16 parameter);
232
233 // PlanarConfiguration (0028,0006) vr=US, vm=1, type=1C
234 bool getPlanarConfiguration(unsigned long idx, MLuint16& parameter) const;
236 std::string getPlanarConfigurationTag() const { return "(0028,0006)"; }
237 bool setPlanarConfiguration(unsigned long idx, MLuint16 parameter);
238
239 // RedPaletteColorLookupTableDescriptor (0028,1101) vr=US_SS, vm=3, type=1C
240 bool getRedPaletteColorLookupTableDescriptor(unsigned long idx, MLuint16& parameter) const;
242 std::string getRedPaletteColorLookupTableDescriptorTag() const { return "(0028,1101)"; }
244
245 // Rows (0028,0010) vr=US, vm=1, type=1
246 bool getRows(unsigned long idx, MLuint16& parameter) const;
247 bool getRows(DCMTree::TreePtr item, MLuint16& parameter) const;
248 std::string getRowsTag() const { return "(0028,0010)"; }
249 bool setRows(unsigned long idx, MLuint16 parameter);
250
251 // SamplesPerPixel (0028,0002) vr=US, vm=1, type=1
252 bool getSamplesPerPixel(unsigned long idx, MLuint16& parameter) const;
254 std::string getSamplesPerPixelTag() const { return "(0028,0002)"; }
255 bool setSamplesPerPixel(unsigned long idx, MLuint16 parameter);
256
257 // SmallestImagePixelValue (0028,0106) vr=US_SS, vm=1, type=3
258 bool getSmallestImagePixelValue(unsigned long idx, MLuint16& parameter) const;
260 std::string getSmallestImagePixelValueTag() const { return "(0028,0106)"; }
261 bool setSmallestImagePixelValue(unsigned long idx, MLuint16 parameter);
262
263
266 void setSequence(std::vector<DcmDRTIconImageSequenceInterface::Item> dcmSequence) {
267 _itemVec = dcmSequence;
268 }
269
272 std::vector<DcmDRTIconImageSequenceInterface::Item> getSequence() const {
273 return _itemVec;
274 }
275
278 bool hasSequence() const {
279 return (_itemVec.size() != 0);
280 }
281
285 return static_cast<MLint>(_itemVec.size());
286 }
287
291 if (_itemVec.size() > idx) {
292 return _itemVec[idx];
293 }
295 }
296
300 _itemVec.push_back(DcmDRTIconImageSequenceInterface::Item());
301 return _itemVec[_itemVec.size()-1];
302 }
303
305 _itemVec.push_back(newItem);
306 }
307
310 bool insertItem(const size_t idx) {
311 if (_itemVec.size() > idx) {
312 std::vector<DcmDRTIconImageSequenceInterface::Item>::iterator it = _itemVec.begin();
313 std::advance(it, idx);
314 _itemVec.insert(it, DcmDRTIconImageSequenceInterface::Item());
315 return true;
316 }
317 return false;
318 }
319
322 bool removeItem(const size_t idx) {
323 if ( _itemVec.size() > idx ) {
324 std::vector<DcmDRTIconImageSequenceInterface::Item>::iterator it = _itemVec.begin();
325 std::advance(it, idx);
326 _itemVec.erase(it);
327 return true;
328 }
329 return false;
330 }
331
332 protected:
334 std::vector<DcmDRTIconImageSequenceInterface::Item> _itemVec;
335};
336
338
339#endif // __mlDcmDRTIconImageSequenceInterface_H
340
341/* MeVis-Hidden-Components-Start */
342/* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getBitsAllocated(MLuint16 &parameter) const
bool setPixelRepresentation(MLuint16 parameter)
bool getSamplesPerPixel(MLuint16 &parameter) const
bool getPlanarConfiguration(MLuint16 &parameter) const
bool getRows(MLuint16 &parameter) const
bool getRedPaletteColorLookupTableDescriptor(MLuint16 &parameter) const
bool getPhotometricInterpretation(std::string &parameter) const
bool setLargestImagePixelValue(MLuint16 parameter)
bool setRedPaletteColorLookupTableDescriptor(MLuint16 parameter)
bool getColumns(MLuint16 &parameter) const
bool getLargestImagePixelValue(MLuint16 &parameter) const
bool setPixelAspectRatio(std::string parameter)
bool setSamplesPerPixel(MLuint16 parameter)
bool setBitsAllocated(MLuint16 parameter)
bool setSmallestImagePixelValue(MLuint16 parameter)
bool setBluePaletteColorLookupTableDescriptor(MLuint16 parameter)
bool getICCProfile(int &parameter) const
bool getBluePaletteColorLookupTableDescriptor(MLuint16 &parameter) const
bool getPixelRepresentation(MLuint16 &parameter) const
bool setGreenPaletteColorLookupTableDescriptor(MLuint16 parameter)
bool getBitsStored(MLuint16 &parameter) const
bool getSmallestImagePixelValue(MLuint16 &parameter) const
bool setPlanarConfiguration(MLuint16 parameter)
bool getGreenPaletteColorLookupTableDescriptor(MLuint16 &parameter) const
bool getHighBit(MLuint16 &parameter) const
bool setPhotometricInterpretation(std::string parameter)
bool setBitsStored(MLuint16 parameter)
bool getPixelAspectRatio(std::string &parameter) const
Class to provide access to DRTIconImageSequence.
bool setBitsAllocated(unsigned long idx, MLuint16 parameter)
bool setBluePaletteColorLookupTableDescriptor(unsigned long idx, MLuint16 parameter)
bool getGreenPaletteColorLookupTableDescriptor(unsigned long idx, MLuint16 &parameter) const
bool getPhotometricInterpretation(unsigned long idx, std::string &parameter) const
bool getPlanarConfiguration(unsigned long idx, MLuint16 &parameter) const
bool getBitsAllocated(unsigned long idx, MLuint16 &parameter) const
bool setColumns(unsigned long idx, MLuint16 parameter)
bool setPlanarConfiguration(unsigned long idx, MLuint16 parameter)
bool setRows(unsigned long idx, MLuint16 parameter)
bool getPixelAspectRatio(DCMTree::TreePtr item, std::string &parameter) const
bool setPixelRepresentation(unsigned long idx, MLuint16 parameter)
bool setICCProfile(unsigned long idx, int parameter)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setGreenPaletteColorLookupTableDescriptor(unsigned long idx, MLuint16 parameter)
bool getRows(DCMTree::TreePtr item, MLuint16 &parameter) const
bool setSmallestImagePixelValue(unsigned long idx, MLuint16 parameter)
DcmDRTIconImageSequenceInterface::Item & addItem()
Adds a new item to the sequence.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getHighBit(unsigned long idx, MLuint16 &parameter) const
bool getBluePaletteColorLookupTableDescriptor(DCMTree::TreePtr item, MLuint16 &parameter) const
bool getPixelRepresentation(unsigned long idx, MLuint16 &parameter) const
bool getColumns(DCMTree::TreePtr item, MLuint16 &parameter) const
bool getICCProfile(unsigned long idx, int &parameter) const
void setSequence(std::vector< DcmDRTIconImageSequenceInterface::Item > dcmSequence)
Set the DRTIconImageSequence this interface class provides access to.
bool setPixelAspectRatio(unsigned long idx, std::string parameter)
bool getColumns(unsigned long idx, MLuint16 &parameter) const
bool getICCProfile(DCMTree::TreePtr item, int &parameter) const
void addItem(DcmDRTIconImageSequenceInterface::Item newItem)
bool getLargestImagePixelValue(unsigned long idx, MLuint16 &parameter) const
bool getRows(unsigned long idx, MLuint16 &parameter) const
virtual ~DcmDRTIconImageSequenceInterface()
Default virtual Destructor.
bool getLargestImagePixelValue(DCMTree::TreePtr item, MLuint16 &parameter) const
bool setSamplesPerPixel(unsigned long idx, MLuint16 parameter)
bool setBitsStored(unsigned long idx, MLuint16 parameter)
bool getBluePaletteColorLookupTableDescriptor(unsigned long idx, MLuint16 &parameter) const
bool setHighBit(unsigned long idx, MLuint16 parameter)
bool getPixelRepresentation(DCMTree::TreePtr item, MLuint16 &parameter) const
bool getGreenPaletteColorLookupTableDescriptor(DCMTree::TreePtr item, MLuint16 &parameter) const
bool setPhotometricInterpretation(unsigned long idx, std::string parameter)
DcmDRTIconImageSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getSamplesPerPixel(DCMTree::TreePtr item, MLuint16 &parameter) const
bool getRedPaletteColorLookupTableDescriptor(DCMTree::TreePtr item, MLuint16 &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
DcmDRTIconImageSequenceInterface(std::vector< DcmDRTIconImageSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getRedPaletteColorLookupTableDescriptor(unsigned long idx, MLuint16 &parameter) const
bool getPhotometricInterpretation(DCMTree::TreePtr item, std::string &parameter) const
bool getBitsStored(unsigned long idx, MLuint16 &parameter) const
bool getHighBit(DCMTree::TreePtr item, MLuint16 &parameter) const
bool getPixelAspectRatio(unsigned long idx, std::string &parameter) const
bool getSmallestImagePixelValue(unsigned long idx, MLuint16 &parameter) const
bool setRedPaletteColorLookupTableDescriptor(unsigned long idx, MLuint16 parameter)
bool getBitsAllocated(DCMTree::TreePtr item, MLuint16 &parameter) const
DcmDRTIconImageSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool setLargestImagePixelValue(unsigned long idx, MLuint16 parameter)
std::vector< DcmDRTIconImageSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getSamplesPerPixel(unsigned long idx, MLuint16 &parameter) const
bool getPlanarConfiguration(DCMTree::TreePtr item, MLuint16 &parameter) const
std::vector< DcmDRTIconImageSequenceInterface::Item > getSequence() const
Return the DRTIconImageSequence this interface class provides access to.
bool getSmallestImagePixelValue(DCMTree::TreePtr item, MLuint16 &parameter) const
bool hasSequence() const
Check if the DRTIconImageSequence is set.
bool getBitsStored(DCMTree::TreePtr item, MLuint16 &parameter) const
Class collecting some DICOM helper functionality explicitly for dcmtk.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
unsigned short MLuint16
Definition mlTypeDefs.h:142
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition mlTypeDefs.h:490
std::vector< TreePtr > TreePtrVector
a vector of TreePtr - used for sequences
Definition DCMTree_Lib.h:85
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition DCMTree_Lib.h:72