DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DVPSSoftcopyVOI Class Reference

the representation of one item of the Softcopy VOI LUT Sequence More...

## Public Member Functions
| DVPSSoftcopyVOI ()
| default constructor
| DVPSSoftcopyVOI (const DVPSSoftcopyVOI &copy)
| copy constructor
DVPSSoftcopyVOI * | clone ()
| clone method.
virtual | ~DVPSSoftcopyVOI ()
| destructor
OFCondition | read (DcmItem &dset)
| reads a softcopy VOI LUT item from a DICOM dataset.
OFCondition | write (DcmItem &dset)
| writes the dsoftcopy VOI LUT item managed by this object to a DICOM dataset.
OFBool | isApplicable (const char *instanceUID, unsigned long frame)
| checks if this displayed area is applicable to the given image and frame.
OFBool | matchesApplicability (const char *instanceUID, unsigned long frame, DVPSObjectApplicability applicability)
| checks if this displayed area matches exactly the applicability defined by the instanceUID, frame and applicability parameters.
OFCondition | addImageReference (const char *sopclassUID, const char *instanceUID, unsigned long frame, DVPSObjectApplicability applicability)
| add a new image reference.
void | removeImageReference (DVPSReferencedSeries_PList &allReferences, const char *instanceUID, unsigned long frame, unsigned long numberOfFrames, DVPSObjectApplicability applicability)
| removes a reference to an image or frame.
void | clearImageReferences ()
| removes all image references for this displayed area.
OFBool | imageReferencesEmpty ()
| checks if the list of image references for this displayed area is empty.
OFBool | haveLUT ()
| check if a VOI LUT is currently active
const char * | getCurrentVOIDescription ()
| returns a description string for a currently active VOI transform.
OFCondition | getCurrentWindowWidth (double &w)
| gets the width of the current VOI window.
OFCondition | getCurrentWindowCenter (double &c)
| get the center of the current VOI window.
DcmUnsignedShort & | getLUTDescriptor ()
| returns a reference to the current VOI LUT descriptor.
DcmUnsignedShort & | getLUTData ()
| returns a reference to the current VOI LUT data.
OFCondition | setVOIWindow (double wCenter, double wWidth, const char *description=NULL)
| sets a user defined VOI window center and width.
OFCondition | setVOILUT (DcmUnsignedShort &lutDescriptor, DcmUnsignedShort &lutData, DcmLongString &lutExplanation)
| stores (copies) a VOI lookup table.

## Private Member Functions
DVPSSoftcopyVOI & | operator= (const DVPSSoftcopyVOI &)
| private undefined assignment operator

## Private Attributes
DVPSReferencedImage_PList | referencedImageList
| ReferencedImageSequence, Type 1c.
OFBool | useLUT
| If true, a VOI LUT is set, otherwise a VOI Window is set.
DcmUnsignedShort | voiLUTDescriptor
| Module=VOI_LUT, VR=xs, VM=3, Type 1c.
DcmLongString | voiLUTExplanation
| Module=VOI_LUT, VR=LO, VM=1, Type 3.
DcmUnsignedShort | voiLUTData
| Module=VOI_LUT, VR=xs, VM=1-n, Type 1c.
DcmDecimalString | windowCenter
| Module=VOI_LUT, VR=DS, VM=1-n, Type 1c (unlike VOI LUT module!)
DcmDecimalString | windowWidth
| Module=VOI_LUT, VR=DS, VM=1-n, Type 1c.
DcmLongString | windowCenterWidthExplanation
| Module=VOI_LUT, VR=LO, VM=1-n, Type 3.

## Detailed Description

the representation of one item of the Softcopy VOI LUT Sequence

## Member Function Documentation

## ◆ addImageReference()

OFCondition DVPSSoftcopyVOI::addImageReference | ( | const char * | sopclassUID,
|  | const char * | instanceUID,
|  | unsigned long | frame,
|  | DVPSObjectApplicability | applicability )

add a new image reference.

Checks if the referenced SOP instance UID already exists in this sequence. If it exists, an error code is returned. Otherwise a new image reference is created and added to the ReferencedImageSequence.

Parameters

  sopclassUID | the SOP class UID of the image reference to be added.
  instanceUID | the SOP instance UID of the image reference to be added.
  frame | the frame number of the image reference (current image) to be added.
  applicability | the applicability of the image reference (DVPSB_currentFrame or DVPSB_currentImage)

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ clone()

DVPSSoftcopyVOI * DVPSSoftcopyVOI::clone | ( |  | ) |
| inline

clone method.

Returns
  a pointer to a new DVPSSoftcopyVOI object containing a copy of this object.

References DVPSSoftcopyVOI().

## ◆ getCurrentVOIDescription()

const char * DVPSSoftcopyVOI::getCurrentVOIDescription | ( |  | ) |

returns a description string for a currently active VOI transform.

If no description is available, NULL is returned.

Returns
  a pointer to a string or NULL.

## ◆ getCurrentWindowCenter()

OFCondition DVPSSoftcopyVOI::getCurrentWindowCenter | ( | double & | c | ) |

get the center of the current VOI window.

May only be called if haveLUT() is OFFalse.

Parameters

  c | the window center is returned in this parameter

Returns
  EC_Normal upon success, an error code otherwise.

