33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmpstat/dcmpstat.h"
60 unsigned long minPrintBitmapX=0,
61 unsigned long minPrintBitmapY=0,
62 unsigned long maxPrintBitmapX=0,
63 unsigned long maxPrintBitmapY=0,
64 unsigned long maxPreviewImageX=0,
65 unsigned long maxPreviewImageY=0);
115 DVPSoverlayActivation overlayActivation = DVPSO_copyOverlays,
116 DVPSVOIActivation voiActivation = DVPSV_preferVOILUT,
117 OFBool curveActivation = OFTrue,
118 OFBool shutterActivation = OFTrue,
119 OFBool presentationActivation = OFTrue,
120 DVPSGraphicLayering layering = DVPSG_twoLayers,
121 const char * aetitle = NULL,
122 const char * filesetID = NULL,
123 const char * filesetUID = NULL);
135 const char *aetitle=NULL,
136 const char *filesetID=NULL,
137 const char *filesetUID=NULL);
266 DVPSObjectApplicability applicability=DVPSB_currentImage);
275 DVPSObjectApplicability applicability=DVPSB_currentImage);
286 DVPSObjectApplicability applicability=DVPSB_currentImage);
304 DVPSObjectApplicability applicability=DVPSB_currentImage);
311 void deactivateVOI(DVPSObjectApplicability applicability=DVPSB_currentImage);
400 DVPSPresentationSizeMode sizeMode,
401 Sint32 tlhcX, Sint32 tlhcY,
402 Sint32 brhcX, Sint32 brhcY,
403 double magnification=1.0,
404 DVPSObjectApplicability applicability=DVPSB_currentImage);
425 DVPSPresentationSizeMode sizeMode,
426 Sint32 tlhcX, Sint32 tlhcY,
427 Sint32 brhcX, Sint32 brhcY,
428 double magnification=1.0,
429 DVPSObjectApplicability applicability=DVPSB_currentImage);
509 DVPSObjectApplicability applicability=DVPSB_allImages);
535 DVPSObjectApplicability applicability=DVPSB_allImages);
567 DVPSObjectApplicability applicability=DVPSB_allImages);
593 DVPSObjectApplicability applicability=DVPSB_allImages);
674 const void *&overlayData,
676 unsigned int &height,
677 unsigned int &left_pos,
678 unsigned int &top_pos,
681 unsigned int bits = 8);
874 const void *&pixelData,
875 unsigned long &width,
876 unsigned long &height);
934 unsigned long height);
944 unsigned long height);
954 unsigned long &height);
1001 OFBool inversePLUT = OFFalse);
1017 unsigned long maxHeight,
1018 OFBool clipMode = OFFalse);
1036 unsigned long &height);
1057 unsigned long size);
1190 OFBool asShutter = OFFalse,
DVPSGraphicObject * addGraphicObject(size_t layer, DVPSObjectApplicability applicability=DVPSB_allImages)
creates a new graphic object on the given layer.
OFCondition getCurrentWindowWidth(double &w)
gets the width of the current VOI window.
const char * getActiveOverlayLabel(size_t layer, size_t idx)
gets the overlay label of the given activated overlay.
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 r...
a class representing a list of DICOM elements in which each element has a different tag and elements ...
unsigned long getPreviewImageSize()
gets number of bytes used for the preview image bitmap.
OFCondition activateOverlayAsBitmapShutter(size_t idx)
activates an overlay as bitmap shutter.
signed long renderedImageRight
contains the right hand corner of the attached image after pixel data have been rendered.
OFCondition getCurrentWindowCenter(double &c)
get the center of the current VOI window.
DVPSCurve_PList currentImageCurveList
list of curves of the currently attached image
OFBool haveActiveVOILUT()
check if a VOI LUT is currently active
OFCondition addCurve(size_t layer, size_t curveidxinimage)
activates curve in presentation state.
const char * getDescriptionOfVOIWindowsInImage(size_t idx)
returns a description string for the given VOI Window in the attached image.
DVPSCurve * getCurveInImage(size_t idx)
gets the curve with the given index from the attached image.
OFCondition activateOverlayInPresentationState(size_t layer, size_t idx)
activates the given overlay from the presentation state on the given graphic layer.
OFCondition getPreviewImageWidthHeight(unsigned long &width, unsigned long &height)
gets current width and height of the preview image.
OFCondition getImageHeight(unsigned long &height)
gets the height of the attached image.
const char * getOverlayInImageLabel(size_t idx)
gets the overlay label of the given overlay in the attached image.
unsigned long currentImageWidth
contains the width of the attached image without consideration of rotation.
OFCondition invertImage()
inverts image by changing presentation state LUT or presentation state LUT shape. ...
unsigned long maximumPrintBitmapWidth
maximum width of print bitmap (used for implicit scaling)
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 referen...
OFCondition getDisplayedAreaPresentationPixelSpacing(double &x, double &y)
gets the presentation pixel spacing for the current image and frame if it is known.
a Grayscale Softcopy Presentation State.
OFCondition selectImageFrameNumber(unsigned long frame)
selects one frame of a multiframe image.
OFCondition setMaximumPrintBitmapWidthHeight(unsigned long width, unsigned long height)
sets the maximum print bitmap width and height.
OFCondition getImageWidth(unsigned long &width)
gets the width of the attached image.
OFCondition activateOverlayInImage(size_t layer, size_t idx)
activates the given overlay from the attached image on the given graphic layer.
void detachImage()
detaches and frees the image (incl.
const char * getActiveOverlayDescription(size_t layer, size_t idx)
gets the overlay description of the given activated overlay.
DVPSVOIWindow_PList currentImageVOIWindowList
list of VOI Windows of the currently attached image
OFBool currentImageVOIValid
a flag describing whether the VOI settings in currentImage match the ones in the presentation state...
OFCondition getPixelData(const void *&pixelData, unsigned long &width, unsigned long &height)
applies presentation state to attached image and returns image bitmap.
unsigned long maximumPreviewImageWidth
maximum width of (optional) preview image
OFCondition read(DcmItem &dset)
reads a presentation state from a DICOM dataset.
an item of the text object sequence in a presentation state (internal use only).
OFBool isInverse()
checks whether image is inverse (shape, plut or mono1).
unsigned long currentImageSelectedFrame
contains the current selected frame number of the attached image.
OFCondition getDisplayedAreaPresentationPixelMagnificationRatio(double &magnification)
gets the presentation pixel magnification ratio for the current image and frame if it is present...
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.
unsigned long minimumPrintBitmapWidth
minimum width of print bitmap (used for implicit scaling)
OFCondition setVOIWindowFromImage(size_t idx, DVPSObjectApplicability applicability=DVPSB_currentImage)
activates one of the VOI Windows from the attached image.
a Grayscale Softcopy Presentation State.
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.
Uint16 convertPValueToDDL(Uint16 pvalue, unsigned int bits=8)
converts a 16-bit P-Value to an 8-bit DDL value for on-sceen display.
double getDisplayedAreaPresentationPixelAspectRatio()
gets the presentation pixel aspect ratio for for the current image and frame.
OFCondition getImageMinMaxPixelValue(double &minValue, double &maxValue)
gets smallest and biggest occuring pixel value in the attached image.
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.
const char * getCurrentImageModality()
gets the modality of the attached image.
the list of VOI Windows contained in an image attached to a presentation state.
static OFCondition activateOverlayHelper(DVPSOverlay &ovl, DicomImage &image, OFBool asShutter=OFFalse, Uint16 pvalue=0)
helper method that activates the given overlay in the given image
OFCondition setGammaVOILUT(double gammaValue, DVPSObjectApplicability applicability=DVPSB_currentImage)
stores VOI lookup table with a gamma curve shape in the presentation state.
double getPrintBitmapPixelAspectRatio()
gets the presentation pixel aspect ratio for the print bitmap.
size_t getNumberOfGraphicObjects(size_t layer)
returns the number of graphic objects for the given graphic layer.
const char * getCurrentVOIDescription()
returns a description string for a currently active VOI transform.
DVPSCurve * getCurve(size_t layer, size_t idx)
gets the curve with the given index on the given layer.
OFCondition attachImage(DcmDataset *dataset, OFBool transferOwnership)
attaches an image to the presentation state.
DVPSPresentationSizeMode getDisplayedAreaPresentationSizeMode()
gets the presentation size mode for the current image and frame.
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 presenta...
void deletePreviewImage()
deletes and disables the current preview image.
unsigned long currentImageHeight
contains the height of the attached image without consideration of rotation.
OFCondition setPresentationLookupTable(DcmUnsignedShort &lutDescriptor, DcmUnsignedShort &lutData, DcmLongString &lutExplanation)
stores a presentation lookup table in the presentation state.
unsigned long getSelectedImageFrameNumber()
gets the index of the currently selected frame in a multi-frame image.
DicomImage * previewImage
a pointer to the dcmimage representation of the (smaller) preview image to which the presentation sta...
OFBool currentImagePLUTValid
a flag describing whether the presentation LUT settings in currentImage match the ones in the present...
void renderPixelData(OFBool display=OFTrue)
prepares pixel data for image and overlays for access.
OFCondition setVOIWindow(double wCenter, double wWidth, const char *description=NULL, DVPSObjectApplicability applicability=DVPSB_currentImage)
sets a user defined VOI window center and width.
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
OFCondition getImageNumberOfFrames(unsigned long &frames)
gets the number of frames of the current (attached) image.
void setDisplayTransform(DVPSDisplayTransform transform)
activates or deactivates display correction.
OFCondition writePresentationLUTforPrint(DcmItem &dset)
writes the current Presentation LUT to a DICOM dataset.
OFCondition addOverlayToPresentationState(DcmItem &overlayIOD, Uint16 groupInItem, Uint16 newGroup=0)
adds a new overlay bitmap to the presentation state.
DVPSDisplayTransform displayTransform
flag indicating the currently selected display transform DVPSD_none if switched off ...
DVPSGraphicObject * getGraphicObject(size_t layer, size_t idx)
gets the graphic object with the given index on the given layer.
an overlay contained in a presentation state (internal use only).
const char * getDescriptionOfVOILUTsInImage(size_t idx)
returns a description string for the given VOI LUT in the attached image.
DcmDataset * currentImageDataset
a pointer to the DICOM dataset comprising the image to which the presentation state is currently appl...
signed long renderedImageBottom
contains the bottom hand corner of the attached image after pixel data have been rendered.
OFBool overlayInImageIsROI(size_t idx)
checks whether the given overlay in the attached image is a ROI (region of interest) overlay...
OFCondition writeHardcopyImageAttributes(DcmItem &dset)
writes the patient module attributes and a source image sequence for a grayscale hardcopy image...
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.
OFBool currentImageOwned
a flag describing whether the presentation state is owner of the DICOM dataset in currentImageDataset...
DcmCodeString currentImageModality
modality of currently attached image (if any)
char * currentImageSOPInstanceUID
contains the SOP Instance UID of the attached image
the list of VOI LUTs contained in an image attached to a presentation state.
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 fra...
OFCondition setCurrentPresentationLUT(DVPSPresentationLUTType newType)
sets the current Presentation LUT type.
unsigned long renderedImageWidth
contains the width of the attached image after pixel data have been rendered (w/o clipping)...
OFCondition getImageMinMaxPixelRange(double &minValue, double &maxValue)
gets smallest and biggest possible pixel value in the attached image.
the list of curves contained in image which is attached to a presentation state.
OFBool canUseDisplayedAreaTrueSize()
checks if "TRUE SIZE" can be used as presentation size mode for the current image and frame (i...
OFCondition getPreviewImageHeight(unsigned long &height)
gets current height of the preview image.
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 referen...
a class representing the DICOM value representation 'Long String' (LO)
a class representing the DICOM value representation 'Code String' (CS)
unsigned long minimumPrintBitmapHeight
minimum height of print bitmap (used for implicit scaling)
DVPSVOILUT_PList currentImageVOILUTList
list of VOI LUTs of the currently attached image
OFCondition removeGraphicObject(size_t layer, size_t idx)
deletes the graphic object with the given index on the given layer.
OFBool imageInverse
a flag describing whether current image is inverse
OFCondition removeGraphicLayer(size_t idx)
removes and deletes a graphic layer.
DVPSDisplayTransform getDisplayTransform()
gets the currently selected display transform.
DVPSSoftcopyVOI * getCurrentSoftcopyVOI()
attempts to find the Softcopy VOI LUT item for the current image and frame.
OFCondition removeImageReferenceAttached()
removes a reference to the currently attached image from this presentation state. ...
OFCondition getPrintBitmapRequestedImageSize(OFString &requestedImageSize)
gets requested image size for print bitmap.
virtual ~DVPresentationState()
destructor
unsigned long renderedImageHeight
contains the height of the attached image after pixel data have been rendered (w/o clipping)...
OFBool overlayIsSuitableAsBitmapShutter(size_t idx)
checks if an overlay from the presentation state is suitable for use as a bitmap shutter.
void deactivateVOI(DVPSObjectApplicability applicability=DVPSB_currentImage)
deactivates the current VOI transformation.
DVPSTextObject * addTextObject(size_t layer, DVPSObjectApplicability applicability=DVPSB_allImages)
creates a new text object on the given layer.
size_t getNumberOfCurvesInImage()
returns the number of curves in the attached image that could be activated in the presentation state...
Uint16 getOverlayInImageGroup(size_t idx)
gets the repeating group number of the given overlay in the attached image.
an item of the graphic object sequence in a presentation state (internal use only).
OFCondition setRectShutter(Sint32 lv, Sint32 rv, Sint32 uh, Sint32 lh)
sets and activates rectangular display shutter.
OFCondition getPrintBitmapHeight(unsigned long &height)
gets height of print bitmap.
void clear()
resets the object to initial state.
OFCondition setVOILUTFromImage(size_t idx, DVPSObjectApplicability applicability=DVPSB_currentImage)
activates one of the VOI LUTs from the attached image.
OFBool haveActiveVOIWindow()
check if a VOI window is currently active
Class to handle hardcopy and softcopy device characteristics file and manage display LUTs (for calibr...
char * currentImageSOPClassUID
contains the SOP Class UID of the attached image
OFCondition getPreviewImageBitmap(void *bitmap, unsigned long size)
writes the bitmap data of the preview image into the given buffer.
a class representing the DICOM value representation 'Unsigned Short' (US)
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.
DicomImage * currentImage
a pointer to the dcmimage representation of the image to which the presentation state is currently ap...
an item of the displayed area selection sequence in a presentation state.
a class handling the DICOM dataset format (files without meta header)
the representation of one item of the Softcopy VOI LUT Sequence
OFCondition setMinimumPrintBitmapWidthHeight(unsigned long width, unsigned long height)
sets the minimum print bitmap width and height.
DiDisplayFunction ** displayFunction
reference to list of display functions if existing
OFBool currentImageMonochrome1
true if attached image is MONOCHROME1
OFCondition removeOverlayFromPresentationState(size_t idx)
removes an overlay from the presentation state.
const char * getAttachedImageSOPInstanceUID()
returns the SOP Instance UID of the currently attached image.
size_t getNumberOfVOILUTsInImage()
gets the number of VOI LUTs available in the attached image.
DVPSDisplayedArea * getDisplayedAreaSelection()
attempts to find the displayed area selection for the current image and frame.
Interface class for dcmimgle/dcmimage module.
unsigned long maximumPrintBitmapHeight
maximum height of print bitmap (used for implicit scaling)
OFCondition getPrintBitmapWidth(unsigned long &width)
gets width of print bitmap.
OFCondition setVOILUT(DcmUnsignedShort &lutDescriptor, DcmUnsignedShort &lutData, DcmLongString &lutExplanation, DVPSObjectApplicability applicability=DVPSB_currentImage)
stores a VOI lookup table in the presentation state.
OFCondition changeOverlayGroupInPresentationState(size_t idx, Uint16 newGroup=0)
changes the repeating group used for an overlay in the presentation state.
the representation of one Curve in a DICOM image.
signed long renderedImageLeft
contains the left hand corner of the attached image after pixel data have been rendered.
OFCondition getPrintBitmapWidthHeight(unsigned long &width, unsigned long &height)
gets width and height of print bitmap.
OFCondition getPrintBitmap(void *bitmap, unsigned long size, OFBool inversePLUT=OFFalse)
writes the bitmap data into the given buffer.
a simple string class that implements a subset of std::string.
OFCondition addPolyShutterVertex(Sint32 x, Sint32 y)
sets polygonal display shutter point.
size_t getNumberOfTextObjects(size_t layer)
returns the number of text objects for the given graphic layer.
size_t getOverlayInImageActivationLayer(size_t idx)
gets the index of the activation layer on which the given overlay from the attached image is activate...
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 sta...
Uint16 findOverlayGroup(Uint16 currentGroup=0)
tries to find an overlay repeating group that is not used in the presentation state or the attached i...
const char * getAttachedImageSOPClassUID()
returns the SOP Class UID of the currently attached image.
unsigned long maximumPreviewImageHeight
maximum height of (optional) preview image
DVPSTextObject * getTextObject(size_t layer, size_t idx)
gets the text object with the given index on the given layer.
const char * getOverlayInImageDescription(size_t idx)
gets the overlay description of the given overlay in the attached image.
DcmFileFormat * currentImageFileformat
a pointer to the fileformat (if it exists) of the DICOM dataset comprising the image to which the pre...
size_t getNumberOfOverlaysInImage()
gets the number of overlays which are embedded in the image currently attached to the presentation st...
size_t getNumberOfVOIWindowsInImage()
gets the number of VOI Windows available in the attached image.
OFBool currentImageFlip
a flag describing whether currentImage has been flipped
unsigned long getPrintBitmapSize()
gets number of bytes used for the print bitmap.
OFCondition createPreviewImage(unsigned long maxWidth, unsigned long maxHeight, OFBool clipMode=OFFalse)
creates a new preview image based on the current image and pstate.
OFCondition setCircularShutter(Sint32 centerX, Sint32 centerY, Sint32 radius)
sets and activates circular display shutter.
OFBool isMonochrome1Image()
checks whether the attached image is MONOCHROME1.
OFCondition getPreviewImageWidth(unsigned long &width)
gets current width of the preview image.
OFBool activeOverlayIsROI(size_t layer, size_t idx)
checks whether the given activated overlay is a ROI (region of interest) overlay. ...
General purpose class for condition codes.
OFCondition setDefaultPresentationLUTShape()
resets the Presentation LUT to the default LUT shape which is DVPSP_identity for MONOCHROME2 images a...
OFCondition removeTextObject(size_t layer, size_t idx)
deletes the text object with the given index on the given layer.
signed long renderedImageTop
contains the top hand corner of the attached image after pixel data have been rendered.
void removeShutter(DVPSShutterType type)
deactivates display shutter of given type.