23#ifndef __mlDcmDRTROIContourSequenceInterface_H
24#define __mlDcmDRTROIContourSequenceInterface_H
35#ifndef __mlModuleIncludes_H
52 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
64 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
129 std::vector<DcmDRTROIContourSequenceInterface::Item>
getSequence()
const {
136 return (_itemVec.size() != 0);
142 return static_cast<MLint>(_itemVec.size());
148 if (_itemVec.size() >
idx) {
149 return _itemVec[
idx];
158 return _itemVec[_itemVec.size()-1];
168 if (_itemVec.size() >
idx) {
169 std::vector<DcmDRTROIContourSequenceInterface::Item>::iterator
it = _itemVec.begin();
170 std::advance(
it,
idx);
180 if ( _itemVec.size() >
idx ) {
181 std::vector<DcmDRTROIContourSequenceInterface::Item>::iterator
it = _itemVec.begin();
182 std::advance(
it,
idx);
191 std::vector<DcmDRTROIContourSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTContourSequence.
Item(DCMTree::TreePtr dcmItem)
std::string getReferencedROINumberTag() const
bool getROIDisplayColor(std::string ¶meter) const
bool getReferencedROINumber(std::string ¶meter) const
std::string getROIDisplayColorTag() const
Item & operator=(const Item ©DcmItem)
bool setReferencedROINumber(std::string parameter)
std::string getContourSequenceTag() const
DCMTree::TreePtr getTreePtr() const
bool setROIDisplayColor(std::string parameter)
Item(const Item ©DcmItem)
DcmDRTContourSequenceInterface getContourSequence() const
void setContourSequence(DcmDRTContourSequenceInterface seq)
Class to provide access to DRTROIContourSequence.
bool getROIDisplayColor(unsigned long idx, std::string ¶meter) const
DcmDRTROIContourSequenceInterface(std::vector< DcmDRTROIContourSequenceInterface::Item > dcmSequence)
Default Constructor.
std::vector< DcmDRTROIContourSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
virtual ~DcmDRTROIContourSequenceInterface()
Default virtual Destructor.
bool hasSequence() const
Check if the DRTROIContourSequence is set.
DcmDRTROIContourSequenceInterface()
DcmDRTROIContourSequenceInterface::Item & addItem()
Adds a new item to the sequence.
std::string getReferencedROINumberTag() const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
DcmDRTROIContourSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
std::vector< DcmDRTROIContourSequenceInterface::Item > getSequence() const
Return the DRTROIContourSequence this interface class provides access to.
bool getROIDisplayColor(DCMTree::TreePtr item, std::string ¶meter) const
void setContourSequence(DcmDRTContourSequenceInterface seq, unsigned long idx)
void setSequence(std::vector< DcmDRTROIContourSequenceInterface::Item > dcmSequence)
Set the DRTROIContourSequence this interface class provides access to.
DcmDRTROIContourSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool getReferencedROINumber(DCMTree::TreePtr item, std::string ¶meter) const
void addItem(DcmDRTROIContourSequenceInterface::Item newItem)
std::string getROIDisplayColorTag() const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
DcmDRTContourSequenceInterface getContourSequence(unsigned long idx) const
bool setROIDisplayColor(unsigned long idx, std::string parameter)
std::string getContourSequenceTag() const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool setReferencedROINumber(unsigned long idx, std::string parameter)
bool getReferencedROINumber(unsigned long idx, std::string ¶meter) const
Class to provide access to DRTContourSequence.
Class collecting some DICOM helper functionality explicitly for dcmtk.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
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