DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Static Private Attributes | List of all members
CID42_NumericValueQualifier Class Reference

Implementation of DCMR Context Group: CID 42 - Numeric Value Qualifier. More...

Inheritance diagram for CID42_NumericValueQualifier:

## Public Types
enum | EnumType { NotANumber , NegativeInfinity , PositiveInfinity , DivideByZero , Underflow , Overflow , MeasurementFailure , CalculationFailure , ValueOutOfRange , MeasurementNotAttempted , ValueUnknown , ValueIndeterminate }
| types of numeric value qualifier More...

## Public Member Functions
| CID42_NumericValueQualifier (const DSRCodedEntryValue &selectedValue=DSRCodedEntryValue())
| (default) constructor
| CID42_NumericValueQualifier (const EnumType selectedValue, const OFBool enhancedEncodingMode=OFFalse)
| constructor
virtual OFCondition | selectValue (const EnumType selectedValue, const OFBool enhancedEncodingMode=OFFalse)
| select a coded entry given by its type as the current value
virtual OFCondition | selectValue (const DSRCodedEntryValue &codedEntryValue, const OFBool check=OFTrue, const OFBool definedContextGroup=OFFalse)
| select a given coded entry as the current value
virtual OFCondition | findCodedEntry (const DSRCodedEntryValue &codedEntryValue) const
| search for a given coded entry in this context group.
Public Member Functions inherited from DSRContextGroup
| operator const DSRCodedEntryValue & () const
| conversion operator that returns the currently selected coded entry value (might be empty if none is selected)
virtual void | clear ()
| clear list of extended coded entries and forget about the currently selected coded entry
OFBool | isExtensible () const
| check whether context group is extensible
void | setExtensible (const OFBool mode=OFTrue)
| change mode specifying whether the context group is extensible or non-extensible
const OFString & | getIdentifier () const
| get context identifier
const OFString & | getMappingResource () const
| get mapping resource
const OFString & | getVersion () const
| get context group version (optional)
const OFString & | getUID () const
| get context group UID (optional)
virtual OFBool | hasSelectedValue () const
| check whether a coded entry is selected as the current value
const DSRCodedEntryValue & | getSelectedValue () const
| get currently selected coded entry value (optional)
virtual OFBool | hasCodedEntry (const DSRCodedEntryValue &codedEntryValue) const
| check whether a given coded entry is contained in this context group.
virtual OFBool | hasExtendedCodedEntries () const
| check whether this context group has any extended coded entries.
virtual OFCondition | addCodedEntry (const DSRCodedEntryValue &codedEntryValue)
| add a coded entry to this context group as an extension, i.e. as a non-standard code.
virtual OFCondition | lookupCodedEntry (DSRCodedEntryValue &codedEntryValue, const OFBool enhancedEncodingMode=OFFalse) const
| search for a given coded entry in this context group and, if found, replace its value with the one found in the context group.
virtual void | print (STD_NAMESPACE ostream &stream) const
| print contents of this context group, i.e. a general header, the currently selected coded entry value (if any) and all coded entries that are contained in this context group (both standard and extended ones).
virtual OFCondition | checkSelectedValue (const OFBool definedContextGroup=OFFalse) const
| check whether the currently selected coded entry is valid.

## Static Public Member Functions
static void | initialize ()
| initialize this context group explicitly.
static void | cleanup ()
| cleanup this context group, i.e. delete the internal list of standard coded entries.
static DSRCodedEntryValue | getCodedEntry (const EnumType value, const OFBool enhancedEncodingMode=OFFalse)
| map a given type to the associated coded entry

## Protected Types
typedef OFMap< EnumType, DSRBasicCodedEntry > | CodeList
| type used for storing and managing the coded entries

