23#ifndef __mlDcmDRTRecordedRangeShifterSequenceInterface_H
24#define __mlDcmDRTRecordedRangeShifterSequenceInterface_H
34#ifndef __mlModuleIncludes_H
51 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
63 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
129 std::vector<DcmDRTRecordedRangeShifterSequenceInterface::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<DcmDRTRecordedRangeShifterSequenceInterface::Item>::iterator
it = _itemVec.begin();
170 std::advance(
it,
idx);
180 if ( _itemVec.size() >
idx ) {
181 std::vector<DcmDRTRecordedRangeShifterSequenceInterface::Item>::iterator
it = _itemVec.begin();
182 std::advance(
it,
idx);
191 std::vector<DcmDRTRecordedRangeShifterSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
bool getAccessoryCode(std::string ¶meter) const
std::string getAccessoryCodeTag() const
std::string getRangeShifterIDTag() const
std::string getReferencedRangeShifterNumberTag() const
Item & operator=(const Item ©DcmItem)
Item(const Item ©DcmItem)
DCMTree::TreePtr getTreePtr() const
bool setRangeShifterID(std::string parameter)
bool setReferencedRangeShifterNumber(std::string parameter)
bool getRangeShifterID(std::string ¶meter) const
Item(DCMTree::TreePtr dcmItem)
bool getReferencedRangeShifterNumber(std::string ¶meter) const
bool setAccessoryCode(std::string parameter)
Class to provide access to DRTRecordedRangeShifterSequence.
DcmDRTRecordedRangeShifterSequenceInterface::Item & addItem()
Adds a new item to the sequence.
std::vector< DcmDRTRecordedRangeShifterSequenceInterface::Item > getSequence() const
Return the DRTRecordedRangeShifterSequence this interface class provides access to.
bool getAccessoryCode(DCMTree::TreePtr item, std::string ¶meter) const
bool getRangeShifterID(unsigned long idx, std::string ¶meter) const
DcmDRTRecordedRangeShifterSequenceInterface(std::vector< DcmDRTRecordedRangeShifterSequenceInterface::Item > dcmSequence)
Default Constructor.
void addItem(DcmDRTRecordedRangeShifterSequenceInterface::Item newItem)
bool setRangeShifterID(unsigned long idx, std::string parameter)
std::vector< DcmDRTRecordedRangeShifterSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool setAccessoryCode(unsigned long idx, std::string parameter)
bool getReferencedRangeShifterNumber(unsigned long idx, std::string ¶meter) const
std::string getRangeShifterIDTag() const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool getRangeShifterID(DCMTree::TreePtr item, std::string ¶meter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
std::string getAccessoryCodeTag() const
bool hasSequence() const
Check if the DRTRecordedRangeShifterSequence is set.
bool setReferencedRangeShifterNumber(unsigned long idx, std::string parameter)
bool getAccessoryCode(unsigned long idx, std::string ¶meter) const
std::string getReferencedRangeShifterNumberTag() const
DcmDRTRecordedRangeShifterSequenceInterface()
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
void setSequence(std::vector< DcmDRTRecordedRangeShifterSequenceInterface::Item > dcmSequence)
Set the DRTRecordedRangeShifterSequence this interface class provides access to.
bool getReferencedRangeShifterNumber(DCMTree::TreePtr item, std::string ¶meter) const
DcmDRTRecordedRangeShifterSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
DcmDRTRecordedRangeShifterSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
virtual ~DcmDRTRecordedRangeShifterSequenceInterface()
Default virtual Destructor.
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