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