DVPSPresentationLUT Class Reference

the representation of a Presentation LUT Content SQ item for Stored Print More...

List of all members.

Public Member Functions

 DVPSPresentationLUT ()
 default constructor
 DVPSPresentationLUT (const DVPSPresentationLUT &copy)
 copy constructor
DVPSPresentationLUTclone ()
 clone method.
virtual ~DVPSPresentationLUT ()
 destructor
void clear ()
 resets the object to initial state.
OFCondition read (DcmItem &dset, OFBool withSOPInstance)
 reads an Presentation LUT from a DICOM dataset.
OFCondition write (DcmItem &dset, OFBool withSOPInstance)
 writes the Presentation LUT managed by this object to a DICOM dataset.
OFBool isInverse ()
 checks whether current presentation LUT is inverse, i.e.
DVPSPresentationLUTType getType ()
 gets the current Presentation LUT type.
DVPSPrintPresentationLUTAlignment getAlignment ()
 gets a description of the Presentation LUT in terms of its restrictions for use with a Print SCP that requires Presentation LUT number of entries to match the bit depth of the image pixel data.
OFBool haveTable ()
 checks if a real Presentation LUT (not shape) is available.
const char * getCurrentExplanation ()
 gets a description of the current presentation LUT.
const char * getLUTExplanation ()
 returns the LUT explanation of the presentation LUT if it exists and is non-empty.
const char * getSOPInstanceUID ()
 returns the SOP instance UID of the presentation LUT if present.
OFCondition setLUT (DcmUnsignedShort &lutDescriptor, DcmUnsignedShort &lutData, DcmLongString &lutExplanation)
 stores a presentation lookup table and activates it.
OFCondition setType (DVPSPresentationLUTType newType)
 sets the current Presentation LUT type.
OFCondition invert ()
 inverts presentation LUT or presentation state LUT shape.
OFBool activate (DicomImage *image, OFBool printLUT=OFFalse)
 activates the current presentation transform in the given DicomImage.
OFBool activateInverseLUT (DicomImage *image)
 activates the inverse LUT of the current presentation LUT (if any) in the given DicomImage.
DiLookupTablecreateDiLookupTable ()
 creates a DiLookupTable instance from the LUT table managed by this object.
OFBool compareDiLookupTable (DiLookupTable *lut)
 compares a DiLookupTable instance with the LUT table managed by this object.
OFCondition setSOPInstanceUID (const char *value)
 sets the SOP instance UID.
OFBool isLegalPrintPresentationLUT ()
 checks whether the current Presentation LUT (or shape) is legal when used with Supplement 22.
OFBool matchesImageDepth (OFBool is12bit)
 checks whether the current Presentation LUT (or shape) matches the current image bit depth in number of entries and first value mapped.
OFBool printSCPCreate (DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset, OFBool matchRequired, OFBool supports12Bit)
 performs a Print SCP N-CREATE operation on a newly created instance of this class.

Private Member Functions

DVPSPresentationLUToperator= (const DVPSPresentationLUT &)
 private undefined assignment operator

Private Attributes

DVPSPresentationLUTType presentationLUT
 describes active type of presentation LUT.
DcmUnsignedShort presentationLUTDescriptor
 Module=Softcopy_Presentation_LUT, VR=xs, VM=3, Type 1c.
DcmLongString presentationLUTExplanation
 Module=Softcopy_Presentation_LUT, VR=LO, VM=1, Type 3.
DcmUnsignedShort presentationLUTData
 Module=Softcopy_Presentation_LUT, VR=xs, VM=1-n, Type 1c.
DcmUniqueIdentifier sOPInstanceUID
 Module=Presentation_LUT_List, VR=UI, VM=1, Type 1.


Detailed Description

the representation of a Presentation LUT Content SQ item for Stored Print

Definition at line 48 of file dvpspl.h.


Member Function Documentation

DVPSPresentationLUT* DVPSPresentationLUT::clone (  )  [inline]

clone method.

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

Definition at line 61 of file dvpspl.h.

References DVPSPresentationLUT().

void DVPSPresentationLUT::clear (  ) 

resets the object to initial state.

After this call, the object is in the same state as after creation with the default constructor.

OFCondition DVPSPresentationLUT::read ( DcmItem dset,
OFBool  withSOPInstance 
)

reads an Presentation LUT from a DICOM dataset.

The DICOM elements of the referenced 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 PresentationLUTContentSequence from which the data is to be read
withSOPInstance true if SOPinstanceUID should be read (when used with Stored Print).
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSPresentationLUT::write ( DcmItem dset,
OFBool  withSOPInstance 
)

writes the Presentation LUT managed by this object to a DICOM dataset.

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

Parameters:
dset the the item of the PresentationLUTContentSequence to which the data is written
withSOPInstance true if SOPinstanceUID should be written (when used with Stored Print).
Returns:
EC_Normal if successful, an error code otherwise.

OFBool DVPSPresentationLUT::isInverse (  ) 

checks whether current presentation LUT is inverse, i.e.

shape is INVERSE or first LUT entry larger than last LUT entry.

DVPSPresentationLUTType DVPSPresentationLUT::getType (  )  [inline]

gets the current Presentation LUT type.

Returns:
the current presentation LUT type

Definition at line 101 of file dvpspl.h.

References presentationLUT.

Referenced by DcmPresentationState::getPresentationLUT().

