23 #ifndef __mlDcmDRTBrachyReferencedDoseReferenceSequenceInterface_H
24 #define __mlDcmDRTBrachyReferencedDoseReferenceSequenceInterface_H
34 #ifndef __mlModuleIncludes_H
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
55 Item(
const Item ©DcmItem) : _dcmItem(copyDcmItem.getTreePtr()) {}
63 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
89 for(
size_t i=0; i < treePtrSeq.size(); i++)
112 void setSequence(std::vector<DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item> dcmSequence) {
113 _itemVec = dcmSequence;
118 std::vector<DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item>
getSequence()
const {
125 return (_itemVec.size() != 0);
131 return static_cast<MLint>(_itemVec.size());
137 if (_itemVec.size() > idx) {
138 return _itemVec[idx];
147 return _itemVec[_itemVec.size()-1];
151 _itemVec.push_back(newItem);
157 if (_itemVec.size() > idx) {
158 std::vector<DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item>::iterator it = _itemVec.begin();
159 std::advance(it, idx);
169 if ( _itemVec.size() > idx ) {
170 std::vector<DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item>::iterator it = _itemVec.begin();
171 std::advance(it, idx);
180 std::vector<DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
Item & operator=(const Item ©DcmItem)
bool setCumulativeDoseReferenceCoefficient(std::string parameter)
bool getReferencedDoseReferenceNumber(std::string ¶meter) const
DCMTree::TreePtr getTreePtr() const
Item(const Item ©DcmItem)
bool getCumulativeDoseReferenceCoefficient(std::string ¶meter) const
bool setReferencedDoseReferenceNumber(std::string parameter)
std::string getReferencedDoseReferenceNumberTag() const
std::string getCumulativeDoseReferenceCoefficientTag() const
Item(DCMTree::TreePtr dcmItem)
Class to provide access to DRTBrachyReferencedDoseReferenceSequence.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool hasSequence() const
Check if the DRTBrachyReferencedDoseReferenceSequence is set.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
virtual ~DcmDRTBrachyReferencedDoseReferenceSequenceInterface()
Default virtual Destructor.
std::string getReferencedDoseReferenceNumberTag() const
void setSequence(std::vector< DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item > dcmSequence)
Set the DRTBrachyReferencedDoseReferenceSequence this interface class provides access to.
bool getReferencedDoseReferenceNumber(unsigned long idx, std::string ¶meter) const
bool getReferencedDoseReferenceNumber(DCMTree::TreePtr item, std::string ¶meter) const
DcmDRTBrachyReferencedDoseReferenceSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
DcmDRTBrachyReferencedDoseReferenceSequenceInterface(std::vector< DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item > dcmSequence)
Default Constructor.
std::vector< DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item > getSequence() const
Return the DRTBrachyReferencedDoseReferenceSequence this interface class provides access to.
bool getCumulativeDoseReferenceCoefficient(DCMTree::TreePtr item, std::string ¶meter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
DcmDRTBrachyReferencedDoseReferenceSequenceInterface()
bool setReferencedDoseReferenceNumber(unsigned long idx, std::string parameter)
std::string getCumulativeDoseReferenceCoefficientTag() const
DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getCumulativeDoseReferenceCoefficient(unsigned long idx, std::string ¶meter) const
bool setCumulativeDoseReferenceCoefficient(unsigned long idx, std::string parameter)
DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item & addItem()
Adds a new item to the sequence.
void addItem(DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item newItem)
std::vector< DcmDRTBrachyReferencedDoseReferenceSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
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 ...
std::vector< TreePtr > TreePtrVector
A vector of TreePtr - used for sequences.
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.