DCMTK: IODRule Class Reference

DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
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.
IODRule * | clone ()
| Return deep copy of this object.
virtual DcmTagKey | getTagKey () const
| Get tag key of the attribute rule.
virtual OFString | getPrivateCreator () const
| Get private creator of the related attribute.
virtual OFString | getType () const
| The requirement type of the attribute (1, 1C, 2, 2C or 3)
virtual OFString | getVM () const
| The VM of the attribute as noted in the DICOM standard part 6, e.g. "1-n" or "2".
virtual OFString | getModule () const
| Get module (or component name) the related attribute belongs to.
virtual OFString | getDefaultValue () const
| Get default value of this attribute.
virtual DcmIODTypes::IOD_IE | getIE () const
| Get Information Entity the related attribute belongs to.
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.
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() [1/2]

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

  key | The tag key of the attribute
  VM | The VM of the attribute (notation like in DICOM part 6, e.g. "1-n"), for sequences the number of items allowed.
  type | The "IOD type" of the attribute. Allowed values "1", "1C", "2", "2C" and "3"
  module | The module or "component" this attribute belongs to
  ie | The Information Entity the module belongs to
  defaultValue | The default value (default: empty)
  privateCreator | The private creator of the attribute if attribute (default: No private creator)

Referenced by IODRule(), and clone().

## ◆ IODRule() [2/2]

IODRule::IODRule | ( | const IODRule & | rhs | ) |
| private

Private undefined copy constructor.

Parameters

  rhs | Right hand side of assignment

References IODRule().

## 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

  item | The item to check the attribute in
  quiet | If 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

References IODRule().

## ◆ 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::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::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:

- dcmiod/include/dcmtk/dcmiod/iodrules.h

Generated on Sat Mar 1 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2