DVPSPrintPresentationLUTAlignment DVPSPresentationLUT::getAlignment (  ) 

gets a description of the Presentation LUT in terms of its restrictions for use with a Print SCP that requires Presentation LUT number of entries to match the bit depth of the image pixel data.

Returns:
the current presentation LUT alignment type

OFBool DVPSPresentationLUT::haveTable (  ) 

checks if a real Presentation LUT (not shape) is available.

Returns:
OFTrue if this object contains a presentation LUT, no matter if it is activated or not. Returns OFFalse otherwise.

Referenced by DcmPresentationState::havePresentationLookupTable().

const char* DVPSPresentationLUT::getCurrentExplanation (  ) 

gets a description of the current presentation LUT.

For well-known presentation LUT shapes, a standard text is returned. For presentation LUTs, the LUT explanation is returned if it exists and a standard text otherwise. This method never returns NULL.

Returns:
a pointer to a string describing the current presentation LUT.

Referenced by DcmPresentationState::getCurrentPresentationLUTExplanation().

const char* DVPSPresentationLUT::getLUTExplanation (  ) 

returns the LUT explanation of the presentation LUT if it exists and is non-empty.

Otherwise returns NULL.

Returns:
a string pointer

Referenced by DcmPresentationState::getPresentationLUTExplanation().

const char* DVPSPresentationLUT::getSOPInstanceUID (  ) 

returns the SOP instance UID of the presentation LUT if present.

Otherwise returns NULL.

Returns:
a string pointer

OFCondition DVPSPresentationLUT::setLUT ( DcmUnsignedShort lutDescriptor,
DcmUnsignedShort lutData,
DcmLongString lutExplanation 
)

stores a presentation lookup table and activates it.

The LUT is copied. If the method returns EC_Normal, any old presentation LUT is overwritten. 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 DVPSPresentationLUT::setType ( DVPSPresentationLUTType  newType  ) 

sets the current Presentation LUT type.

DVPSP_table can only be used if the object contains a lookup table, i.e. if haveTable() returns OFTrue.

Parameters:
newType the new presentation LUT type.
Returns:
EC_Normal if successful, an error code otherwise.

OFCondition DVPSPresentationLUT::invert (  ) 

inverts presentation LUT or presentation state LUT shape.

Returns:
EC_Normal upon success, an error code otherwise.

OFBool DVPSPresentationLUT::activate ( DicomImage image,
OFBool  printLUT = OFFalse 
)

activates the current presentation transform in the given DicomImage.

Parameters:
image the DicomImage for which the presentation transform is to be set.
printLUT OFTrue if presentation LUT is activated for print bitmap rendering (in this case there is no implicit scaling of the input width of the LUT and, therefore, the VOI transformation - which is absent for print - is used), OFFalse otherwise (softcopy rendering, default)
Returns:
OFTrue if successful, OFFalse otherwise.

OFBool DVPSPresentationLUT::activateInverseLUT ( DicomImage image  ) 

activates the inverse LUT of the current presentation LUT (if any) in the given DicomImage.

Presentation LUT shape is not supported by this method.

Parameters:
image the DicomImage for which the inverse presentation LUT is to be set.
Returns:
OFTrue if successful, OFFalse otherwise.

DiLookupTable* DVPSPresentationLUT::createDiLookupTable (  ) 

creates a DiLookupTable instance from the LUT table managed by this object.

The returned object must be freed by the caller.

Returns:
new DiLookupTable object, may be NULL if no LUT present.

OFBool DVPSPresentationLUT::compareDiLookupTable ( DiLookupTable lut  ) 

compares a DiLookupTable instance with the LUT table managed by this object.

Returns OFTrue if equal, OFFalse otherwise.

Parameters:
lut DiLookupTable object to compare with
Returns:
comparison, true if equal

OFCondition DVPSPresentationLUT::setSOPInstanceUID ( const char *  value  ) 

sets the SOP instance UID.

Parameters:
value new attribute value, must not be NULL.
Returns:
EC_Normal if successful, an error code otherwise.

OFBool DVPSPresentationLUT::isLegalPrintPresentationLUT (  ) 

checks whether the current Presentation LUT (or shape) is legal when used with Supplement 22.

Returns:
true if current Presentation LUT is legal for print.

OFBool DVPSPresentationLUT::matchesImageDepth ( OFBool  is12bit  ) 

checks whether the current Presentation LUT (or shape) matches the current image bit depth in number of entries and first value mapped.

Parameters:
is12bit true if the image is 12 bit, false if the image is 8 bit
Returns:
true if Presentation LUT matches, false otherwise.

OFBool DVPSPresentationLUT::printSCPCreate ( DcmDataset rqDataset,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset,
OFBool  matchRequired,
OFBool  supports12Bit 
)

performs a Print SCP N-CREATE operation on a newly created instance of this class.

The results of the operation are stored in the objects passed as rsp and rspDataset.

Parameters:
rqDataset N-CREATE request dataset, may be NULL
rsp N-CREATE response message
rspDataset N-CREATE response dataset passed back in this parameter
matchRequired boolean flag specifying whether the SCP should enforce a rule that all Presentation LUTs must match with the bit depth of the image pixel data.
supports12Bit boolean flag specifying whether the SCP should allow 12 bit/pixel image data transmission. Affects handling of matching rule.
Returns:
OFTrue if operation was successful, OFFalse otherwise.


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


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1