23#ifndef __mlDcmDRTSourceImageSequenceInterface_H
24#define __mlDcmDRTSourceImageSequenceInterface_H
35#ifndef __mlModuleIncludes_H
52 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
64 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
173 std::vector<DcmDRTSourceImageSequenceInterface::Item>
getSequence()
const {
180 return (_itemVec.size() != 0);
186 return static_cast<MLint>(_itemVec.size());
192 if (_itemVec.size() >
idx) {
193 return _itemVec[
idx];
202 return _itemVec[_itemVec.size()-1];
212 if (_itemVec.size() >
idx) {
213 std::vector<DcmDRTSourceImageSequenceInterface::Item>::iterator
it = _itemVec.begin();
214 std::advance(
it,
idx);
224 if ( _itemVec.size() >
idx ) {
225 std::vector<DcmDRTSourceImageSequenceInterface::Item>::iterator
it = _itemVec.begin();
226 std::advance(
it,
idx);
235 std::vector<DcmDRTSourceImageSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTPurposeOfReferenceCodeSequence.
bool getReferencedSOPInstanceUID(std::string ¶meter) const
bool getReferencedSOPClassUID(std::string ¶meter) const
std::string getReferencedFrameNumberTag() const
Item(DCMTree::TreePtr dcmItem)
bool setReferencedFrameNumber(std::string parameter)
std::string getReferencedSOPClassUIDTag() const
DcmDRTPurposeOfReferenceCodeSequenceInterface getPurposeOfReferenceCodeSequence() const
Item(const Item ©DcmItem)
std::string getPurposeOfReferenceCodeSequenceTag() const
std::string getReferencedSegmentNumberTag() const
bool setReferencedSOPClassUID(std::string parameter)
std::string getPatientOrientationTag() const
bool setReferencedSegmentNumber(MLuint16 parameter)
DCMTree::TreePtr getTreePtr() const
void setPurposeOfReferenceCodeSequence(DcmDRTPurposeOfReferenceCodeSequenceInterface seq)
std::string getSpatialLocationsPreservedTag() const
std::string getReferencedSOPInstanceUIDTag() const
bool setReferencedSOPInstanceUID(std::string parameter)
bool getReferencedFrameNumber(std::string ¶meter) const
Item & operator=(const Item ©DcmItem)
bool setPatientOrientation(std::string parameter)
bool setSpatialLocationsPreserved(std::string parameter)
bool getSpatialLocationsPreserved(std::string ¶meter) const
bool getReferencedSegmentNumber(MLuint16 ¶meter) const
bool getPatientOrientation(std::string ¶meter) const
Class to provide access to DRTSourceImageSequence.
std::string getReferencedSegmentNumberTag() const
bool getReferencedSOPInstanceUID(DCMTree::TreePtr item, std::string ¶meter) const
bool setReferencedSOPClassUID(unsigned long idx, std::string parameter)
bool getPatientOrientation(DCMTree::TreePtr item, std::string ¶meter) const
DcmDRTPurposeOfReferenceCodeSequenceInterface getPurposeOfReferenceCodeSequence(unsigned long idx) const
std::string getReferencedFrameNumberTag() const
void setPurposeOfReferenceCodeSequence(DcmDRTPurposeOfReferenceCodeSequenceInterface seq, unsigned long idx)
bool getReferencedSOPClassUID(unsigned long idx, std::string ¶meter) const
DcmDRTSourceImageSequenceInterface(std::vector< DcmDRTSourceImageSequenceInterface::Item > dcmSequence)
Default Constructor.
std::string getSpatialLocationsPreservedTag() const
std::vector< DcmDRTSourceImageSequenceInterface::Item > getSequence() const
Return the DRTSourceImageSequence this interface class provides access to.
std::string getReferencedSOPInstanceUIDTag() const
std::string getReferencedSOPClassUIDTag() const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool getPatientOrientation(unsigned long idx, std::string ¶meter) const
bool setPatientOrientation(unsigned long idx, std::string parameter)
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
bool setReferencedFrameNumber(unsigned long idx, std::string parameter)
bool getReferencedFrameNumber(unsigned long idx, std::string ¶meter) const
bool getSpatialLocationsPreserved(unsigned long idx, std::string ¶meter) const
bool getReferencedSOPClassUID(DCMTree::TreePtr item, std::string ¶meter) const
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
void addItem(DcmDRTSourceImageSequenceInterface::Item newItem)
bool getReferencedSOPInstanceUID(unsigned long idx, std::string ¶meter) const
void setSequence(std::vector< DcmDRTSourceImageSequenceInterface::Item > dcmSequence)
Set the DRTSourceImageSequence this interface class provides access to.
bool getReferencedSegmentNumber(DCMTree::TreePtr item, MLuint16 ¶meter) const
DcmDRTSourceImageSequenceInterface()
DcmDRTSourceImageSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool hasSequence() const
Check if the DRTSourceImageSequence is set.
std::string getPatientOrientationTag() const
bool setReferencedSegmentNumber(unsigned long idx, MLuint16 parameter)
bool getSpatialLocationsPreserved(DCMTree::TreePtr item, std::string ¶meter) const
DcmDRTSourceImageSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
virtual ~DcmDRTSourceImageSequenceInterface()
Default virtual Destructor.
std::vector< DcmDRTSourceImageSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getReferencedFrameNumber(DCMTree::TreePtr item, std::string ¶meter) const
DcmDRTSourceImageSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool setReferencedSOPInstanceUID(unsigned long idx, std::string parameter)
bool setSpatialLocationsPreserved(unsigned long idx, std::string parameter)
std::string getPurposeOfReferenceCodeSequenceTag() const
bool getReferencedSegmentNumber(unsigned long idx, MLuint16 ¶meter) const
Class to provide access to DRTPurposeOfReferenceCodeSequence.
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