DCMTK Version 3.6.8
OFFIS DICOM Toolkit
|
the representation of a Presentation LUT Content SQ item for Stored Print More...
Public Member Functions | |
DVPSPresentationLUT () | |
default constructor | |
DVPSPresentationLUT (const DVPSPresentationLUT ©) | |
copy constructor | |
DVPSPresentationLUT * | clone () |
clone method. More... | |
virtual | ~DVPSPresentationLUT () |
destructor | |
void | clear () |
resets the object to initial state. More... | |
OFCondition | read (DcmItem &dset, OFBool withSOPInstance) |
reads an Presentation LUT from a DICOM dataset. More... | |
OFCondition | write (DcmItem &dset, OFBool withSOPInstance) |
writes the Presentation LUT managed by this object to a DICOM dataset. More... | |
OFBool | isInverse () |
checks whether current presentation LUT is inverse, i.e. More... | |
DVPSPresentationLUTType | getType () |
gets the current Presentation LUT type. More... | |
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. More... | |
OFBool | haveTable () |
checks if a real Presentation LUT (not shape) is available. More... | |
const char * | getCurrentExplanation () |
gets a description of the current presentation LUT. More... | |
const char * | getLUTExplanation () |
returns the LUT explanation of the presentation LUT if it exists and is non-empty. More... | |
const char * | getSOPInstanceUID () |
returns the SOP instance UID of the presentation LUT if present. More... | |
OFCondition | setLUT (DcmUnsignedShort &lutDescriptor, DcmUnsignedShort &lutData, DcmLongString &lutExplanation) |
stores a presentation lookup table and activates it. More... | |
OFCondition | setType (DVPSPresentationLUTType newType) |
sets the current Presentation LUT type. More... | |
OFCondition | invert () |
inverts presentation LUT or presentation state LUT shape. More... | |
OFBool | activate (DicomImage *image, OFBool printLUT=OFFalse) |
activates the current presentation transform in the given DicomImage. More... | |
OFBool | activateInverseLUT (DicomImage *image) |
activates the inverse LUT of the current presentation LUT (if any) in the given DicomImage. More... | |
DiLookupTable * | createDiLookupTable () |
creates a DiLookupTable instance from the LUT table managed by this object. More... | |
OFBool | compareDiLookupTable (DiLookupTable *lut) |
compares a DiLookupTable instance with the LUT table managed by this object. More... | |
OFCondition | setSOPInstanceUID (const char *value) |
sets the SOP instance UID. More... | |
OFBool | isLegalPrintPresentationLUT () |
checks whether the current Presentation LUT (or shape) is legal when used with Supplement 22. More... | |
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. More... | |
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. More... | |
Private Member Functions | |
DVPSPresentationLUT & | operator= (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. | |
the representation of a Presentation LUT Content SQ item for Stored Print
OFBool DVPSPresentationLUT::activate | ( | DicomImage * | image, |
OFBool | printLUT = OFFalse |
||
) |
activates the current presentation transform in the given DicomImage.
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) |
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.
image | the DicomImage for which the inverse presentation LUT is to be set. |
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.
|
inline |
clone method.
OFBool DVPSPresentationLUT::compareDiLookupTable | ( | DiLookupTable * | lut | ) |
compares a DiLookupTable instance with the LUT table managed by this object.
Returns OFTrue if equal, OFFalse otherwise.
lut | DiLookupTable object to compare with |
DiLookupTable * DVPSPresentationLUT::createDiLookupTable | ( | ) |
creates a DiLookupTable instance from the LUT table managed by this object.
The returned object must be freed by the caller.
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.
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.
const char * DVPSPresentationLUT::getLUTExplanation | ( | ) |
returns the LUT explanation of the presentation LUT if it exists and is non-empty.
Otherwise returns NULL.
const char * DVPSPresentationLUT::getSOPInstanceUID | ( | ) |
returns the SOP instance UID of the presentation LUT if present.
Otherwise returns NULL.
|
inline |
gets the current Presentation LUT type.
OFBool DVPSPresentationLUT::haveTable | ( | ) |
checks if a real Presentation LUT (not shape) is available.
OFCondition DVPSPresentationLUT::invert | ( | ) |
inverts presentation LUT or presentation state LUT shape.
OFBool DVPSPresentationLUT::isInverse | ( | ) |
checks whether current presentation LUT is inverse, i.e.
shape is INVERSE or first LUT entry larger than last LUT entry.
OFBool DVPSPresentationLUT::isLegalPrintPresentationLUT | ( | ) |
checks whether the current Presentation LUT (or shape) is legal when used with Supplement 22.
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.
is12bit | true if the image is 12 bit, false if the image is 8 bit |
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.
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. |
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.
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). |
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.
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. |
OFCondition DVPSPresentationLUT::setSOPInstanceUID | ( | const char * | value | ) |
sets the SOP instance UID.
value | new attribute value, must not be NULL. |
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.
newType | the new presentation LUT type. |
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.
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). |