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