DCMTK  Version 3.6.3
OFFIS DICOM Toolkit
Classes | Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ContentItemMacro Class Reference

Class representing the Content Item Macro: More...

+ Inheritance diagram for ContentItemMacro:

Classes

class  ReferencedSOPSequenceItem
 Class representing an item within the Content Item Macro's Referenced SOP Sequence. More...
 

Public Member Functions

 ContentItemMacro (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules)
 Constructor. More...
 
 ContentItemMacro ()
 Constructor.
 
virtual ~ContentItemMacro ()
 Destructor.
 
virtual void resetRules ()
 Resets rules to their original values.
 
virtual OFString getName () const
 Get name of module ("ContentItemMacro") More...
 
virtual OFCondition read (DcmItem &source, const OFBool clearOldData=OFTrue)
 Read attributes from given item into this class. More...
 
virtual OFCondition write (DcmItem &destination)
 Write attributes from this class into given item. More...
 
virtual OFCondition getValueType (OFString &value, const signed long pos=0) const
 Get ValueType. More...
 
virtual OFCondition getValueType (ValueType &value) const
 Get ValueType. More...
 
virtual CodeSequenceMacrogetConceptNameCodeSequence ()
 Get reference to the ConceptNameCodeSequence. More...
 
virtual OFVector< CodeSequenceMacro * > & getEntireConceptNameCodeSequence ()
 Get a reference to the entire ConceptNameCodeSequence, including items exceeding the value multiplicity restriction of "1". More...
 
virtual OFCondition getDateTime (OFString &value, const signed long pos=0) const
 Get DateTime. More...
 
virtual OFCondition getDate (OFString &value, const signed long pos=0) const
 Get Date. More...
 
virtual OFCondition getTime (OFString &value, const signed long pos=0) const
 Get Time. More...
 
virtual OFCondition getPersonName (OFString &value, const signed long pos=0) const
 Get PersonName. More...
 
virtual OFCondition getUID (OFString &value, const signed long pos=0) const
 Get UID. More...
 
virtual OFCondition getTextValue (OFString &value, const signed long pos=0) const
 Get TextValue. More...
 
virtual CodeSequenceMacrogetConceptCodeSequence ()
 Get reference to the ConceptCodeSequence. More...
 
virtual OFVector< CodeSequenceMacro * > & getEntireConceptCodeSequence ()
 Get a reference to the entire ConceptCodeSequence, including items exceeding the value multiplicity restriction of "1". More...
 
virtual OFCondition getNumericValue (OFString &value, const signed long pos=0) const
 Get NumericValue. More...
 
virtual OFCondition getFloatingPointValue (Float64 &value, const signed long pos=0) const
 Get FloatingPointValue. More...
 
virtual OFCondition getRationalNumeratorValue (Sint32 &value, const signed long pos=0) const
 Get RationalNumeratorValue. More...
 
virtual OFCondition getRationalDenominatorValue (Uint32 &value, const signed long pos=0) const
 Get RationalDenominatorValue. More...
 
virtual CodeSequenceMacrogetMeasurementUnitsCodeSequence ()
 Get reference to the MeasurementUnitsCodeSequence. More...
 
virtual OFVector< CodeSequenceMacro * > & getEntireMeasurementUnitsCodeSequence ()
 Get a reference to the entire MeasurementUnitsCodeSequence, including items exceeding the value multiplicity restriction of "1". More...
 
virtual ReferencedSOPSequenceItemgetReferencedSOPSequence ()
 Get reference to the ReferencedSOPSequence. More...
 
virtual OFVector< ReferencedSOPSequenceItem * > & getEntireReferencedSOPSequence ()
 Get a reference to the entire ReferencedSOPSequence, including items exceeding the value multiplicity restriction of "1". More...
 
virtual OFCondition setValueType (const OFString &value, const OFBool checkValue=OFTrue)
 Set ValueType. More...
 
virtual OFCondition setValueType (const ValueType value, const OFBool checkValue=OFTrue)
 Set ValueType. More...
 
virtual OFCondition setDateTime (const OFString &value, const OFBool checkValue=OFTrue)
 Set DateTime. More...
 
virtual OFCondition setDate (const OFString &value, const OFBool checkValue=OFTrue)
 Set Date. More...
 
virtual OFCondition setTime (const OFString &value, const OFBool checkValue=OFTrue)
 Set Time. More...
 
virtual OFCondition setPersonName (const OFString &value, const OFBool checkValue=OFTrue)
 Set PersonName. More...
 
