DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Attributes | Static Private Attributes | List of all members
FGRealWorldValueMapping Class Reference

Class representing the Real World Value Mapping Functional Group that specifies the mapping of stored values to associated Real World values. More...

Inheritance diagram for FGRealWorldValueMapping:

## Public Member Functions
| FGRealWorldValueMapping ()
| Constructor, creates empty functional group.
virtual | ~FGRealWorldValueMapping ()
| Destructor, frees memory.
virtual FGBase * | clone () const
| Returns a deep copy of this object. More...
virtual DcmFGTypes::E_FGSharedType | getSharedType () const
| Returns that this functional group can be used as both, shared and per-frame. More...
virtual void | clearData ()
| Clear all data.
virtual OFCondition | check () const
| Check whether data of functional group is valid. More...
virtual OFCondition | read (DcmItem &item)
| Read functional group from item, must contain the Real World Value Mapping Sequence. More...
virtual OFCondition | write (DcmItem &item)
| Writes this functional group to item, i.e. will write the Real World Value Mapping Sequence. More...
virtual OFVector< RWVMItem * > & | getRealWorldValueMapping ()
| Return references to the various items inside the Real World Value Mapping Sequence. More...
virtual int | compare (const FGBase &rhs) const
| Comparison operator that compares the normalized value of this object with a given object of the same type, i.e. the elements within both functional groups (this and rhs parameter) are compared by value! Both objects (this and rhs) need to have the same type (i.e. both FGUnknown) to be comparable. More...
| RWVMItem (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules, IODComponent *parent=NULL)
| Constructor. More...
| RWVMItem (IODComponent *parent=NULL)
| Constructor. More...
| RWVMItem (const RWVMItem &rhs)
| Copy Constructor. More...
RWVMItem * | clone ()
| Clone this class (perform deep copy) More...
virtual | ~RWVMItem ()
| Virtual destructor, frees memory.
virtual void | resetRules ()
| Resets rules to their original values.
virtual OFString | getName () const
| Get name of component. More...
virtual int | compare (const IODComponent &rhs) const
| Comparison operator that compares the normalized value of this object with a given object of the same type, i.e. the elements within both functional groups (this and rhs parameter) are compared by value! Both objects (this and rhs) need to have the same type (i.e. both FGUnknown) to be comparable. 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 | getRealWorldValueFirstValueMapped (Sint32 &value, const unsigned long pos=0) const
| Get Real World Value First Value Mapped. More...
virtual OFCondition | getRealWorldValueLastValueMapped (Sint32 &value, const unsigned long pos=0) const
| Get Real World Value First Value Mapped. More...
virtual OFCondition | getDoubleFloatRealWorldValueFirstValueMapped (Float64 &value, const unsigned long pos=0) const
| Get Double Float Real World Value First Value Mapped. More...
virtual OFCondition | getDoubleFloatRealWorldValueLastValueMapped (Float64 &value, const unsigned long pos=0) const
| Get Double Float Real World Value Last Value Mapped. More...
virtual OFCondition | getRealWorldValueLUTData (Float64 &value, const unsigned long pos=0) const
| Get Real World Value LUT Data. More...
virtual OFCondition | getRealWorldValueLUTData (OFVector< Float64 > &values) const
| Get Real World Value LUT Data. More...
virtual OFCondition | getLUTExplanation (OFString &value, const signed long pos=0) const
| Get LUT Explanation. More...
virtual OFCondition | getLUTLabel (OFString &value, const signed long pos=0) const
| Get LUT Label. More...
virtual CodeSequenceMacro & | getMeasurementUnitsCode ()
| Get Measurement Units Code Sequence (content) More...
virtual OFVector< ContentItemMacro * > & | getEntireQuantityDefinitionSequence ()
| Get a reference to the entire ConceptNameCodeSequence, including items exceeding the value multiplicity restriction of "1". More...
virtual OFCondition | setRealWorldValueFirstValueMappedUnsigned (const Uint16 value, const OFBool checkValue=OFTrue)
| Set Real World Value First Value Mapped. More...
virtual OFCondition | setRealWorldValueFirstValueMappedSigned (const Sint16 &value, const OFBool checkValue=OFTrue)
| Set Real World Value First Value Mapped. More...
virtual OFCondition | setRealWorldValueLastValueMappedUnsigned (const Uint16 value, const OFBool checkValue=OFTrue)
| Set Real World Value Last Value Mapped. More...
virtual OFCondition | setRealWorldValueLastValueMappedSigned (const Sint16 &value, const OFBool checkValue=OFTrue)
| Set Real World Value Last Value Mapped. More...
virtual OFCondition | setDoubleFloatRealWorldValueFirstValueMapped (const Float64 value, const OFBool checkValue=OFTrue)
| Set Double Float Real World Value First Value Mapped. More...
virtual OFCondition | setDoubleFloatRealWorldValueLastValueMapped (const Float64 value, const OFBool checkValue=OFTrue)
| Set Double Float Real World Value Last Value Mapped. More...
virtual OFCondition | setRealWorldValueIntercept (const Float64 value, const OFBool checkValue=OFTrue)
| Set Real World Value Intercept. More...
virtual OFCondition | setRealWorldValueSlope (const Float64 value, const OFBool checkValue=OFTrue)
| Set Real World Value Slope. More...
virtual OFCondition | setRealWorldValueLUTData (const OFVector< Float64 > &value, const OFBool checkValue=OFTrue)
| Set Real World Value LUT Data. More...
virtual OFCondition | setLUTExplanation (const OFString &value, const OFBool checkValue=OFTrue)
| Set LUT Explanation. More...
virtual OFCondition | setLUTLabel (const OFString &value, const OFBool checkValue=OFTrue)
| Set LUT Label. More...
Public Member Functions inherited from FGBase
| FGBase (const DcmFGTypes::E_FGType fgType)
| Constructor, creates new functional group of given type. More...
virtual DcmFGTypes::E_FGType | getType () const
| Return the type of this functional group. More...
virtual | ~FGBase ()
| Virtual destructor.

