DCMTK: DerivationImageItem 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
DerivationImageItem Class Reference

Class representing a single item in Derivation Image Sequence. More...

## Public Member Functions
| DerivationImageItem ()
| Constructor, initializes empty derivation image item.
virtual | ~DerivationImageItem ()
| Virtual destructor.
DerivationImageItem & | operator= (const DerivationImageItem &rhs)
| Assignment operator, deletes old data.
| DerivationImageItem (const DerivationImageItem &rhs)
| Copy constructor, deletes old data.
virtual int | compare (const DerivationImageItem &rhs) const
| Comparison operator that compares the normalized value of this object with a given object of the same type.
virtual void | clearData ()
| Clears all data handled by this component.
virtual OFCondition | check () const
| Check whether item contains valid data.
virtual OFCondition | addSourceImageItem (const OFString &file, const CodeSequenceMacro &purposeOfReference, SourceImageItem *&resultSourceImageItem)
| Convenience function to add item representing reference to an object.
virtual OFCondition | addSourceImageItem (DcmItem *dataset, const CodeSequenceMacro &purposeOfReference, SourceImageItem *&resultSourceImageItem)
| Convenience function to add item representing reference to an object.
virtual OFCondition | addSourceImageItems (const OFVector< OFString > &files, const CodeSequenceMacro &purposeOfReference, OFVector< SourceImageItem * > &resultSourceImageItems, const OFBool skipFileErrors=OFFalse)
| Convenience function to add items representing references to some objects which all have the same purpose of reference (code).
virtual OFCondition | addSourceImageItems (const OFVector< DcmItem * > &datasets, const CodeSequenceMacro &purposeOfReference, OFVector< SourceImageItem * > &resultSourceImageItems, const OFBool skipErrors=OFFalse)
| Convenience function to add items representing references to some objects which all have the same purpose of reference (code).
virtual OFCondition | getDerivationDescription (OFString &value, const signed long pos=0) const
| Get Derivation Description.
virtual OFVector< CodeSequenceMacro * > & | getDerivationCodeItems ()
| Get reference to derivation code items.
virtual OFVector< SourceImageItem * > & | getSourceImageItems ()
| Get reference to source image items.
virtual OFCondition | setDerivationDescription (const OFString &value, const OFBool checkValue=OFTrue)
| Set Derivation Description.
virtual OFCondition | read (DcmItem &itemOfDerivationImageSequence, const OFBool clearOldData=OFTrue)
| Read Derivation Image Sequence Item describing derivation from a set of images.
virtual OFCondition | write (DcmItem &itemOfDerivationImageSequence)
| Write Derivation Image Sequence Item describing derivation from a set of images.

## Static Public Member Functions
static OFCondition | getSOPInfoFromItem (DcmItem *dataset, OFString &sopClassUID, OFString &sopInstanceUID)
| Get SOP Class and SOP Instance UID from given item.

## Private Attributes
DcmShortText | m_DerivationDescription
| Derivation Description: (ST, 1, 3)
OFVector< CodeSequenceMacro * > | m_DerivationCodeItems
| List of derivation codes for this set of images (1-n items permitted)

## Detailed Description

Class representing a single item in Derivation Image Sequence.

## Constructor & Destructor Documentation

## ◆ DerivationImageItem()

DerivationImageItem::DerivationImageItem | ( | const DerivationImageItem & | rhs | ) |

Copy constructor, deletes old data.

Parameters

  rhs | The item that should be used for initialization

References DerivationImageItem().

## Member Function Documentation

## ◆ addSourceImageItem() [1/2]

virtual OFCondition DerivationImageItem::addSourceImageItem | ( | const OFString & | file,
|  | const CodeSequenceMacro & | purposeOfReference,
|  | SourceImageItem *& | resultSourceImageItem )
| virtual

Convenience function to add item representing reference to an object.

No restrictions are set which frames or segments from this image has been actually used. However, such information could be added to the source image item later by modifying the resulting item being handed back to the caller.

Parameters

  file | Files that should be referenced by their UID, must be readable.
  purposeOfReference | Code representing the purpose of reference (Defined CID 7202)
  resultSourceImageItem | The created derivation image item if successful, NULL otherwise

Returns
  EC_Normal if adding works, error code otherwise

## ◆ addSourceImageItem() [2/2]

virtual OFCondition DerivationImageItem::addSourceImageItem | ( | DcmItem * | dataset,
|  | const CodeSequenceMacro & | purposeOfReference,
|  | SourceImageItem *& | resultSourceImageItem )
| virtual

Convenience function to add item representing reference to an object.

No restrictions are set which frames or segments from this image has been actually used. However, such information could be added to the source image item later by modifying the resulting item being handed back to the caller.

Parameters

  dataset | DICOM item that should be referenced by their UID, must contain SOP Class UID and SOP Instance UID.
  purposeOfReference | Code representing the purpose of reference (Defined CID 7202)
  resultSourceImageItem | The created derivation image item if successful, NULL otherwise

