DCMTK: ImageSOPInstanceReferenceMacro Class Reference

DCMTK Version 3.6.9 OFFIS DICOM Toolkit

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

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

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

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

References IODComponent::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

References ImageSOPInstanceReferenceMacro().

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

References ImageSOPInstanceReferenceMacro().

## ◆ 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 Wed Apr 30 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2