23#ifndef __mlDcmDRTReferencedControlPointSequenceInterface_H
24#define __mlDcmDRTReferencedControlPointSequenceInterface_H
34#ifndef __mlModuleIncludes_H
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
63 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
118 std::vector<DcmDRTReferencedControlPointSequenceInterface::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];
157 if (_itemVec.size() >
idx) {
158 std::vector<DcmDRTReferencedControlPointSequenceInterface::Item>::iterator
it = _itemVec.begin();
159 std::advance(
it,
idx);
169 if ( _itemVec.size() >
idx ) {
170 std::vector<DcmDRTReferencedControlPointSequenceInterface::Item>::iterator
it = _itemVec.begin();
171 std::advance(
it,
idx);
180 std::vector<DcmDRTReferencedControlPointSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
bool setReferencedStopControlPointIndex(std::string parameter)
bool setReferencedStartControlPointIndex(std::string parameter)
bool getReferencedStartControlPointIndex(std::string ¶meter) const
Item & operator=(const Item ©DcmItem)
DCMTree::TreePtr getTreePtr() const
Item(const Item ©DcmItem)
std::string getReferencedStopControlPointIndexTag() const
std::string getReferencedStartControlPointIndexTag() const
bool getReferencedStopControlPointIndex(std::string ¶meter) const
Item(DCMTree::TreePtr dcmItem)
Class to provide access to DRTReferencedControlPointSequence.
DcmDRTReferencedControlPointSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
DcmDRTReferencedControlPointSequenceInterface::Item & addItem()
Adds a new item to the sequence.
DcmDRTReferencedControlPointSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
void addItem(DcmDRTReferencedControlPointSequenceInterface::Item newItem)
std::string getReferencedStartControlPointIndexTag() const
bool setReferencedStartControlPointIndex(unsigned long idx, std::string parameter)
bool setReferencedStopControlPointIndex(unsigned long idx, std::string parameter)
DcmDRTReferencedControlPointSequenceInterface(std::vector< DcmDRTReferencedControlPointSequenceInterface::Item > dcmSequence)
Default Constructor.
bool getReferencedStopControlPointIndex(unsigned long idx, std::string ¶meter) const
bool getReferencedStartControlPointIndex(DCMTree::TreePtr item, std::string ¶meter) const
std::vector< DcmDRTReferencedControlPointSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getReferencedStopControlPointIndex(DCMTree::TreePtr item, std::string ¶meter) const
bool hasSequence() const
Check if the DRTReferencedControlPointSequence is set.
std::vector< DcmDRTReferencedControlPointSequenceInterface::Item > getSequence() const
Return the DRTReferencedControlPointSequence this interface class provides access to.
void setSequence(std::vector< DcmDRTReferencedControlPointSequenceInterface::Item > dcmSequence)
Set the DRTReferencedControlPointSequence this interface class provides access to.
virtual ~DcmDRTReferencedControlPointSequenceInterface()
Default virtual Destructor.
std::string getReferencedStopControlPointIndexTag() const
DcmDRTReferencedControlPointSequenceInterface()
bool getReferencedStartControlPointIndex(unsigned long idx, std::string ¶meter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
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