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