Returns
  EC_Normal if adding works, error code otherwise

## ◆ addSourceImageItems() [1/2]

virtual OFCondition DerivationImageItem::addSourceImageItems | ( | const OFVector< DcmItem * > & | datasets,
|  | const CodeSequenceMacro & | purposeOfReference,
|  | OFVector< SourceImageItem * > & | resultSourceImageItems,
|  | const OFBool | skipErrors = OFFalse )
| virtual

Convenience function to add items representing references to some objects which all have the same purpose of reference (code).

No restrictions are set which frames or segments from those images have been actually used. However, such information could be added to the source image item later by modifying the resulting item handed back to the caller.

Parameters

  datasets | DICOM items that should be referenced by their UID, must contain SOP Class UID and SOP Instance UID.
  purposeOfReference | Code representing the purpose of reference (Defined CID 7202)
  resultSourceImageItems | The created derivation image items (one per file) if successful, NULL otherwise
  skipErrors | If OFTrue, then files that could not be added will not lead to error.

Returns
  EC_Normal if adding works, error code otherwise

## ◆ addSourceImageItems() [2/2]

virtual OFCondition DerivationImageItem::addSourceImageItems | ( | const OFVector< OFString > & | files,
|  | const CodeSequenceMacro & | purposeOfReference,
|  | OFVector< SourceImageItem * > & | resultSourceImageItems,
|  | const OFBool | skipFileErrors = OFFalse )
| virtual

Convenience function to add items representing references to some objects which all have the same purpose of reference (code).

No restrictions are set which frames or segments from those images have been actually used. However, such information could be added to the source image item later by modifying the resulting item handed back to the caller.

Parameters

  files | List of files that should be referenced by their UIDs.
  purposeOfReference | Code representing the purpose of reference (Defined CID 7202)
  resultSourceImageItems | The created derivation image items (one per file) if successful, NULL otherwise
  skipFileErrors | If OFTrue, then files that could not be added will not lead to error.

Returns
  EC_Normal if adding works, error code otherwise

## ◆ check()

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

Check whether item contains valid data.

Returns
  EC_Normal if item is valid, error otherwise

## ◆ compare()

virtual int DerivationImageItem::compare | ( | const DerivationImageItem & | 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.

References DerivationImageItem().

## ◆ getDerivationCodeItems()

virtual OFVector< CodeSequenceMacro * > & DerivationImageItem::getDerivationCodeItems | ( |  | ) |
| virtual

Get reference to derivation code items.

Returns
  Reference to derivation code items

## ◆ getDerivationDescription()

virtual OFCondition DerivationImageItem::getDerivationDescription | ( | OFString & | value,
|  | const signed long | pos = 0 ) const
| virtual

Get Derivation Description.

Parameters

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

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ getSOPInfoFromItem()

static OFCondition DerivationImageItem::getSOPInfoFromItem | ( | DcmItem * | dataset,
|  | OFString & | sopClassUID,
|  | OFString & | sopInstanceUID )
| static

Get SOP Class and SOP Instance UID from given item.

Parameters

  dataset | The item to read from
  sopClassUID | The SOP Class UID found in the item
  sopInstanceUID | The SOP Instance UID found in the item

Returns
  EC_Normal if reading was successful and both attributes have non-empty values, error otherwise

## ◆ getSourceImageItems()

virtual OFVector< SourceImageItem * > & DerivationImageItem::getSourceImageItems | ( |  | ) |
| virtual

Get reference to source image items.

Returns
  Reference to source image items

## ◆ operator=()

DerivationImageItem & DerivationImageItem::operator= | ( | const DerivationImageItem & | rhs | ) |

Assignment operator, deletes old data.

Parameters

  rhs | The item that should be assigned to "this" class

Returns
  Reference to "this" class

References DerivationImageItem().

## ◆ read()

virtual OFCondition DerivationImageItem::read | ( | DcmItem & | itemOfDerivationImageSequence,
|  | const OFBool | clearOldData = OFTrue )
| virtual

Read Derivation Image Sequence Item describing derivation from a set of images.

Parameters

  itemOfDerivationImageSequence | The item to read from
  clearOldData | If OFTrue, old data is deleted first

Returns
  EC_Normal if reading was successful, error otherwise

## ◆ setDerivationDescription()

virtual OFCondition DerivationImageItem::setDerivationDescription | ( | const OFString & | value,
|  | const OFBool | checkValue = OFTrue )
| virtual

Set Derivation Description.

Parameters

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

Returns
  EC_Normal if successful, an error code otherwise

## ◆ write()

virtual OFCondition DerivationImageItem::write | ( | DcmItem & | itemOfDerivationImageSequence | ) |
| virtual

Write Derivation Image Sequence Item describing derivation from a set of images.

Parameters

  itemOfDerivationImageSequence | The item to write to

Returns
  EC_Normal if writing was successful, error otherwise

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

- dcmfg/include/dcmtk/dcmfg/fgderimg.h

Generated on Wed Apr 30 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2