## Private Attributes
OFVector< RWVMItem * > | m_Items
| Items (1-n) of Real World Value Mapping Sequence.
CodeSequenceMacro | m_MeasurementUnitsCode
| Measurement Units Code Sequence.
OFVector< ContentItemMacro * > | m_QuantityDefinitionSequence
| Quantity Definition Sequence.

## Static Private Attributes
static const OFString | m_ModuleName
| The name of this module ("RealWorldValueMappingItemMacro")

## Additional Inherited Members
Protected Member Functions inherited from FGBase
virtual OFCondition | getItemFromFGSequence (DcmItem &source, const DcmTagKey &seqKey, const unsigned long itemNum, DcmItem *&result)
| Get the item containing the payload of a functional group sequence, identified by the functional group's sequence key provided and the desired item number. More...
virtual OFCondition | getNumItemsFromFGSequence (DcmItem &source, const DcmTagKey &seqKey, unsigned long &result)
| Get number of items in a functional group sequence, identified by the functional group's sequence key. More...
virtual OFCondition | createNewFGSequence (DcmItem &destination, const DcmTagKey &seqKey, const unsigned long numItems, DcmItem *&firstItem)
| Create functional group sequence specified by given sequence tag key. More...

## Detailed Description

Class representing the Real World Value Mapping Functional Group that specifies the mapping of stored values to associated Real World values.

Class representing the Real World Value Mapping Item Macro: Attribute name: (VR, VM, Requirement Type) Real World Value First Value Mapped: (US or SS, 1, 1) Real World Value Last Value Mapped: (US or SS, 1, 1) Real World Value Intercept: (FD, 1, 1C) Real World Value Slope: (FD, 1, 1C) Real World Value LUT Data (FD, 1-n, 1C) LUT Explanation (LO, 1, 1) LUT Label (SH, 1, 1) Measurement Units Code Sequence (SQ, 1, 1) Quantity Definition Sequence (SQ, 1, 3)

## Member Function Documentation

## ◆ check()

virtual OFCondition FGRealWorldValueMapping::check | ( |  | ) | const
| virtual

Check whether data of functional group is valid.

Returns
  EC_Normal if data is valid, error otherwise

Implements FGBase.

## ◆ clone() [1/2]

RWVMItem* FGRealWorldValueMapping::clone | ( |  | ) |

Clone this class (perform deep copy)

Returns
  Clone of this class or NULL (e.g. if memory exhausted)

## ◆ clone() [2/2]

virtual FGBase* FGRealWorldValueMapping::clone | ( |  | ) | const
| virtual

Returns a deep copy of this object.

Returns
  Deep copy of this object

