DCMTK  Version 3.6.4
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
IODRule Class Reference

Class representing a single rule, that refers to a single attribute. More...

Public Member Functions

 IODRule (const DcmTagKey &key, const OFString &VM, const OFString &type, const OFString &module, const DcmIODTypes::IOD_IE ie, const OFString &defaultValue="", const OFString &privateCreator="")
 Constructor to create a new attribute rule. More...
 
IODRuleclone ()
 Return deep copy of this object. More...
 
virtual DcmTagKey getTagKey () const
 Get tag key of the attribute rule. More...
 
virtual OFString getPrivateCreator () const
 Get private creator of the related attribute. More...
 
virtual OFString getType () const
 The requirement type of the attribute (1, 1C, 2, 2C or 3) More...
 
virtual OFString getVM () const
 The VM of the attribute as noted in the DICOM standard part 6, e.g. "1-n" or "2". More...
 
virtual OFString getModule () const
 Get module (or component name) the related attribute belongs to. More...
 
virtual OFString getDefaultValue () const
 Get default value of this attribute. More...
 
virtual DcmIODTypes::IOD_IE getIE () const
 Get Information Entity the related attribute belongs to. More...
 
virtual OFCondition check (DcmItem &item, const OFBool quiet=OFFalse)
 Check whether the given item fulfills the requirements of this rule, i.e. the related attribute is checked within the given item. More...
 
virtual ~IODRule ()
 Virtual Destructor.
 

Private Member Functions

 IODRule ()
 Private undefined default constructor.
 
 IODRule (const IODRule &rhs)
 Private undefined copy constructor.
 

Private Attributes

DcmTagKey m_Key
 Tag key.
 
OFString m_VM
 VM, see DcmElement::checkVM() for permitted values (e.g. "1-n")
 
OFString m_Type
 Requirement type: 1, 1C, 2, 2C or 3.
 
OFString m_Module
 Module (e.g. "PatientModule" or "component name", e.g. "CodeSequenceMacro".
 
DcmIODTypes::IOD_IE m_IE
 The Information Entity the related attribute belongs to according to the DICOM Model of the Real World, e.g. "Patient" for the attribute "Patient Name".
 
OFString m_DefaultValue
 Default value for attribute.
 
OFString m_PrivateCreator
 Private Creator (if private attribute)
 

Detailed Description

Class representing a single rule, that refers to a single attribute.

Each rule is uniquely identified by the attribute's tag key and includes information on the Value Multiplicity (VM) of the attribute, its type (1, 1C, 2,...), the module (e.g. "PatientModule") or structure (e.g. "CodeSequenceMacro") it belongs to, a default value and its private creator if it is a private attribute. On top, the Information Entity according to the DICOM Model of the Real World can be stored, e.g. "Patient" for the "PatientModule".

Constructor & Destructor Documentation

◆ IODRule()

IODRule::IODRule ( const DcmTagKey key,
const OFString VM,
const OFString type,
const OFString module,
const DcmIODTypes::IOD_IE  ie,
const OFString defaultValue = "",
const OFString privateCreator = "" 
)

Constructor to create a new attribute rule.

Parameters
keyThe tag key of the attribute
VMThe VM of the attribute (notation like in DICOM part 6, e.g. "1-n"), for sequences the number of items allowed.
typeThe "IOD type" of the attribute. Allowed values "1", "1C", "2", "2C" and "3"
moduleThe module or "component" this attribute belongs to
ieThe Information Entity the module belongs to
defaultValueThe default value (default: empty)
privateCreatorThe private creator of the attribute if attribute (default: No private creator)

Member Function Documentation

◆ check()

virtual OFCondition IODRule::check ( DcmItem item,
const OFBool  quiet = OFFalse 
)
virtual

Check whether the given item fulfills the requirements of this rule, i.e. the related attribute is checked within the given item.

Parameters
itemThe item to check the attribute in
quietIf OFTrue, no error or warning messages will be produced but only the return code will indicate OK or error.
Returns
EC_Normal if this rule is fulfilled, error otherwise

◆ clone()

IODRule* IODRule::clone ( )

Return deep copy of this object.

Returns
Deep copy of "this" object

◆ getDefaultValue()

virtual OFString IODRule::getDefaultValue ( ) const
virtual

Get default value of this attribute.

Returns
The default value (might be empty)

◆ getIE()

virtual DcmIODTypes::IOD_IE IODRule::getIE ( ) const
virtual

Get Information Entity the related attribute belongs to.

Returns
The Information Entity (might be empty)

◆ getModule()

virtual OFString IODRule::getModule ( ) const
virtual

Get module (or component name) the related attribute belongs to.

Returns
The module or component name (e.g. "PatientModule" or "CodeSequenceMacro")

Referenced by DcmIODUtil::readSingleItem(), DcmIODUtil::readSubSequence(), DcmIODUtil::writeSingleItem(), and DcmIODUtil::writeSubSequence().

◆ getPrivateCreator()

virtual OFString IODRule::getPrivateCreator ( ) const
virtual

Get private creator of the related attribute.

Returns
The private creator of the attribute

◆ getTagKey()

virtual DcmTagKey IODRule::getTagKey ( ) const
virtual

Get tag key of the attribute rule.

Returns
The tag key of the rule

Referenced by DcmIODUtil::writeSubSequence().

◆ getType()

virtual OFString IODRule::getType ( ) const
virtual

The requirement type of the attribute (1, 1C, 2, 2C or 3)

Returns
The requirement type of the attribute

Referenced by DcmIODUtil::readSingleItem(), DcmIODUtil::readSubSequence(), DcmIODUtil::writeSingleItem(), and DcmIODUtil::writeSubSequence().

◆ getVM()

virtual OFString IODRule::getVM ( ) const
virtual

The VM of the attribute as noted in the DICOM standard part 6, e.g. "1-n" or "2".

For Sequences (VR SQ) whose VM is always 1 by the standard, this denotes the number of items permitted.

Returns
The VM (or number of items permitted)

Referenced by DcmIODUtil::readSubSequence(), and DcmIODUtil::writeSubSequence().


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


Generated on Thu Nov 29 2018 for DCMTK Version 3.6.4 by Doxygen 1.8.14