23#ifndef __mlDcmDRTProtocolContextSequenceInterface_H
24#define __mlDcmDRTProtocolContextSequenceInterface_H
38#ifndef __mlModuleIncludes_H
55 Item() { _dcmItem = DcmtkAccessories::createNewDicomTree(); }
67 bool isValid()
const {
return _dcmItem.get() !=
nullptr; }
71 bool getDate(std::string& parameter)
const;
96 bool getTime(std::string& parameter)
const;
101 bool getUID(std::string& parameter)
const;
152 bool getDate(
unsigned long idx, std::string& parameter)
const;
182 bool getTime(
unsigned long idx, std::string& parameter)
const;
188 bool getUID(
unsigned long idx, std::string& parameter)
const;
228 std::vector<DcmDRTProtocolContextSequenceInterface::Item>
getSequence()
const {
235 return (_itemVec.size() != 0);
241 return static_cast<MLint>(_itemVec.size());
247 if (_itemVec.size() >
idx) {
248 return _itemVec[
idx];
257 return _itemVec[_itemVec.size()-1];
267 if (_itemVec.size() >
idx) {
268 std::vector<DcmDRTProtocolContextSequenceInterface::Item>::iterator
it = _itemVec.begin();
269 std::advance(
it,
idx);
279 if ( _itemVec.size() >
idx ) {
280 std::vector<DcmDRTProtocolContextSequenceInterface::Item>::iterator
it = _itemVec.begin();
281 std::advance(
it,
idx);
290 std::vector<DcmDRTProtocolContextSequenceInterface::Item>
_itemVec;
#define MLDCMTKACCESSORIES_EXPORT
Class to provide access to DRTConceptCodeSequence.
Class to provide access to DRTConceptNameCodeSequence.
Class to provide access to DRTContentItemModifierSequence.
Class to provide access to DRTMeasurementUnitsCodeSequence.
void setMeasurementUnitsCodeSequence(DcmDRTMeasurementUnitsCodeSequenceInterface seq)
bool getTime(std::string ¶meter) const
bool setValueType(std::string parameter)
std::string getMeasurementUnitsCodeSequenceTag() const
DcmDRTConceptCodeSequenceInterface getConceptCodeSequence() const
void setContentItemModifierSequence(DcmDRTContentItemModifierSequenceInterface seq)
Item(DCMTree::TreePtr dcmItem)
DcmDRTMeasurementUnitsCodeSequenceInterface getMeasurementUnitsCodeSequence() const
bool setUID(std::string parameter)
Item & operator=(const Item ©DcmItem)
bool setDateTime(std::string parameter)
bool setNumericValue(std::string parameter)
std::string getTimeTag() const
bool getNumericValue(std::string ¶meter) const
bool setTextValue(std::string parameter)
void setConceptNameCodeSequence(DcmDRTConceptNameCodeSequenceInterface seq)
std::string getConceptNameCodeSequenceTag() const
DcmDRTContentItemModifierSequenceInterface getContentItemModifierSequence() const
DCMTree::TreePtr getTreePtr() const
bool getDate(std::string ¶meter) const
std::string getDateTag() const
bool getUID(std::string ¶meter) const
void setConceptCodeSequence(DcmDRTConceptCodeSequenceInterface seq)
std::string getPersonNameTag() const
std::string getConceptCodeSequenceTag() const
std::string getUIDTag() const
bool setDate(std::string parameter)
std::string getTextValueTag() const
bool getPersonName(std::string ¶meter) const
std::string getContentItemModifierSequenceTag() const
std::string getDateTimeTag() const
std::string getValueTypeTag() const
std::string getNumericValueTag() const
bool getDateTime(std::string ¶meter) const
bool getTextValue(std::string ¶meter) const
bool setTime(std::string parameter)
bool setPersonName(std::string parameter)
bool getValueType(std::string ¶meter) const
DcmDRTConceptNameCodeSequenceInterface getConceptNameCodeSequence() const
Item(const Item ©DcmItem)
Class to provide access to DRTProtocolContextSequence.
bool setTime(unsigned long idx, std::string parameter)
std::string getConceptCodeSequenceTag() const
bool setNumericValue(unsigned long idx, std::string parameter)
DcmDRTProtocolContextSequenceInterface(std::vector< DcmDRTProtocolContextSequenceInterface::Item > dcmSequence)
Default Constructor.
bool setDateTime(unsigned long idx, std::string parameter)
DcmDRTContentItemModifierSequenceInterface getContentItemModifierSequence(unsigned long idx) const
std::string getNumericValueTag() const
void addItem(DcmDRTProtocolContextSequenceInterface::Item newItem)
DcmDRTConceptNameCodeSequenceInterface getConceptNameCodeSequence(unsigned long idx) const
DcmDRTProtocolContextSequenceInterface()
DcmDRTConceptCodeSequenceInterface getConceptCodeSequence(unsigned long idx) const
MLint getNumberOfItems() const
Return number of items the internal sequence consists of.
void setConceptCodeSequence(DcmDRTConceptCodeSequenceInterface seq, unsigned long idx)
std::string getValueTypeTag() const
bool setUID(unsigned long idx, std::string parameter)
std::string getContentItemModifierSequenceTag() const
std::string getMeasurementUnitsCodeSequenceTag() const
void setMeasurementUnitsCodeSequence(DcmDRTMeasurementUnitsCodeSequenceInterface seq, unsigned long idx)
std::string getPersonNameTag() const
void setConceptNameCodeSequence(DcmDRTConceptNameCodeSequenceInterface seq, unsigned long idx)
bool hasSequence() const
Check if the DRTProtocolContextSequence is set.
std::vector< DcmDRTProtocolContextSequenceInterface::Item > getSequence() const
Return the DRTProtocolContextSequence this interface class provides access to.
std::string getConceptNameCodeSequenceTag() const
std::string getDateTag() const
bool getTime(DCMTree::TreePtr item, std::string ¶meter) const
bool setDate(unsigned long idx, std::string parameter)
bool getNumericValue(DCMTree::TreePtr item, std::string ¶meter) const
std::vector< DcmDRTProtocolContextSequenceInterface::Item > _itemVec
Reference to the wrapped DICOM tree pointer vector.
bool getPersonName(unsigned long idx, std::string ¶meter) const
DcmDRTProtocolContextSequenceInterface(DCMTree::TreePtrVector treePtrSeq)
DcmDRTMeasurementUnitsCodeSequenceInterface getMeasurementUnitsCodeSequence(unsigned long idx) const
bool getDate(DCMTree::TreePtr item, std::string ¶meter) const
void setContentItemModifierSequence(DcmDRTContentItemModifierSequenceInterface seq, unsigned long idx)
bool getTextValue(DCMTree::TreePtr item, std::string ¶meter) const
bool getDateTime(unsigned long idx, std::string ¶meter) const
bool getPersonName(DCMTree::TreePtr item, std::string ¶meter) const
DcmDRTProtocolContextSequenceInterface::Item & addItem()
Adds a new item to the sequence.
bool getDateTime(DCMTree::TreePtr item, std::string ¶meter) const
virtual ~DcmDRTProtocolContextSequenceInterface()
Default virtual Destructor.
std::string getTextValueTag() const
bool getUID(unsigned long idx, std::string ¶meter) const
bool getUID(DCMTree::TreePtr item, std::string ¶meter) const
bool setValueType(unsigned long idx, std::string parameter)
bool getTextValue(unsigned long idx, std::string ¶meter) const
bool setPersonName(unsigned long idx, std::string parameter)
DcmDRTProtocolContextSequenceInterface::Item getItem(const size_t idx) const
Gets the item at the indicated position.
bool getTime(unsigned long idx, std::string ¶meter) const
bool getDate(unsigned long idx, std::string ¶meter) const
bool getValueType(DCMTree::TreePtr item, std::string ¶meter) const
void setSequence(std::vector< DcmDRTProtocolContextSequenceInterface::Item > dcmSequence)
Set the DRTProtocolContextSequence this interface class provides access to.
bool getValueType(unsigned long idx, std::string ¶meter) const
std::string getUIDTag() const
std::string getTimeTag() const
std::string getDateTimeTag() const
bool getNumericValue(unsigned long idx, std::string ¶meter) const
bool insertItem(const size_t idx)
Insert an item at the indicated position.
bool setTextValue(unsigned long idx, std::string parameter)
bool removeItem(const size_t idx)
Removes the indicated item from the sequence.
Class to provide access to DRTConceptCodeSequence.
Class to provide access to DRTConceptNameCodeSequence.
Class to provide access to DRTContentItemModifierSequence.
Class to provide access to DRTMeasurementUnitsCodeSequence.
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