23#ifndef __mlDcmDRTContourImageSequenceInterface_H
24#define __mlDcmDRTContourImageSequenceInterface_H
34#ifndef __mlModuleIncludes_H
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
63 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
140 std::vector<DcmDRTContourImageSequenceInterface::Item>
getSequence()
const {
147 return (_itemVec.size() != 0);
153 return static_cast<MLint>(_itemVec.size());
159 if (_itemVec.size() >
idx) {
160 return _itemVec[
idx];
169 return _itemVec[_itemVec.size()-1];
179 if (_itemVec.size() >
idx) {
180 std::vector<DcmDRTContourImageSequenceInterface::Item>::iterator
it = _itemVec.begin();
181 std::advance(
it,
idx);
191 if ( _itemVec.size() >
idx ) {
192 std::vector<DcmDRTContourImageSequenceInterface::Item>::iterator
it = _itemVec.begin();
193 std::advance(
it,
idx);
202 std::vector<DcmDRTContourImageSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
bool setReferencedFrameNumber(std::string parameter)
std::string getReferencedFrameNumberTag() const
bool setReferencedSOPInstanceUID(std::string parameter)
bool setReferencedSOPClassUID(std::string parameter)
bool getReferencedSOPClassUID(std::string ¶meter) const
std::string getReferencedSegmentNumberTag() const
std::string getReferencedSOPClassUIDTag() const
bool getReferencedSegmentNumber(MLuint16 ¶meter) const
bool setReferencedSegmentNumber(MLuint16 parameter)
Item(const Item ©DcmItem)
Item(DCMTree::TreePtr dcmItem)
bool getReferencedFrameNumber(std::string ¶meter) const
Item & operator=(const Item ©DcmItem)
std::string getReferencedSOPInstanceUIDTag() const
DCMTree::TreePtr getTreePtr() const
bool getReferencedSOPInstanceUID(std::string ¶meter) const
Class to provide access to DRTContourImageSequence.
virtual ~DcmDRTContourImageSequenceInterface()
Default virtual Destructor.
void setSequence(std::vector< DcmDRTContourImageSequenceInterface::Item > dcmSequence)
Set the DRTContourImageSequence this interface class provides access to.
bool getReferencedSOPInstanceUID(unsigned long idx, std::string ¶meter) const
bool setReferencedSOPClassUID(unsigned long idx, std::string parameter)
std::string getReferencedFrameNumberTag() const
bool getReferencedSOPClassUID(unsigned long idx, std::string ¶meter) const
bool getReferencedSegmentNumber(DCMTree::TreePtr item, MLuint16 ¶meter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getReferencedFrameNumber(DCMTree::TreePtr item, std::string ¶meter) const
std::vector< DcmDRTContourImageSequenceInterface::Item > getSequence() const
Return the DRTContourImageSequence this interface class provides access to.
bool getReferencedSOPClassUID(DCMTree::TreePtr item, std::string ¶meter) const
DcmDRTContourImageSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool getReferencedSegmentNumber(unsigned long idx, MLuint16 ¶meter) const
bool setReferencedSOPInstanceUID(unsigned long idx, std::string parameter)
DcmDRTContourImageSequenceInterface()
bool setReferencedFrameNumber(unsigned long idx, std::string parameter)
bool getReferencedSOPInstanceUID(DCMTree::TreePtr item, std::string ¶meter) const
std::vector< DcmDRTContourImageSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
std::string getReferencedSOPInstanceUIDTag() const
bool setReferencedSegmentNumber(unsigned long idx, MLuint16 parameter)
std::string getReferencedSOPClassUIDTag() const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getReferencedFrameNumber(unsigned long idx, std::string ¶meter) const
DcmDRTContourImageSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool hasSequence() const
Check if the DRTContourImageSequence is set.
std::string getReferencedSegmentNumberTag() const
DcmDRTContourImageSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
void addItem(DcmDRTContourImageSequenceInterface::Item newItem)
DcmDRTContourImageSequenceInterface(std::vector< DcmDRTContourImageSequenceInterface::Item > dcmSequence)
Default Constructor.
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