Implements FGBase.

## ◆ compare() [1/2]

virtual int FGRealWorldValueMapping::compare | ( | const FGBase & | rhs | ) | const
| virtual

Comparison operator that compares the normalized value of this object with a given object of the same type, i.e. the elements within both functional groups (this and rhs parameter) are compared by value! Both objects (this and rhs) need to have the same type (i.e. both FGUnknown) to be comparable.

This function is used in order to decide whether a functional group already exists, or is new. This is used in particular to find out whether a given functional group can be shared (i.e. the same information already exists as shared functional group) or is different from the same shared group. In that case the shared functional group must be distributed into per-frame functional groups, instead. The exact implementation for implementing the comparison is not relevant. However, it must be a comparison by value.

Parameters

  rhs | the right hand side of the comparison

Returns
  0 if the object values are equal. -1 if either the value of the first component that does not match is lower in the this object, or all compared components match but this component is shorter. Also returned if this type and rhs type (DcmFGTypes::E_FGType) do not match. 1 if either the value of the first component that does not match is greater in this object, or all compared components match but this component is longer.

Implements FGBase.

## ◆ compare() [2/2]

virtual int FGRealWorldValueMapping::compare | ( | const IODComponent & | rhs | ) | const
| virtual

Comparison operator that compares the normalized value of this object with a given object of the same type, i.e. the elements within both functional groups (this and rhs parameter) are compared by value! Both objects (this and rhs) need to have the same type (i.e. both FGUnknown) to be comparable.

This function is used in order to decide whether a functional group already exists, or is new. This is used in particular to find out whether a given functional group can be shared (i.e. the same information already exists as shared functional group) or is different from the same shared group. In that case the shared functional group must be distributed into per-frame functional groups, instead. The exact implementation for implementing the comparison is not relevant. However, it must be a comparison by value.

Parameters

  rhs | the right hand side of the comparison

Returns
  0 if the object values are equal. -1 if either the value of the first component that does not match is lower in the this object, or all compared components match but this component is shorter. Also returned if this type and rhs type (DcmFGTypes::E_FGType) do not match. 1 if either the value of the first component that does not match is greater in this object, or all compared components match but this component is longer.

## ◆ getDoubleFloatRealWorldValueFirstValueMapped()

virtual OFCondition FGRealWorldValueMapping::getDoubleFloatRealWorldValueFirstValueMapped | ( | Float64 & | value,
|  | const unsigned long | pos = `0`
| ) |  | const
| virtual

Get Double Float Real World Value First Value Mapped.

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index of the value to get (0..vm-1)

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getDoubleFloatRealWorldValueLastValueMapped()

virtual OFCondition FGRealWorldValueMapping::getDoubleFloatRealWorldValueLastValueMapped | ( | Float64 & | value,
|  | const unsigned long | pos = `0`
| ) |  | const
| virtual

Get Double Float Real World Value Last Value Mapped.

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index of the value to get (0..vm-1)

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getEntireQuantityDefinitionSequence()

virtual OFVector<ContentItemMacro*>& FGRealWorldValueMapping::getEntireQuantityDefinitionSequence | ( |  | ) |
| virtual

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

Returns
  a reference to the entire ConceptNameCodeSequence

## ◆ getLUTExplanation()

virtual OFCondition FGRealWorldValueMapping::getLUTExplanation | ( | OFString & | value,
|  | const signed long | pos = `0`
| ) |  | const
| virtual

Get LUT Explanation.

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index of the value to get (0..vm-1)

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getLUTLabel()

virtual OFCondition FGRealWorldValueMapping::getLUTLabel | ( | OFString & | value,
|  | const signed long | pos = `0`
| ) |  | const
| virtual

Get LUT Label.

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index of the value to get (0..vm-1)

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getMeasurementUnitsCode()

virtual CodeSequenceMacro& FGRealWorldValueMapping::getMeasurementUnitsCode | ( |  | ) |
| virtual

Get Measurement Units Code Sequence (content)

Returns
  Reference to Measurement Units Code

## ◆ getName()

virtual OFString FGRealWorldValueMapping::getName | ( |  | ) | const
| virtual

Get name of component.

Returns
  Name of the module

## ◆ getRealWorldValueFirstValueMapped()

virtual OFCondition FGRealWorldValueMapping::getRealWorldValueFirstValueMapped | ( | Sint32 & | value,
|  | const unsigned long | pos = `0`
| ) |  | const
| virtual

