OFFIS DCMTK  Version 3.6.0
dvpssp.h
1 /*
2  *
3  * Copyright (C) 1999-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: DVPSStoredPrint
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:36 $
23  * CVS/RCS Revision: $Revision: 1.42 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 
31 #ifndef DVPSSP_H
32 #define DVPSSP_H
33 
34 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
35 
36 #include "dcmtk/ofstd/ofstream.h"
37 #include "dcmtk/ofstd/ofstring.h"
38 #include "dcmtk/dcmpstat/dvpstyp.h" /* for enum types */
39 #include "dcmtk/dcmpstat/dvpspll.h" /* for class DVPSPresentationLUT_PList */
40 #include "dcmtk/dcmpstat/dvpsibl.h" /* for class DVPSImageBoxContent_PList */
41 #include "dcmtk/dcmpstat/dvpsabl.h" /* for class DVPSAnnotationContent_PList */
42 #include "dcmtk/dcmpstat/dvpstat.h" /* for class DVPresentationState */
43 #include "dcmtk/dcmpstat/dvpspr.h" /* for class DVPrintMessageHandler */
44 
45 class DicomImage;
47 class DVConfiguration;
52 {
53  public:
59  DVPSStoredPrint(Uint16 illumin, Uint16 reflection, const char *aetitle = NULL);
60 
62  DVPSStoredPrint(const DVPSStoredPrint& copy);
63 
68  DVPSStoredPrint *clone() { return new DVPSStoredPrint(*this); }
69 
71  virtual ~DVPSStoredPrint();
72 
77  void clear();
78 
88  OFCondition read(DcmItem &dset);
89 
107  DcmItem &dset,
108  OFBool writeRequestedImageSize,
109  OFBool limitImages,
110  OFBool updateDecimateCrop,
111  OFBool ignoreEmptyImages);
112 
117  OFCondition setOriginator(const char *aetitle);
118 
122  OFCondition setDestination(const char *aetitle);
123 
127  OFCondition setPrinterName(const char *name);
128 
136  OFCondition setImageDisplayFormat(unsigned long columns, unsigned long rows);
137 
144  OFCondition setFilmSizeID(const char *value);
145 
152  OFCondition setMagnificationType(const char *value);
153 
160  OFCondition setSmoothingType(const char *value);
161 
168  OFCondition setConfigurationInformation(const char *value);
169 
176  OFCondition setResolutionID(const char *value);
177 
184  OFCondition setFilmOrientation(DVPSFilmOrientation value);
185 
192  OFCondition setTrim(DVPSTrimMode value);
193 
201  OFCondition setRequestedDecimateCropBehaviour(DVPSDecimateCropBehaviour value);
202 
209  OFCondition setBorderDensity(const char *value);
210 
217  OFCondition setEmtpyImageDensity(const char *value);
218 
225  OFCondition setMaxDensity(const char *value);
226 
233  OFCondition setMinDensity(const char *value);
234 
245  OFCondition newPrinter(const char *name = NULL, const char *destinationAE = NULL); // short cut, delete all optional settings
246 
250  const char *getOriginator();
254  const char *getDestination();
258  const char *getPrinterName();
259 
263  unsigned long getImageDisplayFormatColumns();
264 
268  unsigned long getImageDisplayFormatRows();
269 
273  DVPSFilmOrientation getFilmOrientation();
274 
278  DVPSTrimMode getTrim();
279 
284  DVPSDecimateCropBehaviour getRequestedDecimateCropBehaviour()
285  {
286  return decimateCropBehaviour;
287  }
288 
292  const char *getStudyInstanceUID();
293 
297  const char *getSeriesInstanceUID();
298 
302  const char *getSOPInstanceUID();
303 
307  const char *getFilmSizeID();
308 
312  const char *getMagnificationType();
313 
317  const char *getSmoothingType();
318 
322  const char *getConfigurationInformation();
323 
327  const char *getResolutionID();
328 
332  const char *getBorderDensity();
333 
337  const char *getEmtpyImageDensity();
338 
344  const char *getMaxDensity();
345 
351  const char *getMinDensity();
352 
356  Uint16 getMaxDensityValue();
357 
361  Uint16 getMinDensityValue();
362 
367  {
368  return imageBoxContentList.size();
369  }
370 
375  {
376  return annotationContentList.size();
377  }
378 
383  OFCondition deleteImage(size_t idx);
384 
390  OFCondition deleteMultipleImages(size_t number);
391 
399 
405  OFBool imageHasAdditionalSettings(size_t idx)
406  {
408  }
409 
415  OFCondition setImagePolarity(size_t idx, const char *value)
416  {
417  return imageBoxContentList.setImagePolarity(idx, value);
418  }
419 
425  OFCondition setImageRequestedSize(size_t idx, const char *value)
426  {
427  return imageBoxContentList.setImageRequestedSize(idx, value);
428  }
429 
437  OFCondition setImageMagnificationType(size_t idx, const char *value)
438  {
440  }
441 
449  OFCondition setImageSmoothingType(size_t idx, const char *value)
450  {
451  return imageBoxContentList.setImageSmoothingType(idx, value);
452  }
453 
461  OFCondition setImageConfigurationInformation(size_t idx, const char *value)
462  {
464  }
465 
470  const char *getImagePolarity(size_t idx)
471  {
473  }
474 
479  const char *getImageRequestedSize(size_t idx)
480  {
482  }
483 
488  const char *getImageMagnificationType(size_t idx)
489  {
491  }
492 
497  const char *getImageSmoothingType(size_t idx)
498  {
500  }
501 
506  const char *getImageConfigurationInformation(size_t idx)
507  {
509  }
510 
517 
523 
529 
535  OFCondition setPresentationLUTShape(DVPSPresentationLUTType shape);
536 
546 
555  Sint32 convertODtoPValue(Uint16 density, unsigned int bits = 8);
556 
565 
579  const char *retrieveaetitle,
580  const char *refstudyuid,
581  const char *refseriesuid,
582  const char *refsopclassuid,
583  const char *refsopinstanceuid,
584  const char *requestedimagesize,
585  const char *patientid,
586  DVPSPresentationLUT *presentationlut,
587  OFBool inversePLUT);
588 
602  const char *retrieveaetitle,
603  const char *refsopinstanceuid,
604  const char *requestedimagesize=NULL,
605  const char *patientid=NULL,
606  DVPSPresentationLUT *presentationlut=NULL,
607  OFBool inversePLUT=OFFalse);
608 
619  const char *displayformat,
620  const char *text,
621  Uint16 position);
622 
625  void deleteAnnotations();
626 
631  OFCondition setInstanceUID(const char *uid);
632 
637 
645  OFCondition getImageReference(size_t idx, const char *&studyUID, const char *&seriesUID, const char *&instanceUID)
646  {
647  return imageBoxContentList.getImageReference(idx, studyUID, seriesUID, instanceUID);
648  }
649 
655  DVPSPrintPresentationLUTAlignment getReferencedPresentationLUTAlignment() { return referencedPresentationLUTAlignment; }
656 
664 
676  DVPSPrintMessageHandler& printHandler,
677  OFBool printerRequiresMatchingLUT,
678  OFBool printerLUTRenderingPreferred,
679  OFBool printerSupports12Bit);
680 
689  DVPSPrintMessageHandler& printHandler,
690  DcmDataset& dset,
691  OFBool plutInSession);
692 
701  OFCondition printSCUcreateBasicFilmBox(DVPSPrintMessageHandler& printHandler, OFBool plutInSession);
702 
713  DVPSPrintMessageHandler& printHandler,
714  size_t idx,
715  DicomImage& image,
716  OFBool useMonochrome1=OFFalse);
717 
725  DVPSPrintMessageHandler& printHandler,
726  size_t idx);
727 
733 
739 
745 
753  OFCondition setPrintIllumination(Uint16 value);
754 
759  Uint16 getPrintIllumination();
760 
769 
775 
800  OFBool printSCPCreate(
801  DVConfiguration& cfg,
802  const char *cfgname,
803  DcmDataset *rqDataset,
804  T_DIMSE_Message& rsp,
805  DcmDataset *& rspDataset,
806  OFBool presentationLUTnegotiated,
807  DVPSPresentationLUT_PList& globalPresentationLUTList,
808  const char *filmSessionUID,
809  DcmUniqueIdentifier& study,
810  DcmUniqueIdentifier& psSeries,
811  DcmUniqueIdentifier& imgSeries);
812 
829  OFBool printSCPSet(
830  DVConfiguration& cfg,
831  const char *cfgname,
832  DcmDataset *rqDataset,
833  T_DIMSE_Message& rsp,
834  DcmDataset *& rspDataset,
835  OFBool presentationLUTnegotiated,
836  DVPSPresentationLUT_PList& globalPresentationLUTList);
837 
842  OFBool isFilmBoxInstance(const char *c) { if (c && (filmBoxInstanceUID == c)) return OFTrue; else return OFFalse; }
843 
850  OFBool usesPresentationLUT(const char *c);
851 
859 
867  OFBool haveImagePositionClash(const char *uid, Uint16 position) { return imageBoxContentList.haveImagePositionClash(uid, position); }
868 
874  void replaceImageBox(DVPSImageBoxContent *newImageBox) { imageBoxContentList.replace(newImageBox); }
875 
883  void updatePresentationLUTList(DVPSPresentationLUT_PList& globalPresentationLUTList);
884 
891  OFBool matchesPresentationLUT(DVPSPrintPresentationLUTAlignment align) const
892  {
894  }
895 
906  DcmUnsignedShort& newIllumination,
907  DcmUnsignedShort& newReflectedAmbientLight,
908  DcmUniqueIdentifier& newReferencedPLUT,
909  DVPSPrintPresentationLUTAlignment newAlignment);
910 
918 
919  private:
920 
923 
924  /* checks if given SOP class UID is an image storage SOP class
925  * @return OFTrue if image SOP class, OFFalse otherwise.
926  */
927  OFBool isImageStorageSOPClass(OFString& sopclassuid);
928 
934 
941 
950 
953  void invalidateCache();
954 
957  void updateCache();
958 
959  /* Module: Patient (M)
960  */
969 
970  /* Module: General Study (M)
971  */
984 
985  /* Module: General Series (M)
986  */
991 
992  /* Module: General Equipment (M)
993  */
996 
997  /* Module: Printer Characteristics (M)
998  */
999  // the PrintManagementCapabilitiesSequence is only created/checked on the fly
1000 
1001  // PrinterCharacteristicsSequence
1008 
1009  /* Module: Film Box (M)
1010  */
1013  /* the following attributes belong to the Film Box Content SQ (Type 1) */
1046 
1052  DVPSPrintPresentationLUTAlignment referencedPresentationLUTAlignment;
1053 
1054  /* Module: Image Box List (M)
1055  */
1058 
1059  /* Module: Annotation List (U)
1060  */
1063 
1064  /* Module: Presentation LUT List (U)
1065  */
1066  DVPSPresentationLUT_PList presentationLUTList;
1067 
1068  /* Module: SOP Common (M)
1069  * we don't store the SOP Class UID because it is well known.
1070  */
1079 
1082 
1086  unsigned long currentNumCols;
1088  unsigned long currentNumRows;
1089 
1091  DVPSDecimateCropBehaviour decimateCropBehaviour;
1092 
1095 
1098 
1106 
1109 
1112 
1115 
1118 
1121 
1122 };
1123 
1124 #endif
1125 
1126 /*
1127  * $Log: dvpssp.h,v $
1128  * Revision 1.42 2010-10-14 13:16:36 joergr
1129  * Updated copyright header. Added reference to COPYRIGHT file.
1130  *
1131  * Revision 1.41 2010-08-09 13:20:50 joergr
1132  * Updated data dictionary to 2009 edition of the DICOM standard. From now on,
1133  * the official "keyword" is used for the attribute name which results in a
1134  * number of minor changes (e.g. "PatientsName" is now called "PatientName").
1135  *
1136  * Revision 1.40 2009-11-24 14:12:57 uli
1137  * Switched to logging mechanism provided by the "new" oflog module.
1138  *
1139  * Revision 1.39 2009-09-30 10:42:38 uli
1140  * Make dcmpstat's include headers self-sufficient by including all
1141  * needed headers directly and stop using dctk.h
1142  *
1143  * Revision 1.38 2005-12-08 16:04:03 meichel
1144  * Changed include path schema for all DCMTK header files
1145  *
1146  * Revision 1.37 2004/02/04 15:49:09 joergr
1147  * Removed acknowledgements with e-mail addresses from CVS log. Removed leading
1148  * underscore characters from preprocessor symbols (reserved symbols).
1149  *
1150  * Revision 1.36 2002/04/16 14:02:03 joergr
1151  * Added configurable support for C++ ANSI standard includes (e.g. streams).
1152  *
1153  * Revision 1.35 2001/09/26 15:36:15 meichel
1154  * Adapted dcmpstat to class OFCondition
1155  *
1156  * Revision 1.34 2001/06/01 15:50:21 meichel
1157  * Updated copyright header
1158  *
1159  * Revision 1.33 2000/07/18 16:03:44 joergr
1160  * Moved method convertODtoLum/PValue from class DVInterface to DVPSStoredPrint
1161  * and corrected implementation.
1162  * Changed behaviour of methods getMin/MaxDensityValue (return default value if
1163  * attribute empty/absent).
1164  *
1165  * Revision 1.32 2000/07/07 14:14:24 joergr
1166  * Added support for LIN OD presentation LUT shape.
1167  *
1168  * Revision 1.31 2000/07/05 12:33:29 joergr
1169  * Corrected documentation of one method.
1170  *
1171  * Revision 1.30 2000/07/04 15:58:03 joergr
1172  * Added support for overriding the presentation LUT settings made for the
1173  * image boxes.
1174  *
1175  * Revision 1.29 2000/06/20 14:50:08 meichel
1176  * Added monochrome1 printing mode.
1177  *
1178  * Revision 1.28 2000/06/19 16:29:07 meichel
1179  * Added options for session printing and LIN OD to print tools, fixed
1180  * pixel aspect ratio related bug.
1181  *
1182  * Revision 1.27 2000/06/14 11:28:15 joergr
1183  * Added methods to access the attributes Polarity and Requested Image Size.
1184  *
1185  * Revision 1.26 2000/06/08 10:44:29 meichel
1186  * Implemented Referenced Presentation LUT Sequence on Basic Film Session level.
1187  * Empty film boxes (pages) are not written to file anymore.
1188  *
1189  * Revision 1.25 2000/06/07 14:23:09 joergr
1190  * Added methods to access the image polarity attribute.
1191  * Added missing transformations (polarity, GSDF, presentation LUT, aspect
1192  * ratio) to print preview rendering.
1193  *
1194  * Revision 1.24 2000/06/07 13:17:46 meichel
1195  * added binary and textual log facilities to Print SCP.
1196  *
1197  * Revision 1.23 2000/06/02 16:00:51 meichel
1198  * Adapted all dcmpstat classes to use OFConsole for log and error output
1199  *
1200  * Revision 1.22 2000/05/31 12:56:39 meichel
1201  * Added initial Print SCP support
1202  *
1203  * Revision 1.21 2000/05/31 07:54:24 joergr
1204  * Added support for Stored Print attributes Originator and Destination
1205  * application entity title.
1206  *
1207  * Revision 1.20 2000/05/30 13:42:09 joergr
1208  * Added methods to set, get and store the printer name in the stored print
1209  * object (PrinterCharacteristicsSequence).
1210  *
1211  * Revision 1.19 2000/03/08 16:28:56 meichel
1212  * Updated copyright header.
1213  *
1214  * Revision 1.18 2000/03/03 14:13:55 meichel
1215  * Implemented library support for redirecting error messages into memory
1216  * instead of printing them to stdout/stderr for GUI applications.
1217  *
1218  * Revision 1.17 2000/02/29 12:16:16 meichel
1219  * Fixed bug in dcmpstat library that caused Monochrome1 images
1220  * to be printed inverse if a Presentation LUT was applied.
1221  *
1222  * Revision 1.16 1999/10/19 14:46:04 meichel
1223  * added support for the Basic Annotation Box SOP Class
1224  * as well as access methods for Max Density and Min Density.
1225  *
1226  * Revision 1.15 1999/10/13 14:11:12 meichel
1227  * Fixed bug in routine that renders P-LUTs into a print bitmap
1228  * before sending an image to the printer
1229  *
1230  * Revision 1.14 1999/10/07 17:21:50 meichel
1231  * Reworked management of Presentation LUTs in order to create tighter
1232  * coupling between Softcopy and Print.
1233  *
1234  * Revision 1.13 1999/09/24 15:24:30 meichel
1235  * Added support for CP 173 (Presentation LUT clarifications)
1236  *
1237  * Revision 1.12 1999/09/17 14:33:59 meichel
1238  * Completed print spool functionality including Supplement 22 support
1239  *
1240  * Revision 1.11 1999/09/15 17:43:29 meichel
1241  * Implemented print job dispatcher code for dcmpstat, adapted dcmprtsv
1242  * and dcmpsprt applications.
1243  *
1244  * Revision 1.10 1999/09/13 15:19:10 meichel
1245  * Added implementations for a number of further print API methods.
1246  *
1247  * Revision 1.9 1999/09/10 12:46:47 meichel
1248  * Added implementations for a number of print API methods.
1249  *
1250  * Revision 1.8 1999/09/09 14:57:33 thiel
1251  * Added methods for print spooler
1252  *
1253  * Revision 1.7 1999/09/09 12:20:47 meichel
1254  * Added print API method declarations and implementations (empty for now).
1255  *
1256  * Revision 1.6 1999/09/08 16:46:44 meichel
1257  * Added print API method declarations
1258  *
1259  * Revision 1.5 1999/09/01 16:14:41 meichel
1260  * Added support for requested image size to print routines
1261  *
1262  * Revision 1.4 1999/08/31 14:09:12 meichel
1263  * Added get/set methods for stored print attributes
1264  *
1265  * Revision 1.3 1999/08/27 15:57:57 meichel
1266  * Added methods for saving hardcopy images and stored print objects
1267  * either in file or in the local database.
1268  *
1269  * Revision 1.2 1999/08/26 09:31:00 thiel
1270  * Add extensions for the usage of the StoredPrint
1271  *
1272  * Revision 1.1 1999/07/30 13:34:50 meichel
1273  * Added new classes managing Stored Print objects
1274  *
1275  *
1276  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2