Inheritance diagram for DVPresentationState:

Public Member Functions | |
| DVPresentationState (DiDisplayFunction **dispFunction=NULL, unsigned long minPrintBitmapX=0, unsigned long minPrintBitmapY=0, unsigned long maxPrintBitmapX=0, unsigned long maxPrintBitmapY=0, unsigned long maxPreviewImageX=0, unsigned long maxPreviewImageY=0) | |
| default constructor | |
| virtual | ~DVPresentationState () |
| destructor | |
| void | clear () |
| resets the object to initial state. | |
| OFCondition | read (DcmItem &dset) |
| reads a presentation state from a DICOM dataset. | |
| OFCondition | createFromImage (DcmItem &dset, DVPSoverlayActivation overlayActivation=DVPSO_copyOverlays, DVPSVOIActivation voiActivation=DVPSV_preferVOILUT, OFBool curveActivation=OFTrue, OFBool shutterActivation=OFTrue, OFBool presentationActivation=OFTrue, DVPSGraphicLayering layering=DVPSG_twoLayers, const char *aetitle=NULL, const char *filesetID=NULL, const char *filesetUID=NULL) |
| creates a default presentation state for a DICOM image. | |
| OFCondition | addImageReferenceAttached (const char *aetitle=NULL, const char *filesetID=NULL, const char *filesetUID=NULL) |
| adds a reference to the currently attached image to this presentation state. | |
| OFCondition | removeImageReferenceAttached () |
| removes a reference to the currently attached image from this presentation state. | |
| OFCondition | setCurrentPresentationLUT (DVPSPresentationLUTType newType) |
| sets the current Presentation LUT type. | |
| OFCondition | setDefaultPresentationLUTShape () |
| resets the Presentation LUT to the default LUT shape which is DVPSP_identity for MONOCHROME2 images and DVPSP_inverse for MONOCHROME1. | |
| OFCondition | setPresentationLookupTable (DcmUnsignedShort &lutDescriptor, DcmUnsignedShort &lutData, DcmLongString &lutExplanation) |
| stores a presentation lookup table in the presentation state. | |
| OFCondition | setPresentationLookupTable (DcmItem &dset) |
| stores a presentation lookup table in the presentation state. | |
| OFCondition | writePresentationLUTforPrint (DcmItem &dset) |
| writes the current Presentation LUT to a DICOM dataset. | |
| OFBool | isMonochrome1Image () |
| checks whether the attached image is MONOCHROME1. | |
| OFBool | haveActiveVOIWindow () |
| check if a VOI window is currently active | |
| OFBool | haveActiveVOILUT () |
| 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. | |
| size_t | getNumberOfVOILUTsInImage () |
| gets the number of VOI LUTs available in the attached image. | |
| size_t | getNumberOfVOIWindowsInImage () |
| gets the number of VOI Windows available in the attached image. | |
| const char * | getDescriptionOfVOILUTsInImage (size_t idx) |
| returns a description string for the given VOI LUT in the attached image. | |
| const char * | getDescriptionOfVOIWindowsInImage (size_t idx) |
| returns a description string for the given VOI Window in the attached image. | |
| OFCondition | setVOILUTFromImage (size_t idx, DVPSObjectApplicability applicability=DVPSB_currentImage) |
| activates one of the VOI LUTs from the attached image. | |
| OFCondition | setVOIWindowFromImage (size_t idx, DVPSObjectApplicability applicability=DVPSB_currentImage) |
| activates one of the VOI Windows from the attached image. | |
| OFCondition | setVOIWindow (double wCenter, double wWidth, const char *description=NULL, DVPSObjectApplicability applicability=DVPSB_currentImage) |
| sets a user defined VOI window center and width. | |
| OFCondition | setVOILUT (DcmUnsignedShort &lutDescriptor, DcmUnsignedShort &lutData, DcmLongString &lutExplanation, DVPSObjectApplicability applicability=DVPSB_currentImage) |
| stores a VOI lookup table in the presentation state. | |
| void | deactivateVOI (DVPSObjectApplicability applicability=DVPSB_currentImage) |
| deactivates the current VOI transformation. | |
| OFCondition | setGammaVOILUT (double gammaValue, DVPSObjectApplicability applicability=DVPSB_currentImage) |
| stores VOI lookup table with a gamma curve shape in the presentation state. | |
| DVPSPresentationSizeMode | getDisplayedAreaPresentationSizeMode () |
| gets the presentation size mode for the current image and frame. | |
| double | getDisplayedAreaPresentationPixelAspectRatio () |
| gets the presentation pixel aspect ratio for for the current image and frame. | |
| OFCondition | getStandardDisplayedArea (Sint32 &tlhcX, Sint32 &tlhcY, Sint32 &brhcX, Sint32 &brhcY) |
| gets the displayed area top lefthand corner and bottom righthand corner for the current potentially rotated and flipped image and frame. | |
| OFCondition | getImageRelativeDisplayedArea (Sint32 &tlhcX, Sint32 &tlhcY, Sint32 &brhcX, Sint32 &brhcY) |
| gets the displayed area top lefthand corner and bottom righthand corner for the current image and frame, as if the image was unrotated This method may only be called when an image is attached to the presentation state. | |
| OFCondition | getDisplayedAreaPresentationPixelSpacing (double &x, double &y) |
| gets the presentation pixel spacing for the current image and frame if it is known. | |
| OFCondition | getDisplayedAreaPresentationPixelMagnificationRatio (double &magnification) |
| gets the presentation pixel magnification ratio for the current image and frame if it is present. | |
| OFBool | canUseDisplayedAreaTrueSize () |
| checks if "TRUE SIZE" can be used as presentation size mode for the current image and frame (i.e. | |
| OFCondition | setStandardDisplayedArea (DVPSPresentationSizeMode sizeMode, Sint32 tlhcX, Sint32 tlhcY, Sint32 brhcX, Sint32 brhcY, double magnification=1.0, DVPSObjectApplicability applicability=DVPSB_currentImage) |
| sets the displayed area and size mode (for the current frame, the current image or all images referenced by the presentation state object). | |
| OFCondition | setImageRelativeDisplayedArea (DVPSPresentationSizeMode sizeMode, Sint32 tlhcX, Sint32 tlhcY, Sint32 brhcX, Sint32 brhcY, double magnification=1.0, DVPSObjectApplicability applicability=DVPSB_currentImage) |
| sets the displayed area and size mode (for the current frame, the current image or all images referenced by the presentation state object). | |
| void | removeShutter (DVPSShutterType type) |
| deactivates display shutter of given type. | |
| OFCondition | setRectShutter (Sint32 lv, Sint32 rv, Sint32 uh, Sint32 lh) |
| sets and activates rectangular display shutter. | |
| OFCondition | setCircularShutter (Sint32 centerX, Sint32 centerY, Sint32 radius) |
| sets and activates circular display shutter. | |
| OFCondition | addPolyShutterVertex (Sint32 x, Sint32 y) |
| sets polygonal display shutter point. | |
| OFCondition | removeGraphicLayer (size_t idx) |
| removes and deletes a graphic layer. | |
| size_t | getNumberOfTextObjects (size_t layer) |
| returns the number of text objects for the given graphic layer. | |
| DVPSTextObject * | getTextObject (size_t layer, size_t idx) |
| gets the text object with the given index on the given layer. | |
| DVPSTextObject * | addTextObject (size_t layer, DVPSObjectApplicability applicability=DVPSB_allImages) |
| creates a new text object on the given layer. | |
| OFCondition | removeTextObject (size_t layer, size_t idx) |
| deletes the text object with the given index on the given layer. | |
| OFCondition | moveTextObject (size_t old_layer, size_t idx, size_t new_layer, DVPSObjectApplicability applicability=DVPSB_allImages) |
| moves the text object with the given index on the given layer to a different layer. | |
| size_t | getNumberOfGraphicObjects (size_t layer) |
| returns the number of graphic objects for the given graphic layer. | |
| DVPSGraphicObject * | getGraphicObject (size_t layer, size_t idx) |
| gets the graphic object with the given index on the given layer. | |
| DVPSGraphicObject * | addGraphicObject (size_t layer, DVPSObjectApplicability applicability=DVPSB_allImages) |
| creates a new graphic object on the given layer. | |
| OFCondition | removeGraphicObject (size_t layer, size_t idx) |
| deletes the graphic object with the given index on the given layer. | |
| OFCondition | moveGraphicObject (size_t old_layer, size_t idx, size_t new_layer, DVPSObjectApplicability applicability=DVPSB_allImages) |
| moves the graphic object with the given index on the given layer to a different layer. | |
| DVPSCurve * | getCurve (size_t layer, size_t idx) |
| gets the curve with the given index on the given layer. | |
| size_t | getNumberOfCurvesInImage () |
| returns the number of curves in the attached image that could be activated in the presentation state. | |
| DVPSCurve * | getCurveInImage (size_t idx) |
| gets the curve with the given index from the attached image. | |
| OFCondition | addCurve (size_t layer, size_t curveidxinimage) |
| activates curve in presentation state. | |
| const char * | getActiveOverlayLabel (size_t layer, size_t idx) |
| gets the overlay label of the given activated overlay. | |
| const char * | getActiveOverlayDescription (size_t layer, size_t idx) |
| gets the overlay description of the given activated overlay. | |
| OFBool | activeOverlayIsROI (size_t layer, size_t idx) |
| checks whether the given activated overlay is a ROI (region of interest) overlay. | |
| OFCondition | getOverlayData (size_t layer, size_t idx, const void *&overlayData, unsigned int &width, unsigned int &height, unsigned int &left_pos, unsigned int &top_pos, OFBool &isROI, Uint16 &fore, unsigned int bits=8) |
| gets one overlay bitmap. | |
| size_t | getNumberOfOverlaysInImage () |
| gets the number of overlays which are embedded in the image currently attached to the presentation state. | |
| Uint16 | getOverlayInImageGroup (size_t idx) |
| gets the repeating group number of the given overlay in the attached image. | |
| const char * | getOverlayInImageLabel (size_t idx) |
| gets the overlay label of the given overlay in the attached image. | |
| const char * | getOverlayInImageDescription (size_t idx) |
| gets the overlay description of the given overlay in the attached image. | |
| size_t | getOverlayInImageActivationLayer (size_t idx) |
| gets the index of the activation layer on which the given overlay from the attached image is activated. | |
| OFBool | overlayInImageIsROI (size_t idx) |
| checks whether the given overlay in the attached image is a ROI (region of interest) overlay. | |
| OFCondition | removeOverlayFromPresentationState (size_t idx) |
| removes an overlay from the presentation state. | |
| OFCondition | changeOverlayGroupInPresentationState (size_t idx, Uint16 newGroup=0) |
| changes the repeating group used for an overlay in the presentation state. | |
| OFCondition | addOverlayToPresentationState (DcmItem &overlayIOD, Uint16 groupInItem, Uint16 newGroup=0) |
| adds a new overlay bitmap to the presentation state. | |
| OFBool | overlayIsSuitableAsBitmapShutter (size_t idx) |
| checks if an overlay from the presentation state is suitable for use as a bitmap shutter. | |
| OFCondition | activateOverlayInImage (size_t layer, size_t idx) |
| activates the given overlay from the attached image on the given graphic layer. | |
| OFCondition | activateOverlayInPresentationState (size_t layer, size_t idx) |
| activates the given overlay from the presentation state on the given graphic layer. | |
| OFCondition | activateOverlayAsBitmapShutter (size_t idx) |
| activates an overlay as bitmap shutter. | |
| OFCondition | deactivateOverlay (size_t layer, size_t idx) |
| removes activation for an overlay which may be embedded in the attached image or part of the presentation state. | |
| OFCondition | attachImage (DcmDataset *dataset, OFBool transferOwnership) |
| attaches an image to the presentation state. | |
| OFCondition | attachImage (DcmFileFormat *fileformat, OFBool transferOwnership) |
| attaches an image to the presentation state. | |
| void | detachImage () |
| detaches and frees the image (incl. | |
| OFBool | isInverse () |
| checks whether image is inverse (shape, plut or mono1). | |
| OFCondition | invertImage () |
| inverts image by changing presentation state LUT or presentation state LUT shape. | |
| OFCondition | getPixelData (const void *&pixelData, unsigned long &width, unsigned long &height) |
| applies presentation state to attached image and returns image bitmap. | |
| OFCondition | getPixelData (void *pixelData, unsigned long size) |
| same as method above apart from the fact that the storage area is handled externally. | |
| const char * | getAttachedImageSOPClassUID () |
| returns the SOP Class UID of the currently attached image. | |
| const char * | getAttachedImageSOPInstanceUID () |
| returns the SOP Instance UID of the currently attached image. | |
| OFCondition | getImageWidth (unsigned long &width) |
| gets the width of the attached image. | |
| OFCondition | getImageHeight (unsigned long &height) |
| gets the height of the attached image. | |
| unsigned long | getPrintBitmapSize () |
| gets number of bytes used for the print bitmap. | |
| OFCondition | setMinimumPrintBitmapWidthHeight (unsigned long width, unsigned long height) |
| sets the minimum print bitmap width and height. | |
| OFCondition | setMaximumPrintBitmapWidthHeight (unsigned long width, unsigned long height) |
| sets the maximum print bitmap width and height. | |
| OFCondition | getPrintBitmapWidthHeight (unsigned long &width, unsigned long &height) |
| gets width and height of print bitmap. | |
| OFCondition | getPrintBitmapWidth (unsigned long &width) |
| gets width of print bitmap. | |
| OFCondition | getPrintBitmapHeight (unsigned long &height) |
| gets height of print bitmap. | |
| double | getPrintBitmapPixelAspectRatio () |
| gets the presentation pixel aspect ratio for the print bitmap. | |
| OFCondition | getPrintBitmapRequestedImageSize (OFString &requestedImageSize) |
| gets requested image size for print bitmap. | |
| OFCondition | getPrintBitmap (void *bitmap, unsigned long size, OFBool inversePLUT=OFFalse) |
| writes the bitmap data into the given buffer. | |
| OFCondition | createPreviewImage (unsigned long maxWidth, unsigned long maxHeight, OFBool clipMode=OFFalse) |
| creates a new preview image based on the current image and pstate. | |
| void | deletePreviewImage () |
| deletes and disables the current preview image. | |
| unsigned long | getPreviewImageSize () |
| gets number of bytes used for the preview image bitmap. | |
| OFCondition | getPreviewImageWidthHeight (unsigned long &width, unsigned long &height) |
| gets current width and height of the preview image. | |
| OFCondition | getPreviewImageWidth (unsigned long &width) |
| gets current width of the preview image. | |
| OFCondition | getPreviewImageHeight (unsigned long &height) |
| gets current height of the preview image. | |
| OFCondition | getPreviewImageBitmap (void *bitmap, unsigned long size) |
| writes the bitmap data of the preview image into the given buffer. | |
| OFCondition | getImageMinMaxPixelRange (double &minValue, double &maxValue) |
| gets smallest and biggest possible pixel value in the attached image. | |
| OFCondition | getImageMinMaxPixelValue (double &minValue, double &maxValue) |
| gets smallest and biggest occuring pixel value in the attached image. | |
| OFCondition | getImageNumberOfFrames (unsigned long &frames) |
| gets the number of frames of the current (attached) image. | |
| OFCondition | selectImageFrameNumber (unsigned long frame) |
| selects one frame of a multiframe image. | |
| unsigned long | getSelectedImageFrameNumber () |
| gets the index of the currently selected frame in a multi-frame image. | |
| DVPSDisplayTransform | getDisplayTransform () |
| gets the currently selected display transform. | |
| void | setDisplayTransform (DVPSDisplayTransform transform) |
| activates or deactivates display correction. | |
| Uint16 | convertPValueToDDL (Uint16 pvalue, unsigned int bits=8) |
| converts a 16-bit P-Value to an 8-bit DDL value for on-sceen display. | |
| OFCondition | writeHardcopyImageAttributes (DcmItem &dset) |
| writes the patient module attributes and a source image sequence for a grayscale hardcopy image. | |
| const char * | getCurrentImageModality () |
| gets the modality of the attached image. | |
| Uint16 | findOverlayGroup (Uint16 currentGroup=0) |
| tries to find an overlay repeating group that is not used in the presentation state or the attached image. | |
| void | renderPixelData (OFBool display=OFTrue) |
| prepares pixel data for image and overlays for access. | |
| DVPSDisplayedArea * | getDisplayedAreaSelection () |
| attempts to find the displayed area selection for the current image and frame. | |
| DVPSSoftcopyVOI * | getCurrentSoftcopyVOI () |
| attempts to find the Softcopy VOI LUT item for the current image and frame. | |
| void | setLog (OFConsole *stream, OFBool verbMode, OFBool dbgMode) |
| sets a new log stream | |
Static Private Member Functions | |
| static OFCondition | activateOverlayHelper (DVPSOverlay &ovl, DicomImage &image, OFBool asShutter=OFFalse, Uint16 pvalue=0) |
| helper method that activates the given overlay in the given image | |
Private Attributes | |
| DcmDataset * | currentImageDataset |
| a pointer to the DICOM dataset comprising the image to which the presentation state is currently applied | |
| DcmFileFormat * | currentImageFileformat |
| a pointer to the fileformat (if it exists) of the DICOM dataset comprising the image to which the presentation state is currently applied | |
| DicomImage * | currentImage |
| a pointer to the dcmimage representation of the image to which the presentation state is currently applied | |
| DicomImage * | previewImage |
| a pointer to the dcmimage representation of the (smaller) preview image to which the presentation state is currently applied | |
| unsigned long | currentImageWidth |
| contains the width of the attached image without consideration of rotation. | |
| unsigned long | currentImageHeight |
| contains the height of the attached image without consideration of rotation. | |
| unsigned long | renderedImageWidth |
| contains the width of the attached image after pixel data have been rendered (w/o clipping). | |
| unsigned long | renderedImageHeight |
| contains the height of the attached image after pixel data have been rendered (w/o clipping). | |
| signed long | renderedImageTop |
| contains the top hand corner of the attached image after pixel data have been rendered. | |
| signed long | renderedImageLeft |
| contains the left hand corner of the attached image after pixel data have been rendered. | |
| signed long | renderedImageBottom |
| contains the bottom hand corner of the attached image after pixel data have been rendered. | |
| signed long | renderedImageRight |
| contains the right hand corner of the attached image after pixel data have been rendered. | |
| char * | currentImageSOPClassUID |
| contains the SOP Class UID of the attached image | |
| char * | currentImageSOPInstanceUID |
| contains the SOP Instance UID of the attached image | |
| unsigned long | currentImageSelectedFrame |
| contains the current selected frame number of the attached image. | |
| OFBool | currentImageOwned |
| a flag describing whether the presentation state is owner of the DICOM dataset in currentImageDataset/currentImageFileformat. | |
| OFBool | currentImageVOIValid |
| a flag describing whether the VOI settings in currentImage match the ones in the presentation state. | |
| OFBool | currentImagePLUTValid |
| a flag describing whether the presentation LUT settings in currentImage match the ones in the presentation state. | |
| OFBool | currentImageFlip |
| a flag describing whether currentImage has been flipped | |
| DVPSRotationType | currentImageRotation |
| a flag describing the current rotation angle of currentImage | |
| int | currentImageOverlaysValid |
| a flag describing whether the Overlay settings in currentImage match the ones in the presentation state. | |
| DVPSCurve_PList | currentImageCurveList |
| list of curves of the currently attached image | |
| DVPSVOILUT_PList | currentImageVOILUTList |
| list of VOI LUTs of the currently attached image | |
| DVPSVOIWindow_PList | currentImageVOIWindowList |
| list of VOI Windows of the currently attached image | |
| DcmCodeString | currentImageModality |
| modality of currently attached image (if any) | |
| OFBool | currentImageMonochrome1 |
| true if attached image is MONOCHROME1 | |
| DVPSDisplayTransform | displayTransform |
| flag indicating the currently selected display transform DVPSD_none if switched off | |
| OFBool | imageInverse |
| a flag describing whether current image is inverse | |
| DiDisplayFunction ** | displayFunction |
| reference to list of display functions if existing | |
| unsigned long | minimumPrintBitmapWidth |
| minimum width of print bitmap (used for implicit scaling) | |
| unsigned long | minimumPrintBitmapHeight |
| minimum height of print bitmap (used for implicit scaling) | |
| unsigned long | maximumPrintBitmapWidth |
| maximum width of print bitmap (used for implicit scaling) | |
| unsigned long | maximumPrintBitmapHeight |
| maximum height of print bitmap (used for implicit scaling) | |
| unsigned long | maximumPreviewImageWidth |
| maximum width of (optional) preview image | |
| unsigned long | maximumPreviewImageHeight |
| maximum height of (optional) preview image | |
This class manages the data structures comprising a Presentation State object. Presentation states can be created, read, written, and modified.
Definition at line 47 of file dvpstat.h.
|
||||||||||||||||||||||||||||||||
|
default constructor
|
|
|
activates an overlay as bitmap shutter. The overlay must not be activated on a graphic layer (i.e. getOverlayInPresentationStateActivationLayer(idx) != DVPS_IDX_NONE, otherwise this method fails.
|
|
||||||||||||||||||||
|
helper method that activates the given overlay in the given image
|
|
||||||||||||
|
activates the given overlay from the attached image on the given graphic layer. If the overlay is already activated (i.e. getOverlayInImageActivationLayer(idx) != DVPS_IDX_NONE) this method fails.
|
|
||||||||||||
|
activates the given overlay from the presentation state on the given graphic layer. If the overlay is already activated or used as a bitmap overlay (i.e. getOverlayInPresentationStateActivationLayer(idx) != DVPS_IDX_NONE or overlayIsBitmapShutter(idx) == OFTrue) this method fails.
|
|
||||||||||||
|
checks whether the given activated overlay is a ROI (region of interest) overlay.
|
|
||||||||||||
|
activates curve in presentation state. This method adds an activation for the given curve from the attached image to the given graphic layer in the presentation state.
|
|
||||||||||||
|
creates a new graphic object on the given layer. Returns a pointer to the new graphic object. If the creation of the graphic object fails or if the graphic layer does not exist, NULL is returned.
|
|
||||||||||||||||
|
adds a reference to the currently attached image to this presentation state. This method checks if the given image is not yet referenced and if its Study UID and SOP class match for this presentation state and returns an error code otherwise.
|
|
||||||||||||||||
|
adds a new overlay bitmap to the presentation state. The overlay is read from a DICOM dataset which must contain the attributes required for a graphic or ROI overlay, see class DVPSOverlay. The dataset can be an image or standalone overlay IOD. The overlay data is copied into the presentation state, i.e. the DICOM dataset can be deleted after execution of this method.
|
|
||||||||||||
|
sets polygonal display shutter point. This method adds a point to the polygonal display shutter, which must already have at least an origin. If the point set with this method is identical to the origin of the shutter, the shutter is activated and a possible bitmap shutter is deactivated. If no shutter display value exists, a default of 0 (black) is set.
|
|
||||||||||||
|
creates a new text object on the given layer. Returns a pointer to the new text object. If the creation of the text object fails or if the graphic layer does not exist, NULL is returned.
|
|
||||||||||||
|
attaches an image to the presentation state. If an image is already attached to the presentation state, the old image is detached (and freed if necessary) and the new image is attached. A preview image is created automatically (if values for preview resolution are valid).
|
|
||||||||||||
|
attaches an image to the presentation state. If an image is already attached to the presentation state, the old image is detached (and freed if necessary) and the new image is attached. A preview image is created automatically (if values for preview resolution are valid).
|
|
|
checks if "TRUE SIZE" can be used as presentation size mode for the current image and frame (i.e. pixel spacing is known).
|
|
||||||||||||
|
changes the repeating group used for an overlay in the presentation state. Since overlays in the presentation state can shadow overlays in the attached image, execution of this method may change the number of overlays reported in the attached image.
|
|
|
resets the object to initial state. After this call, the object is in the same state as after creation with the default constructor. Reimplemented from DcmPresentationState. |
|
||||||||||||
|
converts a 16-bit P-Value to an 8-bit DDL value for on-sceen display. If a display function is set and enabled (see setDisplayTransform()), the DDL is corrected for the nonlinearity of the display, otherwise a simple linear mapping is performed. For 12-bit DDL values (hardcopy) the display function is automatically disabled.
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
creates a default presentation state for a DICOM image. A number of flags specify how curves, overlays, VOI transformations, a display shutter and a presentation LUT shape should be treated when found in the image IOD. If this method returns an error code, the object is in undefined state afterwards.
Reimplemented from DcmPresentationState. |
|