23#ifndef __mlDcmDRTModifiedAttributesSequenceInterface_H
24#define __mlDcmDRTModifiedAttributesSequenceInterface_H
34#ifndef __mlModuleIncludes_H
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
63 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
96 std::vector<DcmDRTModifiedAttributesSequenceInterface::Item>
getSequence()
const {
103 return (_itemVec.size() != 0);
109 return static_cast<MLint>(_itemVec.size());
115 if (_itemVec.size() >
idx) {
116 return _itemVec[
idx];
125 return _itemVec[_itemVec.size()-1];
135 if (_itemVec.size() >
idx) {
136 std::vector<DcmDRTModifiedAttributesSequenceInterface::Item>::iterator
it = _itemVec.begin();
137 std::advance(
it,
idx);
147 if ( _itemVec.size() >
idx ) {
148 std::vector<DcmDRTModifiedAttributesSequenceInterface::Item>::iterator
it = _itemVec.begin();
149 std::advance(
it,
idx);
158 std::vector<DcmDRTModifiedAttributesSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
Item(DCMTree::TreePtr dcmItem)
Item & operator=(const Item ©DcmItem)
DCMTree::TreePtr getTreePtr() const
Item(const Item ©DcmItem)
Class to provide access to DRTModifiedAttributesSequence.
DcmDRTModifiedAttributesSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
DcmDRTModifiedAttributesSequenceInterface()
DcmDRTModifiedAttributesSequenceInterface(std::vector< DcmDRTModifiedAttributesSequenceInterface::Item > dcmSequence)
Default Constructor.
DcmDRTModifiedAttributesSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
bool hasSequence() const
Check if the DRTModifiedAttributesSequence is set.
std::vector< DcmDRTModifiedAttributesSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
void setSequence(std::vector< DcmDRTModifiedAttributesSequenceInterface::Item > dcmSequence)
Set the DRTModifiedAttributesSequence this interface class provides access to.
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
std::vector< DcmDRTModifiedAttributesSequenceInterface::Item > getSequence() const
Return the DRTModifiedAttributesSequence this interface class provides access to.
DcmDRTModifiedAttributesSequenceInterface::Item & addItem()
Adds a new item to the sequence.
virtual ~DcmDRTModifiedAttributesSequenceInterface()
Default virtual Destructor.
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
bool insertItem(const size_t idx)
Insert an item at the indicated position.
void addItem(DcmDRTModifiedAttributesSequenceInterface::Item newItem)
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