## ◆ getCurrentWindowWidth()

OFCondition DVPSSoftcopyVOI::getCurrentWindowWidth | ( | double & | w | ) |

gets the width of the current VOI window.

May only be called if haveLUT() is OFFalse.

Parameters

  w | the window width is returned in this parameter

Returns
  EC_Normal upon success, an error code otherwise.

## ◆ getLUTData()

DcmUnsignedShort & DVPSSoftcopyVOI::getLUTData | ( |  | ) |
| inline

returns a reference to the current VOI LUT data.

May only be called if haveLUT() is OFTrue.

Returns
  reference to the current VOI LUT data

References voiLUTData.

## ◆ getLUTDescriptor()

DcmUnsignedShort & DVPSSoftcopyVOI::getLUTDescriptor | ( |  | ) |
| inline

returns a reference to the current VOI LUT descriptor.

May only be called if haveLUT() is OFTrue.

Returns
  reference to the current VOI LUT descriptor

References voiLUTDescriptor.

## ◆ haveLUT()

OFBool DVPSSoftcopyVOI::haveLUT | ( |  | ) |
| inline

check if a VOI LUT is currently active

Returns
  OFTrue if a VOI LUT is active, OFFalse if VOI Window is active.

References useLUT.

## ◆ imageReferencesEmpty()

OFBool DVPSSoftcopyVOI::imageReferencesEmpty | ( |  | ) |
| inline

checks if the list of image references for this displayed area is empty.

Returns
  OFTrue if list of image references is empty, OFFalse otherwise.

References referencedImageList.

## ◆ isApplicable()

OFBool DVPSSoftcopyVOI::isApplicable | ( | const char * | instanceUID,
|  | unsigned long | frame )

checks if this displayed area is applicable to the given image and frame.

Parameters

  instanceUID | SOP instance UID of the current image
  frame | number of the current frame

Returns
  OFTrue if applicable.

## ◆ matchesApplicability()

OFBool DVPSSoftcopyVOI::matchesApplicability | ( | const char * | instanceUID,
|  | unsigned long | frame,
|  | DVPSObjectApplicability | applicability )

checks if this displayed area matches exactly the applicability defined by the instanceUID, frame and applicability parameters.

Parameters

  instanceUID | SOP instance UID of the current image
  frame | number of the current frame

Returns
  OFTrue if matching.

## ◆ read()

OFCondition DVPSSoftcopyVOI::read | ( | DcmItem & | dset | ) |

reads a softcopy VOI LUT item from a DICOM dataset.

The DICOM elements of the softcopy VOI LUT item are copied from the dataset to this object. The completeness of the item (presence of all required elements, value multiplicity) is checked. If this method returns an error code, the object is in undefined state afterwards.

Parameters

  dset | the item of the SoftcopyVOILUTSequence from which the data is to be read

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ removeImageReference()

void DVPSSoftcopyVOI::removeImageReference | ( | DVPSReferencedSeries_PList & | allReferences,
|  | const char * | instanceUID,
|  | unsigned long | frame,
|  | unsigned long | numberOfFrames,
|  | DVPSObjectApplicability | applicability )

removes a reference to an image or frame.

If the current reference is empty ("global"), an explicit list of references is constructed from the list of series/instance references. The image or frame reference is removed from the total list of references in this object. If the only reference contained in this object is removed, the reference list becomes empty which means that the current reference becomes "global". This case must be handled by the called (e.g. by deleting the displayed area selection object).

Parameters

  allReferences | list of series/instance references registered for the presentation state.
  instanceUID | SOP instance UID of the current image
  frame | number of the current frame
  numberOfFrames | the number of frames of the current image
  applicability | applicability of the new displayed area selection
  applicability | the applicability of the image reference to be removed (DVPSB_currentFrame or DVPSB_currentImage)

## ◆ setVOILUT()

OFCondition DVPSSoftcopyVOI::setVOILUT | ( | DcmUnsignedShort & | lutDescriptor,
|  | DcmUnsignedShort & | lutData,
|  | DcmLongString & | lutExplanation )

stores (copies) a VOI lookup table.

If the method returns an error code, an old LUT is left unchanged.

Parameters

  lutDescriptor | the LUT Descriptor in DICOM format (VM=3)
  lutData | the LUT Data in DICOM format
  lutExplanation | the LUT Explanation in DICOM format, may be empty.

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ setVOIWindow()

OFCondition DVPSSoftcopyVOI::setVOIWindow | ( | double | wCenter,
|  | double | wWidth,
|  | const char * | description = NULL )

sets a user defined VOI window center and width.

Parameters

  wCenter | the window center
  wWidth | the window width
  description | an optional description. Default: absent.

Returns
  EC_Normal upon success, an error code otherwise.

## ◆ write()

OFCondition DVPSSoftcopyVOI::write | ( | DcmItem & | dset | ) |

writes the dsoftcopy VOI LUT item managed by this object to a DICOM dataset.

Copies of the DICOM elements managed by this object are inserted into the DICOM dataset.

Parameters

  dset | the the item of the SoftcopyVOILUTSequence to which the data is written

Returns
  EC_Normal if successful, an error code otherwise.

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

- dcmpstat/include/dcmtk/dcmpstat/dvpssv.h

Generated on Sat Mar 1 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2