Get Real World Value First Value Mapped.

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index of the value to get (0..vm-1)

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getRealWorldValueLastValueMapped()

virtual OFCondition FGRealWorldValueMapping::getRealWorldValueLastValueMapped | ( | Sint32 & | value,
|  | const unsigned long | pos = `0`
| ) |  | const
| virtual

Get Real World Value First Value Mapped.

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index of the value to get (0..vm-1)

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getRealWorldValueLUTData() [1/2]

virtual OFCondition FGRealWorldValueMapping::getRealWorldValueLUTData | ( | Float64 & | value,
|  | const unsigned long | pos = `0`
| ) |  | const
| virtual

Get Real World Value LUT Data.

Parameters

  value | Reference to variable in which the value should be stored
  pos | Index of the value to get (0..vm-1)

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getRealWorldValueLUTData() [2/2]

virtual OFCondition FGRealWorldValueMapping::getRealWorldValueLUTData | ( | OFVector< Float64 > & | values | ) | const
| virtual

Get Real World Value LUT Data.

Parameters

  values | Reference to variable in which the values should be stored

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getRealWorldValueMapping()

virtual OFVector<RWVMItem*>& FGRealWorldValueMapping::getRealWorldValueMapping | ( |  | ) |
| virtual

Return references to the various items inside the Real World Value Mapping Sequence.

Returns
  Reference to Real World Value Mapping Sequence items

## ◆ getSharedType()

virtual DcmFGTypes::E_FGSharedType FGRealWorldValueMapping::getSharedType | ( |  | ) | const
| inline virtual

Returns that this functional group can be used as both, shared and per-frame.

Returns
  Always returns DcmFGTypes::EFGS_BOTH

Implements FGBase.

References DcmFGTypes::EFGS_BOTH.

## ◆ read() [1/2]

virtual OFCondition FGRealWorldValueMapping::read | ( | DcmItem & | item | ) |
| virtual

Read functional group from item, must contain the Real World Value Mapping Sequence.

Parameters

  item | The item to read from

Returns
  EC_Normal if reading was successful, error otherwise

Implements FGBase.

## ◆ read() [2/2]

virtual OFCondition FGRealWorldValueMapping::read | ( | DcmItem & | source,
|  | const OFBool | clearOldData = `OFTrue`
| ) |  |
| virtual

Read attributes from given item into this class.

Parameters

  source | The source to read from
  clearOldData | If OFTrue, old data is cleared before reading. Otherwise old data is overwritten (or amended)

Returns
  EC_Normal if reading was successful, error otherwise

## ◆ RWVMItem() [1/3]

FGRealWorldValueMapping::RWVMItem | ( | const RWVMItem & | rhs | ) |

Copy Constructor.

Parameters

  rhs | The item to copy from

## ◆ RWVMItem() [2/3]

FGRealWorldValueMapping::RWVMItem | ( | IODComponent * | parent = `NULL` | ) |

Constructor.

Parameters

  parent | The parent of the IOD component (NULL if none or unknown)

## ◆ RWVMItem() [3/3]

FGRealWorldValueMapping::RWVMItem | ( | OFshared_ptr< DcmItem > | item,
|  | OFshared_ptr< IODRules > | rules,
|  | IODComponent * | parent = `NULL`
| ) |  |

Constructor.

Parameters

  item | The item to be used for data storage. If NULL, the class creates an empty data container.
  rules | The rule set for this class. If NULL, the class creates one from scratch and adds its values.
  parent | The parent of the IOD component (NULL if none or unknown)

## ◆ setDoubleFloatRealWorldValueFirstValueMapped()