## Protected Member Functions
virtual void | printCodes (STD_NAMESPACE ostream &stream) const
| print details on coded entries that are contained in this context group.
virtual OFCondition | findCodedEntry (const DSRCodedEntryValue &searchForCodedEntry, DSRCodedEntryValue *foundCodedEntry, const OFBool enhancedEncodingMode=OFFalse) const
| search for a given coded entry in this context group
Protected Member Functions inherited from DSRContextGroup
| DSRContextGroup (const OFString &contextIdentifier, const OFString &mappingResource, const OFString &contextGroupVersion="", const OFString &contextGroupUID="", const DSRCodedEntryValue &selectedValue=DSRCodedEntryValue())
| constructor
virtual | ~DSRContextGroup ()
| destructor
virtual void | printHeader (STD_NAMESPACE ostream &stream) const
| print header with some general information on this context group
virtual OFCondition | checkCodedEntry (const DSRCodedEntryValue &codedEntryValue, const OFBool definedContextGroup) const
| check whether a given coded entry is valid.

## Static Protected Member Functions
static CodeList & | getCodes ()
| get list of standard coded entries that are managed by this context group.
static OFCondition | setEnhancedEncodingMode (DSRCodedEntryValue &codedEntryValue)
| set the "Enhanced Encoding Mode" for a given coded entry

## Static Private Attributes
static CodeList * | Codes
| pointer to internal code list (use a static variable for singleton pattern)

## Detailed Description

Implementation of DCMR Context Group: CID 42 - Numeric Value Qualifier.

(type: extensible, version: 20020114)

## Member Enumeration Documentation

## ◆ EnumType

enum CID42_NumericValueQualifier::EnumType

types of numeric value qualifier

Enumerator
NotANumber | (114000,DCM,"Not a number"), included from CID 43
NegativeInfinity | (114001,DCM,"Negative Infinity"), included from CID 43
PositiveInfinity | (114002,DCM,"Positive Infinity"), included from CID 43
DivideByZero | (114003,DCM,"Divide by zero"), included from CID 43
Underflow | (114004,DCM,"Underflow"), included from CID 43
Overflow | (114005,DCM,"Overflow"), included from CID 43
MeasurementFailure | (114006,DCM,"Measurement failure"), included from CID 43
CalculationFailure | (114008,DCM,"Calculation failure"), included from CID 43
ValueOutOfRange | (114009,DCM,"Value out of range"), included from CID 43
MeasurementNotAttempted | (114007,DCM,"Measurement not attempted"), included from CID 44
ValueUnknown | (114010,DCM,"Value unknown"), included from CID 44
ValueIndeterminate | (114011,DCM,"Value indeterminate"), included from CID 44

## Constructor & Destructor Documentation

## ◆ CID42_NumericValueQualifier() [1/2]

CID42_NumericValueQualifier::CID42_NumericValueQualifier | ( | const DSRCodedEntryValue & | selectedValue = DSRCodedEntryValue() | ) |

(default) constructor

Parameters

  selectedValue | coded entry to be selected as the current value (optional). Should be a valid code according to the DICOM definitions for this context group, i.e. no checks are performed. Call DSRContextGroup::checkSelectedValue() if needed.

## ◆ CID42_NumericValueQualifier() [2/2]

CID42_NumericValueQualifier::CID42_NumericValueQualifier | ( | const EnumType | selectedValue,
|  | const OFBool | enhancedEncodingMode = OFFalse )

constructor

Parameters

  selectedValue | type mapped to a coded entry that is selected as the current value
  enhancedEncodingMode | set enhanced encoding mode for coded entry (if enabled)

## Member Function Documentation

## ◆ cleanup()

static void CID42_NumericValueQualifier::cleanup | ( |  | ) |
| static

cleanup this context group, i.e. delete the internal list of standard coded entries.

Usually, there is no need to call this method, but it might be useful in order to explicitly free the associated memory, e.g. when checking for memory leaks. The list will be recreated automatically when needed (or when initialize() is called).

## ◆ findCodedEntry() [1/2]

virtual OFCondition DSRContextGroup::findCodedEntry | ( | const DSRCodedEntryValue & | codedEntryValue | ) | const
| virtual

search for a given coded entry in this context group.

If found, the type of the entry (standard or extension) is returned:

- SR_EC_CodedEntryInStandardContextGroup
- SR_EC_CodedEntryIsExtensionOfContextGroup

Parameters

  codedEntryValue | coded entry to be searched for

Returns
  result of the search process, SR_EC_CodedEntryNotInContextGroup if coded entry could not be found. Use OFCondition::good() or OFCondition::bad() if not interested in the type of the entry.

