Loading...
Searching...
No Matches
IODReference Class Reference

Class that represents a reference to another DICOM objects. More...

Inheritance diagram for IODReference:

## Public Types

enum | MAX_LEVEL { LEVEL_INSTANCE , LEVEL_SERIES , LEVEL_STUDY , LEVEL_PATIENT }
| The maximum DICOM entity level that this reference refers to. More...
enum | TYPE { GENERIC , IMAGE , SEGMENT }
| Type of reference. More...

## Public Member Functions

| IODReference ()
| Constructor, creates empty reference, default level is "STUDY".
| IODReference (const MAX_LEVEL level)
| Constructor, creates empty reference with specified level.
virtual | ~IODReference ()
| Destructor.
virtual IODReference * | clone () const
| Create (deep) clone copy of this reference.
virtual TYPE | getType () const
| Get type of reference.
virtual OFCondition | check () const
| Check whether this reference is valid, i.e.
virtual OFString | toString () const
| Returns reference as a one line string.
virtual OFBool | readFromFile (const OFString &filename)
| Initializes this reference from given file, i.e.
virtual OFBool | readFromItem (DcmItem &item)
| Initializes this reference from given item, i.e.
virtual void | clear ()
| Clear all reference data.

## Public Attributes

OFString | m_PatientID
| Patient ID.
OFString | m_StudyInstanceUID
| Study Instance UID.
OFString | m_SeriesInstanceUID
| Series Instance UID.
OFString | m_SOPClassUID
| SOP Class UID.
OFString | m_SOPInstanceUID
| SOP Instance UID.
MAX_LEVEL | m_Level
| Maximum level this reference refers to.

## Detailed Description

Class that represents a reference to another DICOM objects.

DICOM uses different types of references for different purposes: Sometimes only SOP Class UID and SOP Instance UID are required, sometimes also Series and Study Instance UIDs. Also, in different IOD modules and macros DICOM uses different attributes to store those references in objects. Sometimes the same references are even required in different structures within the same object. This class can carry identifiers for Patient, Study, Series and Instance level and can be passed around in order to write them as required into the attribute structures needed by a specific DIOCM IOD, module or macro.

## Member Enumeration Documentation

## MAX_LEVEL

enum IODReference::MAX_LEVEL

The maximum DICOM entity level that this reference refers to.

This is mostly used in order to check whether a reference is complete or not.

Enumerator
LEVEL_INSTANCE | Instance Level.
LEVEL_SERIES | Series Level.
LEVEL_STUDY | Study level.
LEVEL_PATIENT | Patient level.

## TYPE

enum IODReference::TYPE

Type of reference.

Enumerator
GENERIC | Generic (or unknown).
IMAGE | Reference to an image object, see also class IODImageReference.
SEGMENT | Reference to a segmentation object, see also class IDOSegmentationReference.

## Constructor & Destructor Documentation

## IODReference()

IODReference::IODReference | ( | const MAX_LEVEL | level | ) |

Constructor, creates empty reference with specified level.

Parameters

  level | The reference level

## Member Function Documentation

## check()

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

virtual

Check whether this reference is valid, i.e.

complete related to its level. Also in case of UIDs it is checked whether they conform to the UI Value Representation definition.

Returns
  EC_Normal if reference is valid, error otherwise

## clone()

virtual IODReference * IODReference::clone | ( |  | ) | const

virtual

Create (deep) clone copy of this reference.

Returns
  Returns eep copy of this reference or NULL in case of error

Reimplemented in IODImageReference, and IODSegmentationReference.

References IODReference().

## getType()

virtual TYPE IODReference::getType | ( |  | ) | const

inline virtual

Get type of reference.

Base class always returns "GENERIC"

Returns
  Returns "GENERIC" type

Reimplemented in IODImageReference, and IODSegmentationReference.

References GENERIC.

## readFromFile()

virtual OFBool IODReference::readFromFile | ( | const OFString & | filename | ) |

virtual

Initializes this reference from given file, i.e.

extracts all identifiers up to the level defined for this reference.

Parameters

  filename | The file to read from

Returns
  Returns OFTrue if reference could be read, otherwise OFFalse

Reimplemented in IODImageReference, and IODSegmentationReference.

## readFromItem()

virtual OFBool IODReference::readFromItem | ( | DcmItem & | item | ) |

virtual

Initializes this reference from given item, i.e.

extracts all identifiers up to the level defined for this reference.

Parameters

  item | The item to read from

Returns
  Returns OFTrue if reference could be read, otherwise OFFalse

## toString()

virtual OFString IODReference::toString | ( |  | ) | const

virtual

Returns reference as a one line string.

Mostly useful for debugging.

Returns
  Reference as a string.

## Member Data Documentation

## m_Level

MAX_LEVEL IODReference::m_Level

Maximum level this reference refers to.

E.g. for level SERIES, only Series, SOP Instance and SOP Class UID must be provided. However,

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

- dcmiod/include/dcmtk/dcmiod/iodreferences.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0