virtual OFCondition FGRealWorldValueMapping::setDoubleFloatRealWorldValueFirstValueMapped | ( | const Float64 | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Double Float Real World Value First Value Mapped.

Parameters

  value | Value to be set
  checkValue | Check 'value'. Does nothing, only for consistency with other set() functions.

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setDoubleFloatRealWorldValueLastValueMapped()

virtual OFCondition FGRealWorldValueMapping::setDoubleFloatRealWorldValueLastValueMapped | ( | const Float64 | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Double Float Real World Value Last Value Mapped.

Parameters

  value | Value to be set
  checkValue | Check 'value'. Does nothing, only for consistency with other set() functions.

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setLUTExplanation()

virtual OFCondition FGRealWorldValueMapping::setLUTExplanation | ( | const OFString & | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set LUT Explanation.

Parameters

  value | Value to be set
  checkValue | Check 'value' for conformance with VR (LO) and VM (1) if enabled

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setLUTLabel()

virtual OFCondition FGRealWorldValueMapping::setLUTLabel | ( | const OFString & | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set LUT Label.

Parameters

  value | Value to be set
  checkValue | Check 'value' for conformance with VR (SH) and VM (1) if enabled

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setRealWorldValueFirstValueMappedSigned()

virtual OFCondition FGRealWorldValueMapping::setRealWorldValueFirstValueMappedSigned | ( | const Sint16 & | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Real World Value First Value Mapped.

Parameters

  value | Value to be set. If Pixel Representation is -1 (signed pixel data) value must be -2^15 < value < 2^15-1. Otherwise use setRealWorldValueFirstValueMappedUnsigned().
  checkValue | Check 'value'. Not evaluated (here for consistency with other setter functions).

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setRealWorldValueFirstValueMappedUnsigned()

virtual OFCondition FGRealWorldValueMapping::setRealWorldValueFirstValueMappedUnsigned | ( | const Uint16 | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Real World Value First Value Mapped.

Parameters

  value | Value to be set. If Pixel Representation is 0 (unsigned pixel data) value must be 0 < value < 2^16. Otherwise use setRealWorldValueFirstValueMappedSigned().
  checkValue | Check 'value' for conformance with VR (US and VM (1) if enabled

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setRealWorldValueIntercept()

virtual OFCondition FGRealWorldValueMapping::setRealWorldValueIntercept | ( | const Float64 | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Real World Value Intercept.

Parameters

  value | Value to be set
  checkValue | Check 'value'. Not evaluated (here for consistency with other setter functions).

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setRealWorldValueLastValueMappedSigned()

virtual OFCondition FGRealWorldValueMapping::setRealWorldValueLastValueMappedSigned | ( | const Sint16 & | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Real World Value Last Value Mapped.

Parameters

  value | Value to be set. If Pixel Representation is -1 (signed pixel data) value must be -2^15 < value < 2^15-1. Otherwise use setRealWorldValueLastValueMappedUnsigned().
  checkValue | Check 'value'. Not evaluated (here for consistency with other setter functions).

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setRealWorldValueLastValueMappedUnsigned()

virtual OFCondition FGRealWorldValueMapping::setRealWorldValueLastValueMappedUnsigned | ( | const Uint16 | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Real World Value Last Value Mapped.

Parameters

  value | Value to be set. If Pixel Representation is 0 (unsigned pixel data) value must be 0 < value < 2^16. Otherwise use setRealWorldValueLastValueMappedSigned().
  checkValue | Check 'value' for conformance with VR (US and VM (1) if enabled

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setRealWorldValueLUTData()

virtual OFCondition FGRealWorldValueMapping::setRealWorldValueLUTData | ( | const OFVector< Float64 > & | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Real World Value LUT Data.

Parameters

  value | Values to be set
  checkValue | Check 'value' for conformance with VR (FD) and VM (1-n) if enabled

Returns
  EC_Normal if successful, an error code otherwise

## ◆ setRealWorldValueSlope()

virtual OFCondition FGRealWorldValueMapping::setRealWorldValueSlope | ( | const Float64 | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Real World Value Slope.

Parameters

  value | Value to be set
  checkValue | Check 'value'. Not evaluated (here for consistency with other setter functions).

Returns
  EC_Normal if successful, an error code otherwise

## ◆ write() [1/2]

virtual OFCondition FGRealWorldValueMapping::write | ( | DcmItem & | destination | ) |
| virtual

Write attributes from this class into given item.

Parameters

  destination | The item to write to

Returns
  EC_Normal if writing was successful, error otherwise

Implements FGBase.

## ◆ write() [2/2]

virtual OFCondition FGRealWorldValueMapping::write | ( | DcmItem & | item | ) |
| virtual

Writes this functional group to item, i.e. will write the Real World Value Mapping Sequence.

Parameters

  item | The item to read from

Returns
  EC_Normal if reading was successful, error otherwise

Implements FGBase.

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

- dcmfg/include/dcmtk/dcmfg/fgrealworldvaluemapping.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1