00001 /* 00002 * 00003 * Copyright (C) 1998-2005, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmpstat 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: 00023 * classes: DVPSImageBoxContent_PList 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:03:51 $ 00027 * CVS/RCS Revision: $Revision: 1.23 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef __DVPSIBL_H__ 00035 #define __DVPSIBL_H__ 00036 00037 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00038 #include "dcmtk/ofstd/oflist.h" 00039 #include "dcmtk/dcmdata/dctk.h" 00040 #include "dcmtk/dcmpstat/dvpstyp.h" /* for enum types */ 00041 00042 class DVPSImageBoxContent; 00043 class DVPSPresentationLUT_PList; 00044 00050 class DVPSImageBoxContent_PList 00051 { 00052 public: 00053 00055 DVPSImageBoxContent_PList(); 00056 00058 DVPSImageBoxContent_PList(const DVPSImageBoxContent_PList& copy); 00059 00064 DVPSImageBoxContent_PList *clone() { return new DVPSImageBoxContent_PList(*this); } 00065 00067 virtual ~DVPSImageBoxContent_PList(); 00068 00078 OFCondition read(DcmItem &dset, DVPSPresentationLUT_PList& presentationLUTList); 00079 00094 OFCondition write( 00095 DcmItem &dset, 00096 OFBool writeRequestedImageSize, 00097 size_t numItems, 00098 OFBool ignoreEmptyImages, 00099 OFBool writeReferencedPLUTSQ = OFTrue); 00100 00105 void clear(); 00106 00110 size_t size() const { return list_.size(); } 00111 00118 OFCondition createDefaultValues(OFBool renumber, OFBool ignoreEmptyImages); 00119 00127 OFCondition addImageSOPClasses(DcmSequenceOfItems& seq, size_t numItems=0); 00128 00140 OFCondition addImageBox( 00141 const char *instanceuid, 00142 const char *retrieveaetitle, 00143 const char *refstudyuid, 00144 const char *refseriesuid, 00145 const char *refsopclassuid, 00146 const char *refsopinstanceuid, 00147 const char *requestedimagesize, 00148 const char *patientid, 00149 const char *presentationlutuid); 00150 00155 OFCondition addImageBox(DVPSImageBoxContent *box); 00156 00164 OFCondition setRequestedDecimateCropBehaviour(DVPSDecimateCropBehaviour value); 00165 00170 OFCondition deleteImage(size_t idx); 00171 00176 OFCondition deleteMultipleImages(size_t number); 00177 00183 OFBool imageHasAdditionalSettings(size_t idx); 00184 00190 OFCondition setImagePolarity(size_t idx, const char *value); 00191 00197 OFCondition setImageRequestedSize(size_t idx, const char *value); 00198 00206 OFCondition setImageMagnificationType(size_t idx, const char *value); 00207 00215 OFCondition setImageSmoothingType(size_t idx, const char *value); 00216 00224 OFCondition setImageConfigurationInformation(size_t idx, const char *value); 00225 00231 OFCondition setImageSOPInstanceUID(size_t idx, const char *value); 00232 00237 OFCondition setAllImagesToDefault(); 00238 00243 const char *getImagePolarity(size_t idx); 00244 00249 const char *getImageRequestedSize(size_t idx); 00250 00255 const char *getImageMagnificationType(size_t idx); 00256 00261 const char *getImageSmoothingType(size_t idx); 00262 00267 const char *getImageConfigurationInformation(size_t idx); 00268 00273 const char *getSOPInstanceUID(size_t idx); 00274 00279 const char *getReferencedPresentationLUTInstanceUID(size_t idx); 00280 00288 OFCondition getImageReference(size_t idx, const char *&studyUID, const char *&seriesUID, const char *&instanceUID); 00289 00298 OFCondition prepareBasicImageBox(size_t idx, DcmItem &dset); 00299 00305 void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode); 00306 00313 OFBool presentationLUTInstanceUIDisUsed(const char *uid); 00314 00322 const char *haveSinglePresentationLUTUsed(const char *filmBox); 00323 00332 OFBool printSCPCreate( 00333 unsigned long numBoxes, 00334 DcmUniqueIdentifier& studyUID, 00335 DcmUniqueIdentifier& seriesUID, 00336 const char *aetitle); 00337 00343 OFCondition writeReferencedImageBoxSQ(DcmItem &dset); 00344 00351 OFBool matchesPresentationLUT(DVPSPrintPresentationLUTAlignment align) const; 00352 00359 DVPSImageBoxContent *duplicateImageBox(const char *uid); 00360 00368 OFBool haveImagePositionClash(const char *uid, Uint16 position); 00369 00375 void replace(DVPSImageBoxContent *newImageBox); 00376 00383 OFBool emptyPageWarning(); 00384 00385 private: 00386 00389 DVPSImageBoxContent_PList& operator=(const DVPSImageBoxContent_PList&); 00390 00396 DVPSImageBoxContent *getImageBox(size_t idx); 00397 00400 OFList<DVPSImageBoxContent *> list_; 00401 00404 OFConsole *logstream; 00405 00408 OFBool verboseMode; 00409 00412 OFBool debugMode; 00413 00414 }; 00415 00416 00417 #endif 00418 00419 /* 00420 * $Log: dvpsibl.h,v $ 00421 * Revision 1.23 2005/12/08 16:03:51 meichel 00422 * Changed include path schema for all DCMTK header files 00423 * 00424 * Revision 1.22 2003/06/04 10:18:06 meichel 00425 * Replaced private inheritance from template with aggregation 00426 * 00427 * Revision 1.21 2001/09/26 15:36:13 meichel 00428 * Adapted dcmpstat to class OFCondition 00429 * 00430 * Revision 1.20 2001/06/01 15:50:18 meichel 00431 * Updated copyright header 00432 * 00433 * Revision 1.19 2000/07/04 15:58:02 joergr 00434 * Added support for overriding the presentation LUT settings made for the 00435 * image boxes. 00436 * 00437 * Revision 1.18 2000/06/14 11:28:14 joergr 00438 * Added methods to access the attributes Polarity and Requested Image Size. 00439 * 00440 * Revision 1.17 2000/06/08 10:44:29 meichel 00441 * Implemented Referenced Presentation LUT Sequence on Basic Film Session level. 00442 * Empty film boxes (pages) are not written to file anymore. 00443 * 00444 * Revision 1.16 2000/06/07 14:17:41 joergr 00445 * Added methods to access the image polarity attribute. 00446 * 00447 * Revision 1.15 2000/06/02 16:00:48 meichel 00448 * Adapted all dcmpstat classes to use OFConsole for log and error output 00449 * 00450 * Revision 1.14 2000/05/31 12:56:39 meichel 00451 * Added initial Print SCP support 00452 * 00453 * Revision 1.13 2000/03/08 16:28:53 meichel 00454 * Updated copyright header. 00455 * 00456 * Revision 1.12 1999/10/19 14:46:03 meichel 00457 * added support for the Basic Annotation Box SOP Class 00458 * as well as access methods for Max Density and Min Density. 00459 * 00460 * Revision 1.11 1999/10/07 17:21:48 meichel 00461 * Reworked management of Presentation LUTs in order to create tighter 00462 * coupling between Softcopy and Print. 00463 * 00464 * Revision 1.10 1999/09/24 15:23:45 meichel 00465 * Print spooler (dcmprtsv) now logs diagnostic messages in log files 00466 * when operating in spool mode. 00467 * 00468 * Revision 1.9 1999/09/17 14:33:57 meichel 00469 * Completed print spool functionality including Supplement 22 support 00470 * 00471 * Revision 1.8 1999/09/15 17:43:28 meichel 00472 * Implemented print job dispatcher code for dcmpstat, adapted dcmprtsv 00473 * and dcmpsprt applications. 00474 * 00475 * Revision 1.7 1999/09/10 12:46:47 meichel 00476 * Added implementations for a number of print API methods. 00477 * 00478 * Revision 1.6 1999/09/09 14:57:33 thiel 00479 * Added methods for print spooler 00480 * 00481 * Revision 1.5 1999/09/01 16:14:40 meichel 00482 * Added support for requested image size to print routines 00483 * 00484 * Revision 1.4 1999/08/31 14:09:11 meichel 00485 * Added get/set methods for stored print attributes 00486 * 00487 * Revision 1.3 1999/08/27 15:57:56 meichel 00488 * Added methods for saving hardcopy images and stored print objects 00489 * either in file or in the local database. 00490 * 00491 * Revision 1.2 1999/08/26 09:30:59 thiel 00492 * Add extensions for the usage of the StoredPrint 00493 * 00494 * Revision 1.1 1999/07/30 13:34:48 meichel 00495 * Added new classes managing Stored Print objects 00496 * 00497 * 00498 */ 00499