MeVisLab Toolbox Reference
mlDcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface.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 __mlDcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface_H
24 #define __mlDcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface_H
25 
26 // Local includes
27 #include "mlDcmtkAccessories.h"
28 
29 // Dcmtk includes
30 //#include "mlDcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface.h" //DRTTreatmentMachineSequenceInRTTreatmentMachineRecordModule
31 
32 
33 // ML includes
34 #ifndef __mlModuleIncludes_H
35 #include "mlModuleIncludes.h"
36 #endif
37 
38 ML_START_NAMESPACE
39 
40 // ------------------------------------------------------------------
42 // ------------------------------------------------------------------
44 {
45  public:
46 
48  {
49  public:
50 
51  Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
52 
53  Item(DCMTree::TreePtr dcmItem) : _dcmItem(dcmItem) {}
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  // DeviceSerialNumber (0018,1000) vr=LO, vm=1, type=2
67  bool getDeviceSerialNumber(std::string& parameter) const;
68  std::string getDeviceSerialNumberTag() const { return "(0018,1000)"; }
69  bool setDeviceSerialNumber(std::string parameter);
70 
71  // InstitutionAddress (0008,0081) vr=ST, vm=1, type=3
72  bool getInstitutionAddress(std::string& parameter) const;
73  std::string getInstitutionAddressTag() const { return "(0008,0081)"; }
74  bool setInstitutionAddress(std::string parameter);
75 
76  // InstitutionName (0008,0080) vr=LO, vm=1, type=2
77  bool getInstitutionName(std::string& parameter) const;
78  std::string getInstitutionNameTag() const { return "(0008,0080)"; }
79  bool setInstitutionName(std::string parameter);
80 
81  // InstitutionalDepartmentName (0008,1040) vr=LO, vm=1, type=3
82  bool getInstitutionalDepartmentName(std::string& parameter) const;
83  std::string getInstitutionalDepartmentNameTag() const { return "(0008,1040)"; }
84  bool setInstitutionalDepartmentName(std::string parameter);
85 
86  // Manufacturer (0008,0070) vr=LO, vm=1, type=2
87  bool getManufacturer(std::string& parameter) const;
88  std::string getManufacturerTag() const { return "(0008,0070)"; }
89  bool setManufacturer(std::string parameter);
90 
91  // ManufacturerModelName (0008,1090) vr=LO, vm=1, type=2
92  bool getManufacturerModelName(std::string& parameter) const;
93  std::string getManufacturerModelNameTag() const { return "(0008,1090)"; }
94  bool setManufacturerModelName(std::string parameter);
95 
96  // TreatmentMachineName (300a,00b2) vr=SH, vm=1, type=2
97  bool getTreatmentMachineName(std::string& parameter) const;
98  std::string getTreatmentMachineNameTag() const { return "(300a,00b2)"; }
99  bool setTreatmentMachineName(std::string parameter);
100 
101 
102  private:
103 
104  DCMTree::TreePtr _dcmItem;
105 
106  };
107 
109 
111  DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface(std::vector<DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item> dcmSequence) : _itemVec(dcmSequence) {}
112 
114  for(size_t i=0; i < treePtrSeq.size(); i++)
115  {
117  }
118  }
119 
122  // DeviceSerialNumber (0018,1000) vr=LO, vm=1, type=2
123  bool getDeviceSerialNumber(unsigned long idx, std::string& parameter) const;
124  bool getDeviceSerialNumber(DCMTree::TreePtr item, std::string& parameter) const;
125  std::string getDeviceSerialNumberTag() const { return "(0018,1000)"; }
126  bool setDeviceSerialNumber(unsigned long idx, std::string parameter);
127 
128  // InstitutionAddress (0008,0081) vr=ST, vm=1, type=3
129  bool getInstitutionAddress(unsigned long idx, std::string& parameter) const;
130  bool getInstitutionAddress(DCMTree::TreePtr item, std::string& parameter) const;
131  std::string getInstitutionAddressTag() const { return "(0008,0081)"; }
132  bool setInstitutionAddress(unsigned long idx, std::string parameter);
133 
134  // InstitutionName (0008,0080) vr=LO, vm=1, type=2
135  bool getInstitutionName(unsigned long idx, std::string& parameter) const;
136  bool getInstitutionName(DCMTree::TreePtr item, std::string& parameter) const;
137  std::string getInstitutionNameTag() const { return "(0008,0080)"; }
138  bool setInstitutionName(unsigned long idx, std::string parameter);
139 
140  // InstitutionalDepartmentName (0008,1040) vr=LO, vm=1, type=3
141  bool getInstitutionalDepartmentName(unsigned long idx, std::string& parameter) const;
142  bool getInstitutionalDepartmentName(DCMTree::TreePtr item, std::string& parameter) const;
143  std::string getInstitutionalDepartmentNameTag() const { return "(0008,1040)"; }
144  bool setInstitutionalDepartmentName(unsigned long idx, std::string parameter);
145 
146  // Manufacturer (0008,0070) vr=LO, vm=1, type=2
147  bool getManufacturer(unsigned long idx, std::string& parameter) const;
148  bool getManufacturer(DCMTree::TreePtr item, std::string& parameter) const;
149  std::string getManufacturerTag() const { return "(0008,0070)"; }
150  bool setManufacturer(unsigned long idx, std::string parameter);
151 
152  // ManufacturerModelName (0008,1090) vr=LO, vm=1, type=2
153  bool getManufacturerModelName(unsigned long idx, std::string& parameter) const;
154  bool getManufacturerModelName(DCMTree::TreePtr item, std::string& parameter) const;
155  std::string getManufacturerModelNameTag() const { return "(0008,1090)"; }
156  bool setManufacturerModelName(unsigned long idx, std::string parameter);
157 
158  // TreatmentMachineName (300a,00b2) vr=SH, vm=1, type=2
159  bool getTreatmentMachineName(unsigned long idx, std::string& parameter) const;
160  bool getTreatmentMachineName(DCMTree::TreePtr item, std::string& parameter) const;
161  std::string getTreatmentMachineNameTag() const { return "(300a,00b2)"; }
162  bool setTreatmentMachineName(unsigned long idx, std::string parameter);
163 
164 
167  void setSequence(std::vector<DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item> dcmSequence) {
168  _itemVec = dcmSequence;
169  }
170 
173  std::vector<DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item> getSequence() const {
174  return _itemVec;
175  }
176 
179  bool hasSequence() const {
180  return (_itemVec.size() != 0);
181  }
182 
186  return static_cast<MLint>(_itemVec.size());
187  }
188 
192  if (_itemVec.size() > idx) {
193  return _itemVec[idx];
194  }
196  }
197 
202  return _itemVec[_itemVec.size()-1];
203  }
204 
206  _itemVec.push_back(newItem);
207  }
208 
211  bool insertItem(const size_t idx) {
212  if (_itemVec.size() > idx) {
213  std::vector<DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item>::iterator it = _itemVec.begin();
214  std::advance(it, idx);
216  return true;
217  }
218  return false;
219  }
220 
223  bool removeItem(const size_t idx) {
224  if ( _itemVec.size() > idx ) {
225  std::vector<DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item>::iterator it = _itemVec.begin();
226  std::advance(it, idx);
227  _itemVec.erase(it);
228  return true;
229  }
230  return false;
231  }
232 
233  protected:
235  std::vector<DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item> _itemVec;
236 };
237 
238 ML_END_NAMESPACE
239 
240 #endif // __mlDcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface_H
241 
242 /* MeVis-Hidden-Components-Start */
243 /* MeVis-Hidden-Components-End */
#define MLDCMTKACCESSORIES_EXPORT
void setSequence(std::vector< DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item > dcmSequence)
Set the DRTTreatmentMachineSequenceInRTTreatmentMachineRecordModule this interface class provides acc...
bool getInstitutionName(unsigned long idx, std::string &parameter) const
bool getInstitutionAddress(DCMTree::TreePtr item, std::string &parameter) const
bool setTreatmentMachineName(unsigned long idx, std::string parameter)
DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface(std::vector< DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item > dcmSequence)
Default Constructor.
bool setManufacturerModelName(unsigned long idx, std::string parameter)
bool setInstitutionName(unsigned long idx, std::string parameter)
bool hasSequence() const
Check if the DRTTreatmentMachineSequenceInRTTreatmentMachineRecordModule is set.
bool getTreatmentMachineName(DCMTree::TreePtr item, std::string &parameter) const
bool getDeviceSerialNumber(DCMTree::TreePtr item, std::string &parameter) const
bool setManufacturer(unsigned long idx, std::string parameter)
std::vector< DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getDeviceSerialNumber(unsigned long idx, std::string &parameter) const
bool getInstitutionalDepartmentName(unsigned long idx, std::string &parameter) const
bool getManufacturerModelName(DCMTree::TreePtr item, std::string &parameter) const
void addItem(DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item newItem)
std::vector< DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item > getSequence() const
Return the DRTTreatmentMachineSequenceInRTTreatmentMachineRecordModule this interface class provides ...
bool getManufacturerModelName(unsigned long idx, std::string &parameter) const
bool getInstitutionalDepartmentName(DCMTree::TreePtr item, std::string &parameter) const
bool setInstitutionalDepartmentName(unsigned long idx, std::string parameter)
DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getManufacturer(unsigned long idx, std::string &parameter) const
bool getTreatmentMachineName(unsigned long idx, std::string &parameter) const
DcmDRTTreatmentMachineSequenceInRTTreatmentMachineRecordModuleInterface::Item & addItem()
Adds a new item to the sequence.
bool getManufacturer(DCMTree::TreePtr item, std::string &parameter) const
bool setDeviceSerialNumber(unsigned long idx, std::string parameter)
bool getInstitutionAddress(unsigned long idx, std::string &parameter) const
bool getInstitutionName(DCMTree::TreePtr item, std::string &parameter) const
bool setInstitutionAddress(unsigned long idx, std::string parameter)
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