DCMTK Version 3.7.0 OFFIS DICOM Toolkit

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

Class representing the Image SOP Instance Reference Macro. More...

Inheritance diagram for ImageSOPInstanceReferenceMacro:

## Public Member Functions
| ImageSOPInstanceReferenceMacro ()
| Constructor.
virtual | ~ImageSOPInstanceReferenceMacro ()
| Virtual Destructor.
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. More...
virtual void | clear ()
| Clear data.
virtual OFCondition | read (DcmItem &source, const OFBool clearOldData=OFTrue)
| Read Image SOP Instance Reference Macro from given item. More...
virtual OFCondition | write (DcmItem &item)
| Write Image SOP Instance Reference Macrom to given item. More...
virtual OFCondition | getReferencedFrameNumber (OFVector< Uint16 > &values)
| Get Referenced Frame Number. More...
virtual OFCondition | getReferencedSegmentNumber (OFVector< Uint16 > &values)
| Get Referenced Segment Number. More...
virtual OFCondition | setReferencedFrameNumber (const OFVector< Uint16 > &values, const OFBool checkValue=OFTrue)
| Set Referenced Frame Number. More...
virtual OFCondition | addReferencedFrameNumber (const Uint16 &value, const OFBool checkValue=OFTrue)
| Add a Referenced Frame Number. More...
virtual OFCondition | setReferencedSegmentNumber (const OFVector< Uint16 > &values, const OFBool checkValue=OFTrue)
| Set the Referenced Segment Numbers. More...
virtual OFCondition | addReferencedSegmentNumber (const Uint16 &value, const OFBool checkValue=OFTrue)
| Add a Referenced Segment Number. More...
Public Member Functions inherited from SOPInstanceReferenceMacro
| SOPInstanceReferenceMacro (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules, IODComponent *parent=NULL)
| Constructor. More...
| SOPInstanceReferenceMacro (IODComponent *parent=NULL)
| Constructor. More...
virtual | ~SOPInstanceReferenceMacro ()
| Virtual Destructor.
virtual void | resetRules ()
| Resets rules to their original values.
virtual OFString | getName () const
| Get name of macro. More...
virtual OFCondition | getReferencedSOPClassUID (OFString &value, const signed long pos=0)
| Get Referenced SOP Class UID. More...
virtual OFCondition | getReferencedSOPInstanceUID (OFString &value, const signed long pos=0)
| Get Referenced SOP Instance UID. More...
virtual OFCondition | setReferencedSOPClassUID (const OFString &value, const OFBool checkValue=OFTrue)
| Set Referenced SOP Class UID. More...
virtual OFCondition | setReferencedSOPInstanceUID (const OFString &value, const OFBool checkValue=OFTrue)
| Set Referenced SOP Instance UID. More...
Public Member Functions inherited from IODComponent
| IODComponent (OFshared_ptr< DcmItem > item, OFshared_ptr< IODRules > rules, IODComponent *parent=NULL)
| Constructor. More...
| IODComponent (IODComponent *parent=NULL)
| Constructor, creates rules and item from scratch. More...
IODComponent & | operator= (const IODComponent &rhs)
| Assignment operator, copies contained item and rule set from rhs to "this" attribute set. More...
| IODComponent (const IODComponent &rhs)
| Copy constructor, copies reference to contained item and rule set to "this" attribute set. More...
virtual | ~IODComponent ()
| Virtual Destructor.
virtual void | clearData ()
| Clear all attributes from the data that are handled by this module. More...
virtual void | inventMissing ()
| Set missing values by inventing "default values". More...
OFshared_ptr< IODRules > | getRules ()
| Get rules handled by this module. More...
virtual void | makeOptional ()
| Make component optional by turning all attributes requirement types of it to type 3. More...
DcmItem & | getData ()
| Get the data handled by this module. More...
virtual OFCondition | check (const OFBool quiet=OFFalse)
| Check whether this component's data satisfies the underlying rules. More...
virtual bool | getValueCheckOnWrite () const
| Get whether attribute value errors will be handled as errors on writing. More...
virtual void | setValueCheckOnWrite (const OFBool checkValue)
| Set whether attribute values should be checked on writing, i.e. More...

## Static Public Member Functions
static OFCondition | create (const OFString &sopClassUID, const OFString &sopInstanceUID, ImageSOPInstanceReferenceMacro *&result)
| Creates an ImageSOPInstanceReferenceMacro object without frame/segment reference from required information. More...
static OFCondition | create (const OFString &sopClassUID, const OFString &sopInstanceUID, const OFVector< Uint16 > &refFramesOrSegments, ImageSOPInstanceReferenceMacro *&result)
| Creates an ImageSOPInstanceReferenceMacro object with frame or segment references from required information. More...
Static Public Member Functions inherited from IODComponent
static OFCondition | read (DcmItem &source, IODRules &rules, DcmItem &destination, const OFString &componentName)
| Static helper function that reads attributes from given item into destination item, as determined by the provided rules and component name. More...
static OFCondition | write (DcmItem &source, IODRules &rules, DcmItem &destination, const OFString &componentName, const OFBool checkValue)
| Static helper function that writes attributes from given item into destination item, as determined by the provided rules and component name. More...

## Private Attributes
DcmIntegerString | ReferencedFrameNumber
| Referenced Frame Number: (IS, 1-n, 1C)
DcmUnsignedShort | ReferencedSegmentNumber
| Referenced Segment Number: (US, 1-n, 1C)