virtual OFCondition setUID (const OFString &value, const OFBool checkValue=OFTrue)
 Set UID. More...
 
virtual OFCondition setTextValue (const OFString &value, const OFBool checkValue=OFTrue)
 Set TextValue. More...
 
virtual OFCondition setNumericValue (const OFString &value, const OFBool checkValue=OFTrue)
 Set NumericValue. More...
 
virtual OFCondition setFloatingPointValue (const Float64 value, const unsigned long pos=0, const OFBool checkValue=OFTrue)
 Set FloatingPointValue. More...
 
virtual OFCondition setRationalNumeratorValue (const Sint32 value, const unsigned long pos=0, const OFBool checkValue=OFTrue)
 Set RationalNumeratorValue. More...
 
virtual OFCondition setRationalDenominatorValue (const Uint32 value, const unsigned long pos=0, const OFBool checkValue=OFTrue)
 Set RationalDenominatorValue. More...
 
- Public Member Functions inherited from IODComponent
 IODComponent (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules, IODComponent *parent=NULL)
 Constructor. More...
 
 IODComponent (IODComponent *parent=NULL)
 Constructor, creates rules and item from scratch. More...
 
IODComponentoperator= (const IODComponent &rhs)
 Assignment operator, copies contained item and rule set from rhs to "this" attribute set. More...
 
 IODComponent (const IODComponent &rhs)
 Copy constructor, copies reference to contained item and rule set to "this" attribute set. More...
 
virtual ~IODComponent ()
 Virtual Destructor.
 
void clearData ()
 Clear all attributes from the data that are handled by this module. More...
 
virtual void inventMissing ()
 Set missing values by inventing "default values". More...
 
OFshared_ptr< IODRulesgetRules ()
 Get rules handled by this module. More...
 
virtual void makeOptional ()
 Make component optional by turning all attributes requirement types of it to type 3. More...
 
DcmItemgetData ()
 Get the data handled by this module. More...
 
virtual OFCondition check (const OFBool quiet=OFFalse)
 Check whether this component's data satisfies the underlying rules. More...
 
virtual int compare (const IODComponent &rhs) const
 Comparison operator for IOD Components. More...
 

Protected Attributes

OFVector< CodeSequenceMacro * > m_ConceptNameCodeSequence
 ConceptNameCodeSequence.
 
OFVector< CodeSequenceMacro * > m_ConceptCodeSequence
 ConceptCodeSequence.
 
OFVector< CodeSequenceMacro * > m_MeasurementUnitsCodeSequence
 MeasurementUnitsCodeSequence.
 
OFVector< ReferencedSOPSequenceItem * > m_ReferencedSOPSequence
 ReferencedSOPSequence.
 
- Protected Attributes inherited from IODComponent
OFshared_ptr< DcmItemm_Item
 Shared pointer to the data handled by this class. More...
 
OFshared_ptr< IODRulesm_Rules
 Rules describing the attributes governed by this class.
 
IODComponentm_Parent
 The parent component (may be NULL) of this class.
 

Static Protected Attributes

static const OFString m_ModuleName
 The name of this module ("ContentItemMacro")
 

Additional Inherited Members

- Static Public Member Functions inherited from IODComponent
static OFCondition read (DcmItem &source, IODRules &rules, DcmItem &destination, const OFString &componentName)
 Static helper function that reads attributes from given item into destination item, as determined by the provided rules and component name. More...
 
static OFCondition write (DcmItem &source, IODRules &rules, DcmItem &destination, const OFString &componentName)
 Static helper function that writes attributes from given item into destination item, as determined by the provided rules and component name. More...
 

Detailed Description

Class representing the Content Item Macro:

ValueType: (CS, 1, 1) ConceptNameCodeSequence: (SQ, 1, 1) DateTime: (DT, 1, 1C) Date: (DA, 1, 1C) Time: (TM, 1, 1C) PersonName: (PN, 1, 1C) UID: (UI, 1, 1C) TextValue: (UT, 1, 1C) ConceptCodeSequence: (SQ, 1, 1C) NumericValue: (DS, 1-n, 1C) FloatingPointValue: (FD, 1-n, 1C) RationalNumeratorValue: (SL, 1-n, 1C) RationalDenominatorValue: (UL, 1-n, 1C) MeasurementUnitsCodeSequence: (SQ, 1, 1C) ReferencedSOPSequence: (SQ, 1, 1C)

Constructor & Destructor Documentation

◆ ContentItemMacro()

