DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | Private Attributes
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.

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.

Detailed Description

the representation of one item of the Softcopy VOI LUT Sequence


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:
sopclassUIDthe SOP class UID of the image reference to be added.
instanceUIDthe SOP instance UID of the image reference to be added.
framethe frame number of the image reference (current image) to be added.
applicabilitythe applicability of the image reference (DVPSB_currentFrame or DVPSB_currentImage)
Returns:
EC_Normal if successful, an error code otherwise.

clone method.

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

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.

get the center of the current VOI window.

May only be called if haveLUT() is OFFalse.

Parameters:
cthe window center is returned in this parameter
Returns:
EC_Normal upon success, an error code otherwise.

gets the width of the current VOI window.

May only be called if haveLUT() is OFFalse.

Parameters:
wthe window width is returned in this parameter
Returns:
EC_Normal upon success, an error code otherwise.

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

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

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

Returns:
OFTrue if list of image references is empty, OFFalse otherwise.
OFBool DVPSSoftcopyVOI::isApplicable ( const char *  instanceUID,
unsigned long  frame 
)

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

Parameters:
instanceUIDSOP instance UID of the current image
framenumber 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:
instanceUIDSOP instance UID of the current image
framenumber of the current frame
Returns:
OFTrue if matching.

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:
dsetthe 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:
allReferenceslist of series/instance references registered for the presentation state.
instanceUIDSOP instance UID of the current image
framenumber of the current frame
numberOfFramesthe number of frames of the current image
applicabilityapplicability of the new displayed area selection
applicabilitythe applicability of the image reference to be removed (DVPSB_currentFrame or DVPSB_currentImage)
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:
lutDescriptorthe LUT Descriptor in DICOM format (VM=3)
lutDatathe LUT Data in DICOM format
lutExplanationthe 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:
wCenterthe window center
wWidththe window width
descriptionan optional description. Default: absent.
Returns:
EC_Normal upon success, an error code otherwise.

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:
dsetthe 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 Tue May 15 2012 for DCMTK Version 3.6.1 20120515 by Doxygen 1.7.5.1-20111027