Reimplemented from DSRContextGroup.

## ◆ findCodedEntry() [2/2]

virtual OFCondition CID42_NumericValueQualifier::findCodedEntry | ( | const DSRCodedEntryValue & | searchForCodedEntry,
|  | DSRCodedEntryValue * | foundCodedEntry,
|  | const OFBool | enhancedEncodingMode = OFFalse ) const
| protected virtual

search for a given coded entry in this context group

Parameters

  searchForCodedEntry | coded entry to be searched for
  foundCodedEntry | pointer to variable that will store the coded entry (if found and pointer is not NULL)
  enhancedEncodingMode | set enhanced encoding mode for coded entry (if enabled)

Returns
  result of the search process, also defines the type of the entry

Reimplemented from DSRContextGroup.

## ◆ getCodedEntry()

static DSRCodedEntryValue CID42_NumericValueQualifier::getCodedEntry | ( | const EnumType | value,
|  | const OFBool | enhancedEncodingMode = OFFalse )
| static

map a given type to the associated coded entry

Parameters

  value | type that should be mapped to a coded entry
  enhancedEncodingMode | set enhanced encoding mode for coded entry (if enabled)

Returns
  coded entry that is associated with the given type

References DSRContextGroup::findCodedEntry(), and DSRContextGroup::selectValue().

## ◆ getCodes()

static CodeList & CID42_NumericValueQualifier::getCodes | ( |  | ) |
| static protected

get list of standard coded entries that are managed by this context group.

Internally, the singleton pattern is used, so the list is initialized only once. Please note that this function is not thread-safe. Therefore, the initialize() function can be called before any instance of this class is actually used.

Returns
  reference to list of coded entries managed by this context group

## ◆ initialize()

static void CID42_NumericValueQualifier::initialize | ( |  | ) |
| static

initialize this context group explicitly.

Internally, the list of standard coded entries is created and initialized by calling getCodes().

Note
  This function can be called multiple times but in case of multi-threaded applications should be called at least once before any instance of this class is actually used. For single-threaded applications, there is no need to call it since the initialization is done implicitly.

## ◆ printCodes()

virtual void CID42_NumericValueQualifier::printCodes | ( | STD_NAMESPACE ostream & | stream | ) | const
| protected virtual

print details on coded entries that are contained in this context group.

See DSRCodedEntryValue::print() for details of the coded entry output.

Parameters

  stream | stream to which the output should be printed

Reimplemented from DSRContextGroup.

## ◆ selectValue() [1/2]

virtual OFCondition DSRContextGroup::selectValue | ( | const DSRCodedEntryValue & | codedEntryValue,
|  | const OFBool | check = OFTrue,
|  | const OFBool | definedContextGroup = OFFalse )
| virtual

select a given coded entry as the current value

Parameters

  codedEntryValue | coded entry to be selected as the current value
  check | if enabled, check 'codedEntryValue' for validity and appropriateness before selecting it as the current value. See checkSelectedValue() for details.
  definedContextGroup | flag indicating whether this context group is used as a baseline (default) or defined context group. The first means that the list of coded entries in this context group is just a suggestion. The latter means that one of the coded entries should be used.

Returns
  status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRContextGroup.

## ◆ selectValue() [2/2]

virtual OFCondition CID42_NumericValueQualifier::selectValue | ( | const EnumType | selectedValue,
|  | const OFBool | enhancedEncodingMode = OFFalse )
| virtual

select a coded entry given by its type as the current value

Parameters

  selectedValue | type mapped to a coded entry that is selected as the current value
  enhancedEncodingMode | set enhanced encoding mode for coded entry (if enabled)

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ setEnhancedEncodingMode()

static OFCondition CID42_NumericValueQualifier::setEnhancedEncodingMode | ( | DSRCodedEntryValue & | codedEntryValue | ) |
| static protected

set the "Enhanced Encoding Mode" for a given coded entry

Parameters

  codedEntryValue | coded entry for which the enhanced encoding mode is set

Returns
  status, EC_Normal if successful, an error code otherwise

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

- dcmsr/include/dcmtk/dcmsr/cmr/cid42.h

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