DVPSSoftcopyVOI Class Reference

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

List of all members.

Public Member Functions

 DVPSSoftcopyVOI ()
 default constructor
 DVPSSoftcopyVOI (const DVPSSoftcopyVOI &copy)
 copy constructor
DVPSSoftcopyVOIclone ()
 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.
DcmUnsignedShortgetLUTDescriptor ()
 returns a reference to the current VOI LUT descriptor.
DcmUnsignedShortgetLUTData ()
 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.
void setLog (OFConsole *stream, OFBool verbMode, OFBool dbgMode)
 sets a new log stream

Private Member Functions

DVPSSoftcopyVOIoperator= (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.
OFConsolelogstream
 output stream for error messages, never NULL
OFBool verboseMode
 flag indicating whether we're operating in verbose mode
OFBool debugMode
 flag indicating whether we're operating in debug mode


Detailed Description

the representation of one item of the Softcopy VOI LUT Sequence

Definition at line 48 of file dvpssv.h.


Member Function Documentation

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.

DVPSSoftcopyVOI* DVPSSoftcopyVOI::clone  )  [inline]
 

clone method.

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

Definition at line 61 of file dvpssv.h.

References DVPSSoftcopyVOI().

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.

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.

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.

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

Definition at line 181 of file dvpssv.h.

References voiLUTData.

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

Definition at line 175 of file dvpssv.h.

References voiLUTDescriptor.

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.

Definition at line 149 of file dvpssv.h.

References useLUT.

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.

Definition at line 144 of file dvpssv.h.

References referencedImageList, and DVPSReferencedImage_PList::size().

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.

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.

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.

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)

void DVPSSoftcopyVOI::setLog OFConsole stream,
OFBool  verbMode,
OFBool  dbgMode
 

sets a new log stream

Parameters:
stream new log stream, NULL for default logstream
verbMode verbose mode flag
dbgMode debug mode flag

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.

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.

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:


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5