ContentItemMacro::ContentItemMacro ( OFshared_ptr< DcmItem item,
OFshared_ptr< IODRules rules 
)

Constructor.

Parameters
itemThe item to be used for data storage. If NULL, the class creates an empty data container.
rulesThe rule set for this class. If NULL, the class creates one from scratch and adds its values.

Member Function Documentation

◆ getConceptCodeSequence()

virtual CodeSequenceMacro* ContentItemMacro::getConceptCodeSequence ( )
virtual

Get reference to the ConceptCodeSequence.

Returns
a reference to the ConceptCodeSequence

◆ getConceptNameCodeSequence()

virtual CodeSequenceMacro* ContentItemMacro::getConceptNameCodeSequence ( )
virtual

Get reference to the ConceptNameCodeSequence.

Returns
a reference to the ConceptNameCodeSequence

◆ getDate()

virtual OFCondition ContentItemMacro::getDate ( OFString value,
const signed long  pos = 0 
) const
virtual

Get Date.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getDateTime()

virtual OFCondition ContentItemMacro::getDateTime ( OFString value,
const signed long  pos = 0 
) const
virtual

Get DateTime.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getEntireConceptCodeSequence()

virtual OFVector<CodeSequenceMacro*>& ContentItemMacro::getEntireConceptCodeSequence ( )
virtual

Get a reference to the entire ConceptCodeSequence, including items exceeding the value multiplicity restriction of "1".

Returns
a reference to the entire ConceptCodeSequence

◆ getEntireConceptNameCodeSequence()

virtual OFVector<CodeSequenceMacro*>& ContentItemMacro::getEntireConceptNameCodeSequence ( )
virtual

Get a reference to the entire ConceptNameCodeSequence, including items exceeding the value multiplicity restriction of "1".

Returns
a reference to the entire ConceptNameCodeSequence

◆ getEntireMeasurementUnitsCodeSequence()

virtual OFVector<CodeSequenceMacro*>& ContentItemMacro::getEntireMeasurementUnitsCodeSequence ( )
virtual

Get a reference to the entire MeasurementUnitsCodeSequence, including items exceeding the value multiplicity restriction of "1".

Returns
a reference to the entire MeasurementUnitsCodeSequence

◆ getEntireReferencedSOPSequence()

virtual OFVector<ReferencedSOPSequenceItem*>& ContentItemMacro::getEntireReferencedSOPSequence ( )
virtual

Get a reference to the entire ReferencedSOPSequence, including items exceeding the value multiplicity restriction of "1".

Returns
a reference to the entire ReferencedSOPSequence

◆ getFloatingPointValue()

virtual OFCondition ContentItemMacro::getFloatingPointValue ( Float64 &  value,
const signed long  pos = 0 
) const
virtual

Get FloatingPointValue.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getMeasurementUnitsCodeSequence()

virtual CodeSequenceMacro* ContentItemMacro::getMeasurementUnitsCodeSequence ( )
virtual

Get reference to the MeasurementUnitsCodeSequence.

Returns
a reference to the MeasurementUnitsCodeSequence

◆ getName()

virtual OFString ContentItemMacro::getName ( ) const
virtual

Get name of module ("ContentItemMacro")

Returns
Name of the module ("ContentItemMacro")

Implements IODComponent.

◆ getNumericValue()

virtual OFCondition ContentItemMacro::getNumericValue ( OFString value,
const signed long  pos = 0 
) const
virtual

Get NumericValue.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getPersonName()

virtual OFCondition ContentItemMacro::getPersonName ( OFString value,
const signed long  pos = 0 
) const
virtual

Get PersonName.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getRationalDenominatorValue()

virtual OFCondition ContentItemMacro::getRationalDenominatorValue ( Uint32 &  value,
const signed long  pos = 0 
) const
virtual

Get RationalDenominatorValue.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getRationalNumeratorValue()

virtual OFCondition ContentItemMacro::getRationalNumeratorValue ( Sint32 &  value,
const signed long  pos = 0 
) const
virtual

Get RationalNumeratorValue.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getReferencedSOPSequence()

virtual ReferencedSOPSequenceItem* ContentItemMacro::getReferencedSOPSequence ( )
virtual

Get reference to the ReferencedSOPSequence.

Returns
a reference to the ReferencedSOPSequence

◆ getTextValue()

virtual OFCondition ContentItemMacro::getTextValue ( OFString value,
const signed long  pos = 0 
) const
virtual

Get TextValue.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getTime()