## Additional Inherited Members
Protected Attributes inherited from IODComponent
OFshared_ptr< DcmItem > | m_Item
| Shared pointer to the data handled by this class. More...
OFshared_ptr< IODRules > | m_Rules
| Rules describing the attributes governed by this class.
IODComponent * | m_Parent
| The parent component (may be NULL) of this class.
OFBool | m_CheckValueOnWrite
| Denotes whether attribute values should be checked on writing, i.e. More...

## Detailed Description

Class representing the Image SOP Instance Reference Macro.

## Member Function Documentation

## ◆ addReferencedFrameNumber()

virtual OFCondition ImageSOPInstanceReferenceMacro::addReferencedFrameNumber | ( | const Uint16 & | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Add a Referenced Frame Number.

Parameters

  value | The frame number to add
  checkValue | If OFTrue, consistency checks are performed (as possible)

Returns
  EC_Normal if successful, error otherwise

## ◆ addReferencedSegmentNumber()

virtual OFCondition ImageSOPInstanceReferenceMacro::addReferencedSegmentNumber | ( | const Uint16 & | value,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Add a Referenced Segment Number.

Parameters

  value | The segment number to add
  checkValue | If OFTrue, consistency checks are performed (as possible)

Returns
  EC_Normal if successful, error otherwise

## ◆ compare()

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

Comparison operator that compares the normalized value of this object with a given object of the same type.

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 rhs object, or all compared components match but the rhs component is shorter. Also returned if rhs cannot be casted to DcmAttributeTag. 1 if either the value of the first component that does not match is greater in the rhs object, or all compared components match but the rhs component is longer.

Reimplemented from IODComponent.

## ◆ create() [1/2]

static OFCondition ImageSOPInstanceReferenceMacro::create | ( | const OFString & | sopClassUID,
|  | const OFString & | sopInstanceUID,
|  | const OFVector< Uint16 > & | refFramesOrSegments,
|  | ImageSOPInstanceReferenceMacro *& | result
| ) |  |
| static

Creates an ImageSOPInstanceReferenceMacro object with frame or segment references from required information.

Parameters

  sopClassUID | The SOP Class UID of the reference
  sopInstanceUID | The SOP Instance UID of the reference
  refFramesOrSegments | Reference to specific frames of an image or segments of a Segmentation object. The decision (image or segmentation) is based on the SOP Class; in case it is the Segmentation Storage SOP Class, the parameter is interpreted as segment references, otherwise as frame references. If this parameter is provided empty, then no frame/segment reference is set at all.
  result | Returns the resulting object if successful, NULL otherwise

Returns
  EC_Normal if creation was successful, error code otherwise

## ◆ create() [2/2]

static OFCondition ImageSOPInstanceReferenceMacro::create | ( | const OFString & | sopClassUID,
|  | const OFString & | sopInstanceUID,
|  | ImageSOPInstanceReferenceMacro *& | result
| ) |  |
| static

Creates an ImageSOPInstanceReferenceMacro object without frame/segment reference from required information.

Parameters

  sopClassUID | The SOP Class UID of the reference
  sopInstanceUID | The SOP Instance UID of the reference
  result | Returns the resulting object if successful, NULL otherwise

Returns
  EC_Normal if creation was successful, error code otherwise

## ◆ getReferencedFrameNumber()

virtual OFCondition ImageSOPInstanceReferenceMacro::getReferencedFrameNumber | ( | OFVector< Uint16 > & | values | ) |
| virtual

Get Referenced Frame Number.

Parameters

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

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getReferencedSegmentNumber()

virtual OFCondition ImageSOPInstanceReferenceMacro::getReferencedSegmentNumber | ( | OFVector< Uint16 > & | values | ) |
| virtual

Get Referenced Segment Number.

Parameters

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

Returns
  EC_Normal if successful, an error code otherwise

## ◆ read()

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

Read Image SOP Instance Reference Macro from given item.

Parameters

  source | The item to read from
  clearOldData | If OFTrue (default), old data is cleared before reading

Returns
  EC_Normal if successful, error otherwise

Reimplemented from IODComponent.

## ◆ setReferencedFrameNumber()

virtual OFCondition ImageSOPInstanceReferenceMacro::setReferencedFrameNumber | ( | const OFVector< Uint16 > & | values,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set Referenced Frame Number.

Parameters

  values | The frame numbers that should be referenced
  checkValue | If OFTrue (default) the given values will be checked

Returns
  EC_Normal if successful, error otherwise

## ◆ setReferencedSegmentNumber()

virtual OFCondition ImageSOPInstanceReferenceMacro::setReferencedSegmentNumber | ( | const OFVector< Uint16 > & | values,
|  | const OFBool | checkValue = `OFTrue`
| ) |  |
| virtual

Set the Referenced Segment Numbers.

Parameters

  values | The segment numbers to add
  checkValue | If OFTrue, consistency checks are performed (as possible)

Returns
  EC_Normal if successful, error otherwise

## ◆ write()

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

Write Image SOP Instance Reference Macrom to given item.

Parameters

  item | The item to write to

Returns
  EC_Normal if successful, error otherwise

Reimplemented from IODComponent.

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

- dcmiod/include/dcmtk/dcmiod/iodmacro.h

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