MeVisLab Toolbox Reference
mlDcmDRTApplicationSetupSequenceInterface.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 __mlDcmDRTApplicationSetupSequenceInterface_H
24 #define __mlDcmDRTApplicationSetupSequenceInterface_H
25 
26 // Local includes
27 #include "mlDcmtkAccessories.h"
28 
29 // Dcmtk includes
30 //#include "mlDcmDRTApplicationSetupSequenceInterface.h" //DRTApplicationSetupSequence
31 #include "mlDcmDRTBrachyAccessoryDeviceSequenceInterface.h" //DRTBrachyAccessoryDeviceSequence
32 #include "mlDcmDRTChannelSequenceInterface.h" //DRTChannelSequence
33 #include "mlDcmDRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModuleInterface.h" //DRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModule
34 
35 
36 // ML includes
37 #ifndef __mlModuleIncludes_H
38 #include "mlModuleIncludes.h"
39 #endif
40 
41 ML_START_NAMESPACE
42 
43 // ------------------------------------------------------------------
45 // ------------------------------------------------------------------
47 {
48  public:
49 
51  {
52  public:
53 
54  Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
55 
56  Item(DCMTree::TreePtr dcmItem) : _dcmItem(dcmItem) {}
57 
58  Item(const Item &copyDcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
59 
60  Item &operator=(const Item &copyDcmItem){ _dcmItem = copyDcmItem.getTreePtr(); return *this; }
61 
62  virtual ~Item() {}
63 
64  DCMTree::TreePtr getTreePtr() const { return _dcmItem; }
65 
66  bool isValid() const { return _dcmItem.get() != nullptr; }
67 
68 
69  // ApplicationSetupManufacturer (300a,0238) vr=LO, vm=1, type=3
70  bool getApplicationSetupManufacturer(std::string& parameter) const;
71  std::string getApplicationSetupManufacturerTag() const { return "(300a,0238)"; }
72  bool setApplicationSetupManufacturer(std::string parameter);
73 
74  // ApplicationSetupName (300a,0236) vr=LO, vm=1, type=3
75  bool getApplicationSetupName(std::string& parameter) const;
76  std::string getApplicationSetupNameTag() const { return "(300a,0236)"; }
77  bool setApplicationSetupName(std::string parameter);
78 
79  // ApplicationSetupNumber (300a,0234) vr=IS, vm=1, type=1
80  bool getApplicationSetupNumber(std::string& parameter) const;
81  std::string getApplicationSetupNumberTag() const { return "(300a,0234)"; }
82  bool setApplicationSetupNumber(std::string parameter);
83 
84  // ApplicationSetupType (300a,0232) vr=CS, vm=1, type=1
85  bool getApplicationSetupType(std::string& parameter) const;
86  std::string getApplicationSetupTypeTag() const { return "(300a,0232)"; }
87  bool setApplicationSetupType(std::string parameter);
88 
89  // TemplateName (300a,0244) vr=LO, vm=1, type=3
90  bool getTemplateName(std::string& parameter) const;
91  std::string getTemplateNameTag() const { return "(300a,0244)"; }
92  bool setTemplateName(std::string parameter);
93 
94  // TemplateNumber (300a,0240) vr=IS, vm=1, type=3
95  bool getTemplateNumber(std::string& parameter) const;
96  std::string getTemplateNumberTag() const { return "(300a,0240)"; }
97  bool setTemplateNumber(std::string parameter);
98 
99  // TemplateType (300a,0242) vr=SH, vm=1, type=3
100  bool getTemplateType(std::string& parameter) const;
101  std::string getTemplateTypeTag() const { return "(300a,0242)"; }
102  bool setTemplateType(std::string parameter);
103 
104  // TotalReferenceAirKerma (300a,0250) vr=DS, vm=1, type=1
105  bool getTotalReferenceAirKerma(std::string& parameter) const;
106  std::string getTotalReferenceAirKermaTag() const { return "(300a,0250)"; }
107  bool setTotalReferenceAirKerma(std::string parameter);
108 
109  // BrachyAccessoryDeviceSequence (300a,0260) vr=SQ, vm=1, type=3
111  std::string getBrachyAccessoryDeviceSequenceTag() const { return std::string("(300a,0260)"); }
113 
114  // ChannelSequence (300a,0280) vr=SQ, vm=1, type=1
116  std::string getChannelSequenceTag() const { return std::string("(300a,0280)"); }
118 
119  // ReferencedReferenceImageSequence (300c,0042) vr=SQ, vm=1, type=3
121  std::string getReferencedReferenceImageSequenceTag() const { return std::string("(300c,0042)"); }
123 
124 
125  private:
126 
127  DCMTree::TreePtr _dcmItem;
128 
129  };
130 
132 
134  DcmDRTApplicationSetupSequenceInterface(std::vector<DcmDRTApplicationSetupSequenceInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
135 
137  for(size_t i=0; i < treePtrSeq.size(); i++)
138  {
139  _itemVec.push_back(DcmDRTApplicationSetupSequenceInterface::Item(treePtrSeq[i]));
140  }
141  }
142 
145  // ApplicationSetupManufacturer (300a,0238) vr=LO, vm=1, type=3
146  bool getApplicationSetupManufacturer(unsigned long idx, std::string& parameter) const;
147  bool getApplicationSetupManufacturer(DCMTree::TreePtr item, std::string& parameter) const;
148  std::string getApplicationSetupManufacturerTag() const { return "(300a,0238)"; }
149  bool setApplicationSetupManufacturer(unsigned long idx, std::string parameter);
150 
151  // ApplicationSetupName (300a,0236) vr=LO, vm=1, type=3
152  bool getApplicationSetupName(unsigned long idx, std::string& parameter) const;
153  bool getApplicationSetupName(DCMTree::TreePtr item, std::string& parameter) const;
154  std::string getApplicationSetupNameTag() const { return "(300a,0236)"; }
155  bool setApplicationSetupName(unsigned long idx, std::string parameter);
156 
157  // ApplicationSetupNumber (300a,0234) vr=IS, vm=1, type=1
158  bool getApplicationSetupNumber(unsigned long idx, std::string& parameter) const;
159  bool getApplicationSetupNumber(DCMTree::TreePtr item, std::string& parameter) const;
160  std::string getApplicationSetupNumberTag() const { return "(300a,0234)"; }
161  bool setApplicationSetupNumber(unsigned long idx, std::string parameter);
162 
163  // ApplicationSetupType (300a,0232) vr=CS, vm=1, type=1
164  bool getApplicationSetupType(unsigned long idx, std::string& parameter) const;
165  bool getApplicationSetupType(DCMTree::TreePtr item, std::string& parameter) const;
166  std::string getApplicationSetupTypeTag() const { return "(300a,0232)"; }
167  bool setApplicationSetupType(unsigned long idx, std::string parameter);
168 
169  // TemplateName (300a,0244) vr=LO, vm=1, type=3
170  bool getTemplateName(unsigned long idx, std::string& parameter) const;
171  bool getTemplateName(DCMTree::TreePtr item, std::string& parameter) const;
172  std::string getTemplateNameTag() const { return "(300a,0244)"; }
173  bool setTemplateName(unsigned long idx, std::string parameter);
174 
175  // TemplateNumber (300a,0240) vr=IS, vm=1, type=3
176  bool getTemplateNumber(unsigned long idx, std::string& parameter) const;
177  bool getTemplateNumber(DCMTree::TreePtr item, std::string& parameter) const;
178  std::string getTemplateNumberTag() const { return "(300a,0240)"; }
179  bool setTemplateNumber(unsigned long idx, std::string parameter);
180 
181  // TemplateType (300a,0242) vr=SH, vm=1, type=3
182  bool getTemplateType(unsigned long idx, std::string& parameter) const;
183  bool getTemplateType(DCMTree::TreePtr item, std::string& parameter) const;
184  std::string getTemplateTypeTag() const { return "(300a,0242)"; }
185  bool setTemplateType(unsigned long idx, std::string parameter);
186 
187  // TotalReferenceAirKerma (300a,0250) vr=DS, vm=1, type=1
188  bool getTotalReferenceAirKerma(unsigned long idx, std::string& parameter) const;
189  bool getTotalReferenceAirKerma(DCMTree::TreePtr item, std::string& parameter) const;
190  std::string getTotalReferenceAirKermaTag() const { return "(300a,0250)"; }
191  bool setTotalReferenceAirKerma(unsigned long idx, std::string parameter);
192 
193  // BrachyAccessoryDeviceSequence (300a,0260) vr=SQ, vm=1, type=3
195  std::string getBrachyAccessoryDeviceSequenceTag() const { return std::string("(300a,0260)"); }
197 
198  // ChannelSequence (300a,0280) vr=SQ, vm=1, type=1
200  std::string getChannelSequenceTag() const { return std::string("(300a,0280)"); }
202 
203  // ReferencedReferenceImageSequence (300c,0042) vr=SQ, vm=1, type=3
205  std::string getReferencedReferenceImageSequenceTag() const { return std::string("(300c,0042)"); }
207 
208 
211  void setSequence(std::vector<DcmDRTApplicationSetupSequenceInterface::Item> dcmSequence) {
212  _itemVec = dcmSequence;
213  }
214 
217  std::vector<DcmDRTApplicationSetupSequenceInterface::Item> getSequence() const {
218  return _itemVec;
219  }
220 
223  bool hasSequence() const {
224  return (_itemVec.size() != 0);
225  }
226 
230  return static_cast<MLint>(_itemVec.size());
231  }
232 
236  if (_itemVec.size() > idx) {
237  return _itemVec[idx];
238  }
240  }
241 
245  _itemVec.push_back(DcmDRTApplicationSetupSequenceInterface::Item());
246  return _itemVec[_itemVec.size()-1];
247  }
248 
250  _itemVec.push_back(newItem);
251  }
252 
255  bool insertItem(const size_t idx) {
256  if (_itemVec.size() > idx) {
257  std::vector<DcmDRTApplicationSetupSequenceInterface::Item>::iterator it = _itemVec.begin();
258  std::advance(it, idx);
259  _itemVec.insert(it, DcmDRTApplicationSetupSequenceInterface::Item());
260  return true;
261  }
262  return false;
263  }
264 
267  bool removeItem(const size_t idx) {
268  if ( _itemVec.size() > idx ) {
269  std::vector<DcmDRTApplicationSetupSequenceInterface::Item>::iterator it = _itemVec.begin();
270  std::advance(it, idx);
271  _itemVec.erase(it);
272  return true;
273  }
274  return false;
275  }
276 
277  protected:
279  std::vector<DcmDRTApplicationSetupSequenceInterface::Item> _itemVec;
280 };
281 
282 ML_END_NAMESPACE
283 
284 #endif // __mlDcmDRTApplicationSetupSequenceInterface_H
285 
286 /* MeVis-Hidden-Components-Start */
287 /* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
bool getApplicationSetupNumber(std::string &parameter) const
bool getTemplateNumber(std::string &parameter) const
bool setApplicationSetupNumber(std::string parameter)
bool getApplicationSetupType(std::string &parameter) const
DcmDRTBrachyAccessoryDeviceSequenceInterface getBrachyAccessoryDeviceSequence() const
void setChannelSequence(DcmDRTChannelSequenceInterface seq)
bool getApplicationSetupManufacturer(std::string &parameter) const
bool getApplicationSetupName(std::string &parameter) const
bool setApplicationSetupName(std::string parameter)
DcmDRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModuleInterface getReferencedReferenceImageSequence() const
void setBrachyAccessoryDeviceSequence(DcmDRTBrachyAccessoryDeviceSequenceInterface seq)
bool setApplicationSetupType(std::string parameter)
bool setApplicationSetupManufacturer(std::string parameter)
bool getTemplateName(std::string &parameter) const
DcmDRTChannelSequenceInterface getChannelSequence() const
bool getTotalReferenceAirKerma(std::string &parameter) const
void setReferencedReferenceImageSequence(DcmDRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModuleInterface seq)
bool getTemplateType(std::string &parameter) const
bool setTotalReferenceAirKerma(std::string parameter)
Class to provide access to DRTApplicationSetupSequence.
DcmDRTChannelSequenceInterface getChannelSequence(unsigned long idx) const
std::vector< DcmDRTApplicationSetupSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
DcmDRTApplicationSetupSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
DcmDRTBrachyAccessoryDeviceSequenceInterface getBrachyAccessoryDeviceSequence(unsigned long idx) const
bool getApplicationSetupType(unsigned long idx, std::string &parameter) const
void setReferencedReferenceImageSequence(DcmDRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModuleInterface seq, unsigned long idx)
bool getTemplateName(DCMTree::TreePtr item, std::string &parameter) const
bool getApplicationSetupName(DCMTree::TreePtr item, std::string &parameter) const
bool getTemplateType(unsigned long idx, std::string &parameter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool setApplicationSetupNumber(unsigned long idx, std::string parameter)
bool setApplicationSetupName(unsigned long idx, std::string parameter)
bool getApplicationSetupName(unsigned long idx, std::string &parameter) const
void addItem(DcmDRTApplicationSetupSequenceInterface::Item newItem)
bool getTemplateNumber(unsigned long idx, std::string &parameter) const
void setBrachyAccessoryDeviceSequence(DcmDRTBrachyAccessoryDeviceSequenceInterface seq, unsigned long idx)
DcmDRTApplicationSetupSequenceInterface(std::vector< DcmDRTApplicationSetupSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getApplicationSetupNumber(unsigned long idx, std::string &parameter) const
bool getApplicationSetupNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getApplicationSetupManufacturer(unsigned long idx, std::string &parameter) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
DcmDRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModuleInterface getReferencedReferenceImageSequence(unsigned long idx) const
bool getTotalReferenceAirKerma(unsigned long idx, std::string &parameter) const
bool setTemplateType(unsigned long idx, std::string parameter)
bool getApplicationSetupManufacturer(DCMTree::TreePtr item, std::string &parameter) const
bool setTotalReferenceAirKerma(unsigned long idx, std::string parameter)
bool setTemplateNumber(unsigned long idx, std::string parameter)
bool setTemplateName(unsigned long idx, std::string parameter)
bool setApplicationSetupManufacturer(unsigned long idx, std::string parameter)
void setChannelSequence(DcmDRTChannelSequenceInterface seq, unsigned long idx)
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getTemplateType(DCMTree::TreePtr item, std::string &parameter) const
virtual ~DcmDRTApplicationSetupSequenceInterface()
Default virtual Destructor.
DcmDRTApplicationSetupSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getApplicationSetupType(DCMTree::TreePtr item, std::string &parameter) const
bool setApplicationSetupType(unsigned long idx, std::string parameter)
std::vector< DcmDRTApplicationSetupSequenceInterface::Item > getSequence() const
Return the DRTApplicationSetupSequence this interface class provides access to.
bool getTemplateNumber(DCMTree::TreePtr item, std::string &parameter) const
bool getTemplateName(unsigned long idx, std::string &parameter) const
bool hasSequence() const
Check if the DRTApplicationSetupSequence is set.
bool getTotalReferenceAirKerma(DCMTree::TreePtr item, std::string &parameter) const
void setSequence(std::vector< DcmDRTApplicationSetupSequenceInterface::Item > dcmSequence)
Set the DRTApplicationSetupSequence this interface class provides access to.
Class to provide access to DRTBrachyAccessoryDeviceSequence.
Class to provide access to DRTChannelSequence.
Class to provide access to DRTBrachyAccessoryDeviceSequence.
Class to provide access to DRTChannelSequence.
Class to provide access to DRTReferencedReferenceImageSequenceInRTBrachyApplicationSetupsModule.
Class collecting some DICOM helper functionality explicitly for dcmtk.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:578
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:70