virtual OFCondition ContentItemMacro::getTime ( OFString value,
const signed long  pos = 0 
) const
virtual

Get Time.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getUID()

virtual OFCondition ContentItemMacro::getUID ( OFString value,
const signed long  pos = 0 
) const
virtual

Get UID.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getValueType() [1/2]

virtual OFCondition ContentItemMacro::getValueType ( OFString value,
const signed long  pos = 0 
) const
virtual

Get ValueType.

Parameters
valueReference to variable in which the value should be stored
posIndex of the value to get (0..vm-1), -1 for all components
Returns
EC_Normal if successful, an error code otherwise

◆ getValueType() [2/2]

virtual OFCondition ContentItemMacro::getValueType ( ValueType &  value) const
virtual

Get ValueType.

Parameters
valueReference to variable in which the value should be stored
Returns
EC_Normal if successful, an error code otherwise

◆ read()

virtual OFCondition ContentItemMacro::read ( DcmItem source,
const OFBool  clearOldData = OFTrue 
)
virtual

Read attributes from given item into this class.

Parameters
sourceThe source to read from
clearOldDataIf OFTrue, old data is cleared before reading. Otherwise old data is overwritten (or amended)
Returns
EC_Normal if reading was successful, error otherwise

Reimplemented from IODComponent.

◆ setDate()

virtual OFCondition ContentItemMacro::setDate ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set Date.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (DA) and VM (1) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setDateTime()

virtual OFCondition ContentItemMacro::setDateTime ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set DateTime.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (DT) and VM (1) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setFloatingPointValue()

virtual OFCondition ContentItemMacro::setFloatingPointValue ( const Float64  value,
const unsigned long  pos = 0,
const OFBool  checkValue = OFTrue 
)
virtual

Set FloatingPointValue.

Parameters
valueValue to be set (single value only) or "" for no value
posIndex of the value to be set (starting from 0)
checkValueCheck 'value' for conformance with VR (FD) and VM (1-n) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setNumericValue()

virtual OFCondition ContentItemMacro::setNumericValue ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set NumericValue.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (DS) and VM (1-n) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setPersonName()

virtual OFCondition ContentItemMacro::setPersonName ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set PersonName.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (PN) and VM (1) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setRationalDenominatorValue()

virtual OFCondition ContentItemMacro::setRationalDenominatorValue ( const Uint32  value,
const unsigned long  pos = 0,
const OFBool  checkValue = OFTrue 
)
virtual

Set RationalDenominatorValue.

Parameters
valueValue to be set (single value only) or "" for no value
posIndex of the value to be set (starting from 0)
checkValueCheck 'value' for conformance with VR (UL) and VM (1-n) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setRationalNumeratorValue()

virtual OFCondition ContentItemMacro::setRationalNumeratorValue ( const Sint32  value,
const unsigned long  pos = 0,
const OFBool  checkValue = OFTrue 
)
virtual

Set RationalNumeratorValue.

Parameters
valueValue to be set (single value only) or "" for no value
posIndex of the value to be set (starting from 0)
checkValueCheck 'value' for conformance with VR (SL) and VM (1-n) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setTextValue()

virtual OFCondition ContentItemMacro::setTextValue ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set TextValue.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (UT) and VM (1) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setTime()

virtual OFCondition ContentItemMacro::setTime ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set Time.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (TM) and VM (1) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setUID()

virtual OFCondition ContentItemMacro::setUID ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set UID.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (UI) and VM (1) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setValueType() [1/2]

virtual OFCondition ContentItemMacro::setValueType ( const OFString value,
const OFBool  checkValue = OFTrue 
)
virtual

Set ValueType.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value' for conformance with VR (CS) and VM (1) if enabled
Returns
EC_Normal if successful, an error code otherwise

◆ setValueType() [2/2]

virtual OFCondition ContentItemMacro::setValueType ( const ValueType  value,
const OFBool  checkValue = OFTrue 
)
virtual

Set ValueType.

Parameters
valueValue to be set (single value only) or "" for no value
checkValueCheck 'value'. Does nothing, here for consistency with other set() functions.
Returns
EC_Normal if successful, an error code otherwise

◆ write()

virtual OFCondition ContentItemMacro::write ( DcmItem destination)
virtual

Write attributes from this class into given item.

Parameters
destinationThe item to write to
Returns
EC_Normal if writing was successful, error otherwise

Reimplemented from IODComponent.


The documentation for this class was generated from the following file:


Generated on Mon Feb 5 2018 for DCMTK Version 3.6.3 by Doxygen 1.8.14