OFFIS DCMTK  Version 3.6.0
dvpstat.h
1 /*
2  *
3  * Copyright (C) 1998-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmpstat
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose:
19  * classes: DVPresentationState
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:37 $
23  * CVS/RCS Revision: $Revision: 1.47 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 #ifndef DVPSTAT_H
31 #define DVPSTAT_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 #include "dcmtk/dcmpstat/dcmpstat.h"
35 
36 class DicomImage;
37 class DiDisplayFunction;
38 
44 {
45 public:
59  DiDisplayFunction **dispFunction=NULL,
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);
66 
68  virtual ~DVPresentationState();
69 
74  void clear();
75 
86  OFCondition read(DcmItem &dset);
87 
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);
124 
135  const char *aetitle=NULL,
136  const char *filesetID=NULL,
137  const char *filesetUID=NULL);
138 
143 
150  OFCondition setCurrentPresentationLUT(DVPSPresentationLUTType newType);
151 
159 
173  DcmUnsignedShort& lutDescriptor,
174  DcmUnsignedShort& lutData,
175  DcmLongString& lutExplanation);
176 
188 
197 
204 
208  OFBool haveActiveVOIWindow();
209 
213  OFBool haveActiveVOILUT();
214 
219  const char *getCurrentVOIDescription();
220 
227 
234 
237  size_t getNumberOfVOILUTsInImage();
238 
242 
249  const char *getDescriptionOfVOILUTsInImage(size_t idx);
250 
257  const char *getDescriptionOfVOIWindowsInImage(size_t idx);
258 
265  OFCondition setVOILUTFromImage(size_t idx,
266  DVPSObjectApplicability applicability=DVPSB_currentImage);
267 
275  DVPSObjectApplicability applicability=DVPSB_currentImage);
276 
285  OFCondition setVOIWindow(double wCenter, double wWidth, const char *description=NULL,
286  DVPSObjectApplicability applicability=DVPSB_currentImage);
287 
301  DcmUnsignedShort& lutDescriptor,
302  DcmUnsignedShort& lutData,
303  DcmLongString& lutExplanation,
304  DVPSObjectApplicability applicability=DVPSB_currentImage);
305 
311  void deactivateVOI(DVPSObjectApplicability applicability=DVPSB_currentImage);
312 
325  OFCondition setGammaVOILUT(double gammaValue, DVPSObjectApplicability applicability=DVPSB_currentImage);
326 
331  DVPSPresentationSizeMode getDisplayedAreaPresentationSizeMode();
332 
340 
350  OFCondition getStandardDisplayedArea(Sint32& tlhcX, Sint32& tlhcY, Sint32& brhcX, Sint32& brhcY);
351 
361  OFCondition getImageRelativeDisplayedArea(Sint32& tlhcX, Sint32& tlhcY, Sint32& brhcX, Sint32& brhcY);
362 
369 
375 
381 
400  DVPSPresentationSizeMode sizeMode,
401  Sint32 tlhcX, Sint32 tlhcY,
402  Sint32 brhcX, Sint32 brhcY,
403  double magnification=1.0,
404  DVPSObjectApplicability applicability=DVPSB_currentImage);
405 
425  DVPSPresentationSizeMode sizeMode,
426  Sint32 tlhcX, Sint32 tlhcY,
427  Sint32 brhcX, Sint32 brhcY,
428  double magnification=1.0,
429  DVPSObjectApplicability applicability=DVPSB_currentImage);
430 
435  void removeShutter(DVPSShutterType type);
436 
447  OFCondition setRectShutter(Sint32 lv, Sint32 rv, Sint32 uh, Sint32 lh);
457  OFCondition setCircularShutter(Sint32 centerX, Sint32 centerY, Sint32 radius);
458 
470  OFCondition addPolyShutterVertex(Sint32 x, Sint32 y);
471 
477  OFCondition removeGraphicLayer(size_t idx);
478 
486  size_t getNumberOfTextObjects(size_t layer);
487 
497  DVPSTextObject *getTextObject(size_t layer, size_t idx);
498 
508  DVPSTextObject *addTextObject(size_t layer,
509  DVPSObjectApplicability applicability=DVPSB_allImages);
510 
519  OFCondition removeTextObject(size_t layer, size_t idx);
520 
534  OFCondition moveTextObject(size_t old_layer, size_t idx, size_t new_layer,
535  DVPSObjectApplicability applicability=DVPSB_allImages);
536 
544  size_t getNumberOfGraphicObjects(size_t layer);
545 
555  DVPSGraphicObject *getGraphicObject(size_t layer, size_t idx);
556 
566  DVPSGraphicObject *addGraphicObject(size_t layer,
567  DVPSObjectApplicability applicability=DVPSB_allImages);
568 
577  OFCondition removeGraphicObject(size_t layer, size_t idx);
578 
592  OFCondition moveGraphicObject(size_t old_layer, size_t idx, size_t new_layer,
593  DVPSObjectApplicability applicability=DVPSB_allImages);
594 
602  DVPSCurve *getCurve(size_t layer, size_t idx);
603 
608  size_t getNumberOfCurvesInImage();
609 
616  DVPSCurve *getCurveInImage(size_t idx);
617 
626  OFCondition addCurve(size_t layer, size_t curveidxinimage);
627 
633  const char *getActiveOverlayLabel(size_t layer, size_t idx);
634 
640  const char *getActiveOverlayDescription(size_t layer, size_t idx);
641 
648  OFBool activeOverlayIsROI(size_t layer, size_t idx);
649 
672  size_t layer,
673  size_t idx,
674  const void *&overlayData,
675  unsigned int &width,
676  unsigned int &height,
677  unsigned int &left_pos,
678  unsigned int &top_pos,
679  OFBool &isROI,
680  Uint16 &fore,
681  unsigned int bits = 8);
682 
690 
695  Uint16 getOverlayInImageGroup(size_t idx);
696 
701  const char *getOverlayInImageLabel(size_t idx);
702 
707  const char *getOverlayInImageDescription(size_t idx);
708 
715  size_t getOverlayInImageActivationLayer(size_t idx);
716 
722  OFBool overlayInImageIsROI(size_t idx);
723 
732 
743  OFCondition changeOverlayGroupInPresentationState(size_t idx, Uint16 newGroup=0);
744 
760  OFCondition addOverlayToPresentationState(DcmItem& overlayIOD, Uint16 groupInItem, Uint16 newGroup=0);
761 
770  OFBool overlayIsSuitableAsBitmapShutter(size_t idx);
771 
780  OFCondition activateOverlayInImage(size_t layer, size_t idx);
781 
791  OFCondition activateOverlayInPresentationState(size_t layer, size_t idx);
792 
801 
810  OFCondition deactivateOverlay(size_t layer, size_t idx);
811 
824  OFCondition attachImage(DcmDataset *dataset, OFBool transferOwnership);
825 
838  OFCondition attachImage(DcmFileFormat *fileformat, OFBool transferOwnership);
839 
842  void detachImage();
843 
847  OFBool isInverse();
848 
854 
874  const void *&pixelData,
875  unsigned long &width,
876  unsigned long &height);
877 
887  void *pixelData,
888  unsigned long size);
889 
893  const char *getAttachedImageSOPClassUID();
894 
898  const char *getAttachedImageSOPInstanceUID();
899 
908  OFCondition getImageWidth(unsigned long &width);
909 
918  OFCondition getImageHeight(unsigned long &height);
919 
924  unsigned long getPrintBitmapSize();
925 
933  OFCondition setMinimumPrintBitmapWidthHeight(unsigned long width,
934  unsigned long height);
935 
943  OFCondition setMaximumPrintBitmapWidthHeight(unsigned long width,
944  unsigned long height);
945 
953  OFCondition getPrintBitmapWidthHeight(unsigned long &width,
954  unsigned long &height);
955 
962  OFCondition getPrintBitmapWidth(unsigned long &width);
963 
970  OFCondition getPrintBitmapHeight(unsigned long &height);
971 
978 
988 
999  OFCondition getPrintBitmap(void *bitmap,
1000  unsigned long size,
1001  OFBool inversePLUT = OFFalse);
1002 
1016  OFCondition createPreviewImage(unsigned long maxWidth,
1017  unsigned long maxHeight,
1018  OFBool clipMode = OFFalse);
1019 
1022  void deletePreviewImage();
1023 
1028  unsigned long getPreviewImageSize();
1029 
1035  OFCondition getPreviewImageWidthHeight(unsigned long &width,
1036  unsigned long &height);
1037 
1042  OFCondition getPreviewImageWidth(unsigned long &width);
1043 
1048  OFCondition getPreviewImageHeight(unsigned long &height);
1049 
1056  OFCondition getPreviewImageBitmap(void *bitmap,
1057  unsigned long size);
1058 
1069  OFCondition getImageMinMaxPixelRange(double &minValue, double& maxValue);
1070 
1081  OFCondition getImageMinMaxPixelValue(double &minValue, double& maxValue);
1082 
1089  OFCondition getImageNumberOfFrames(unsigned long &frames);
1090 
1098  OFCondition selectImageFrameNumber(unsigned long frame);
1099 
1103  unsigned long getSelectedImageFrameNumber();
1104 
1111  DVPSDisplayTransform getDisplayTransform() { return displayTransform; }
1112 
1118  void setDisplayTransform(DVPSDisplayTransform transform) { displayTransform = transform; }
1119 
1129  Uint16 convertPValueToDDL(Uint16 pvalue, unsigned int bits = 8);
1130 
1139 
1143  const char *getCurrentImageModality();
1144 
1153  Uint16 findOverlayGroup(Uint16 currentGroup=0);
1154 
1163  void renderPixelData(OFBool display = OFTrue);
1164 
1171 
1177 
1178 private:
1179 
1188  DVPSOverlay& ovl,
1189  DicomImage &image,
1190  OFBool asShutter = OFFalse,
1191  Uint16 pvalue = 0);
1192 
1193  /* connection with dcmimage */
1194 
1214  unsigned long currentImageWidth;
1217  unsigned long currentImageHeight;
1220  unsigned long renderedImageWidth;
1223  unsigned long renderedImageHeight;
1226  signed long renderedImageTop;
1230  signed long renderedImageLeft;
1234  signed long renderedImageBottom;
1237  signed long renderedImageRight;
1267  DVPSRotationType currentImageRotation;
1273 
1283 
1287 
1291 
1295  DVPSDisplayTransform displayTransform;
1296 
1300 
1304 
1308 
1312 
1316 
1320 
1324 
1328 
1329 };
1330 
1331 #endif
1332 
1333 /*
1334  * $Log: dvpstat.h,v $
1335  * Revision 1.47 2010-10-14 13:16:37 joergr
1336  * Updated copyright header. Added reference to COPYRIGHT file.
1337  *
1338  * Revision 1.46 2009-11-24 14:12:58 uli
1339  * Switched to logging mechanism provided by the "new" oflog module.
1340  *
1341  * Revision 1.45 2009-05-28 10:55:38 joergr
1342  * Fixed various Doxygen API documentation issues.
1343  *
1344  * Revision 1.44 2005/12/08 16:04:07 meichel
1345  * Changed include path schema for all DCMTK header files
1346  *
1347  * Revision 1.43 2003/09/05 14:30:06 meichel
1348  * Introduced new API methods that allow Displayed Areas to be queried
1349  * and set either relative to the image (ignoring rotation and flip) or
1350  * in absolute values as defined in the standard. Rotate and flip methods
1351  * now adjust displayed areas in the presentation state.
1352  *
1353  * Revision 1.42 2003/08/27 14:57:19 meichel
1354  * Splitted class DVPresentationState into a base class DcmPresentationState
1355  * that does not depend on module dcmimgle and current derived class with
1356  * public API identical to the previous version.
1357  *
1358  * Revision 1.41 2002/12/09 13:29:49 joergr
1359  * Renamed parameter/local variable to avoid name clashes with global
1360  * declaration left and/or right (used for as iostream manipulators).
1361  *
1362  * Revision 1.40 2001/09/26 15:36:17 meichel
1363  * Adapted dcmpstat to class OFCondition
1364  *
1365  * Revision 1.39 2001/06/01 15:50:23 meichel
1366  * Updated copyright header
1367  *
1368  * Revision 1.38 2000/11/13 15:50:43 meichel
1369  * Added dcmpstat support methods for creating image references
1370  * in SR documents.
1371  *
1372  * Revision 1.37 2000/07/04 15:58:03 joergr
1373  * Added support for overriding the presentation LUT settings made for the
1374  * image boxes.
1375  *
1376  * Revision 1.36 2000/06/09 10:14:12 joergr
1377  * Added support for rendering inverse presentation LUT into print bitmaps.
1378  *
1379  * Revision 1.35 2000/06/08 17:36:51 joergr
1380  * Corrected bug in addImageReferenceToPState().
1381  *
1382  * Revision 1.34 2000/06/02 16:00:53 meichel
1383  * Adapted all dcmpstat classes to use OFConsole for log and error output
1384  *
1385  * Revision 1.33 2000/05/30 14:21:24 joergr
1386  * Renamed some variables to avoid compiler warnings (reported by gcc 2.9x with
1387  * additional compiler flags).
1388  *
1389  * Revision 1.32 2000/05/30 13:47:03 joergr
1390  * Added support for multi-frame images and multiple references from a single
1391  * presentation to a number of images.
1392  * Removed methods which were already marked as "retired".
1393  * Added new function allowing to set a VOILUT created from a given gamma
1394  * value.
1395  *
1396  * Revision 1.31 2000/03/08 16:28:57 meichel
1397  * Updated copyright header.
1398  *
1399  * Revision 1.30 2000/02/29 12:16:16 meichel
1400  * Fixed bug in dcmpstat library that caused Monochrome1 images
1401  * to be printed inverse if a Presentation LUT was applied.
1402  *
1403  * Revision 1.29 1999/11/15 19:02:16 joergr
1404  * Changed behaviour of method getOverlayData(): parameter 'transp' replaced by
1405  * 'fore' to specify the foreground color used for the overlay plane.
1406  *
1407  * Revision 1.28 1999/11/03 10:36:32 joergr
1408  * Enhanced comments for methods dealing with arrays of pixel data.
1409  *
1410  * Revision 1.27 1999/10/20 10:49:20 joergr
1411  * Enhanced method getOverlayData to support 12 bit data for print.
1412  * Enhanced method convertPValueToDDL to support 12 bit data for print.
1413  * Added support for a down-scaled preview image of the current DICOM image
1414  * (e.g. useful for online-windowing or print preview).
1415  *
1416  * Revision 1.26 1999/10/19 16:24:50 meichel
1417  * Corrected handling of MONOCHROME1 images when used with P-LUTs
1418  *
1419  * Revision 1.25 1999/10/13 14:11:57 meichel
1420  * Added config file entries and access methods
1421  * for user-defined VOI presets, log directory, verbatim logging
1422  * and an explicit list of image display formats for each printer.
1423  *
1424  * Revision 1.24 1999/10/07 17:21:51 meichel
1425  * Reworked management of Presentation LUTs in order to create tighter
1426  * coupling between Softcopy and Print.
1427  *
1428  * Revision 1.23 1999/09/10 12:46:48 meichel
1429  * Added implementations for a number of print API methods.
1430  *
1431  * Revision 1.22 1999/09/10 09:02:32 joergr
1432  * Added support for CIELAB display function. New methods to handle display
1433  * functions. Old methods are marked as retired and should be removed asap.
1434  *
1435  * Revision 1.21 1999/09/07 09:04:37 joergr
1436  * Completed support for getting a print bitmap out of a pstate object.
1437  *
1438  * Revision 1.20 1999/09/01 16:14:42 meichel
1439  * Added support for requested image size to print routines
1440  *
1441  * Revision 1.19 1999/08/27 15:57:58 meichel
1442  * Added methods for saving hardcopy images and stored print objects
1443  * either in file or in the local database.
1444  *
1445  * Revision 1.18 1999/08/25 16:48:01 joergr
1446  * Added minimal support to get a print bitmap out of a pstate object.
1447  *
1448  * Revision 1.17 1999/07/30 13:34:51 meichel
1449  * Added new classes managing Stored Print objects
1450  *
1451  * Revision 1.16 1999/07/22 16:39:13 meichel
1452  * Adapted dcmpstat data structures and API to supplement 33 letter ballot text.
1453  *
1454  * Revision 1.15 1999/05/04 12:28:11 meichel
1455  * Removed carriage returns
1456  *
1457  * Revision 1.14 1999/04/27 11:23:57 joergr
1458  * Added method to check whether current image is inverse or not.
1459  *
1460  * Revision 1.13 1999/03/22 09:05:35 joergr
1461  * Added parameter to get value of (transparent) background color for method
1462  * getOverlayData.
1463  *
1464  * Revision 1.12 1999/03/03 13:26:06 joergr
1465  * Added method to invert an image by changing the presentation state LUT or
1466  * shape.
1467  * Moved method 'isBartenTransformPossible()' from presentation state class to
1468  * interface class.
1469  *
1470  * Revision 1.11 1999/03/02 13:01:02 joergr
1471  * Added method to presentation state class that checks whether Barten
1472  * transformation is possible or not.
1473  *
1474  * Revision 1.10 1999/02/25 18:40:08 joergr
1475  * Added method to fill pixel data into an externally handled storage area.
1476  *
1477  * Revision 1.9 1999/02/18 11:36:38 meichel
1478  * Added new method convertPValueToDDL() to DVPresentationState
1479  * that maps P-Values to DDLs.
1480  *
1481  * Revision 1.8 1999/02/17 10:05:32 meichel
1482  * Moved creation of Display Function object from DVPresentationState to
1483  * DVInterface to avoid unnecessary re-reads.
1484  *
1485  * Revision 1.7 1999/02/09 15:58:57 meichel
1486  * Implemented bitmap shutter activation amd method for
1487  * exchanging graphic layers.
1488  *
1489  * Revision 1.6 1999/02/05 17:45:36 meichel
1490  * Added config file entry for monitor characteristics file. Monitor charac-
1491  * teristics are passed to dcmimage if present to activate Barten transform.
1492  *
1493  * Revision 1.5 1999/01/15 17:33:05 meichel
1494  * added methods to DVPresentationState allowing to access the image
1495  * references in the presentation state. Also added methods allowing to
1496  * get the width and height of the attached image.
1497  *
1498  * Revision 1.4 1999/01/11 13:35:49 meichel
1499  * added new methods getImageAspectRatio, getImageMinMaxPixelRange and
1500  * getImageMinMaxPixelValue to class DVPresentationState.
1501  *
1502  * Revision 1.3 1998/12/22 17:57:07 meichel
1503  * Implemented Presentation State interface for overlays,
1504  * VOI LUTs, VOI windows, curves. Added test program that
1505  * allows to add curve data to DICOM images.
1506  *
1507  * Revision 1.2 1998/12/14 16:10:35 meichel
1508  * Implemented Presentation State interface for graphic layers,
1509  * text and graphic annotations, presentation LUTs.
1510  *
1511  * Revision 1.1 1998/11/27 14:50:34 meichel
1512  * Initial Release.
1513  *
1514  *
1515  */
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 ...
Definition: dcitem.h:51
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.
Definition: dvpstat.h:1237
OFCondition getCurrentWindowCenter(double &c)
get the center of the current VOI window.
DVPSCurve_PList currentImageCurveList
list of curves of the currently attached image
Definition: dvpstat.h:1276
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.
Definition: dvpstat.h:1214
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)
Definition: dvpstat.h:1315
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.
Definition: dcmpstat.h:61
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
Definition: dvpstat.h:1282
OFBool currentImageVOIValid
a flag describing whether the VOI settings in currentImage match the ones in the presentation state...
Definition: dvpstat.h:1257
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
Definition: dvpstat.h:1323
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).
Definition: dvpstx.h:43
OFBool isInverse()
checks whether image is inverse (shape, plut or mono1).
unsigned long currentImageSelectedFrame
contains the current selected frame number of the attached image.
Definition: dvpstat.h:1247
OFCondition getDisplayedAreaPresentationPixelMagnificationRatio(double &magnification)
gets the presentation pixel magnification ratio for the current image and frame if it is present...
a class handling the DICOM file format (with meta header)
Definition: dcfilefo.h:48
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)
Definition: dvpstat.h:1307
OFCondition setVOIWindowFromImage(size_t idx, DVPSObjectApplicability applicability=DVPSB_currentImage)
activates one of the VOI Windows from the attached image.
a Grayscale Softcopy Presentation State.
Definition: dvpstat.h:43
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.
Definition: dvpsvwl.h:44
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.
Definition: dvpstat.h:1217
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...
Definition: dvpstat.h:1211
OFBool currentImagePLUTValid
a flag describing whether the presentation LUT settings in currentImage match the ones in the present...
Definition: dvpstat.h:1261
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.
Definition: dvpstat.h:1118
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 ...
Definition: dvpstat.h:1295
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).
Definition: dvpsov.h:44
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...
Definition: dvpstat.h:1198
signed long renderedImageBottom
contains the bottom hand corner of the attached image after pixel data have been rendered.
Definition: dvpstat.h:1234
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...
Definition: dvpstat.h:1253
DcmCodeString currentImageModality
modality of currently attached image (if any)
Definition: dvpstat.h:1286
char * currentImageSOPInstanceUID
contains the SOP Instance UID of the attached image
Definition: dvpstat.h:1243
the list of VOI LUTs contained in an image attached to a presentation state.
Definition: dvpsvll.h:44
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)...
Definition: dvpstat.h:1220
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.
Definition: dvpscul.h:44
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)
Definition: dcvrlo.h:40
a class representing the DICOM value representation 'Code String' (CS)
Definition: dcvrcs.h:40
unsigned long minimumPrintBitmapHeight
minimum height of print bitmap (used for implicit scaling)
Definition: dvpstat.h:1311
DVPSVOILUT_PList currentImageVOILUTList
list of VOI LUTs of the currently attached image
Definition: dvpstat.h:1279
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
Definition: dvpstat.h:1299
OFCondition removeGraphicLayer(size_t idx)
removes and deletes a graphic layer.
DVPSDisplayTransform getDisplayTransform()
gets the currently selected display transform.
Definition: dvpstat.h:1111
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)...
Definition: dvpstat.h:1223
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).
Definition: dvpsgr.h:43
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...
Definition: didispfn.h:60
char * currentImageSOPClassUID
contains the SOP Class UID of the attached image
Definition: dvpstat.h:1240
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)
Definition: dcvrus.h:40
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...
Definition: dvpstat.h:1207
an item of the displayed area selection sequence in a presentation state.
Definition: dvpsda.h:43
a class handling the DICOM dataset format (files without meta header)
Definition: dcdatset.h:46
the representation of one item of the Softcopy VOI LUT Sequence
Definition: dvpssv.h:45
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
Definition: dvpstat.h:1303
OFBool currentImageMonochrome1
true if attached image is MONOCHROME1
Definition: dvpstat.h:1290
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.
Definition: dcmimage.h:64
unsigned long maximumPrintBitmapHeight
maximum height of print bitmap (used for implicit scaling)
Definition: dvpstat.h:1319
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.
Definition: dvpscu.h:44
signed long renderedImageLeft
contains the left hand corner of the attached image after pixel data have been rendered.
Definition: dvpstat.h:1230
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.
Definition: ofstring.h:86
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
Definition: dvpstat.h:1267
int currentImageOverlaysValid
a flag describing whether the Overlay settings in currentImage match the ones in the presentation sta...
Definition: dvpstat.h:1272
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
Definition: dvpstat.h:1327
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...
Definition: dvpstat.h:1203
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
Definition: dvpstat.h:1264
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.
Definition: dvpstat.h:203
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.
Definition: ofcond.h:305
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.
Definition: dvpstat.h:1226
void removeShutter(DVPSShutterType type)
deactivates display shutter of given type.


Generated on Wed Dec 14 2016 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.11