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 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:03:50 $ 00027 * CVS/RCS Revision: $Revision: 1.21 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef __DVPSIB_H__ 00035 #define __DVPSIB_H__ 00036 00037 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00038 #include "dcmtk/ofstd/ofstring.h" 00039 #include "dcmtk/dcmdata/dctk.h" 00040 #include "dcmtk/dcmpstat/dvpstyp.h" /* for enum types */ 00041 #include "dcmtk/dcmnet/dimse.h" 00042 00043 class DVPSPresentationLUT_PList; 00044 class DVConfiguration; 00045 00049 class DVPSImageBoxContent 00050 { 00051 public: 00053 DVPSImageBoxContent(); 00054 00056 DVPSImageBoxContent(const DVPSImageBoxContent& copy); 00057 00062 DVPSImageBoxContent *clone() { return new DVPSImageBoxContent(*this); } 00063 00065 virtual ~DVPSImageBoxContent(); 00066 00071 void clear(); 00072 00083 OFCondition read(DcmItem &dset, DVPSPresentationLUT_PList& presentationLUTList); 00084 00095 OFCondition write(DcmItem &dset, OFBool writeRequestedImageSize, OFBool writeReferencedPLUTSQ = OFTrue); 00096 00104 OFCondition createDefaultValues(OFBool renumber, unsigned long number, OFBool ignoreEmptyImages); 00105 00109 const char *getSOPClassUID(); 00110 00123 OFCondition setContent( 00124 const char *instanceuid, 00125 const char *retrieveaetitle, 00126 const char *refstudyuid, 00127 const char *refseriesuid, 00128 const char *refsopclassuid, 00129 const char *refsopinstanceuid, 00130 const char *requestedimagesize, 00131 const char *patientid, 00132 const char *presentationlutreference); 00133 00140 OFCondition setRequestedDecimateCropBehaviour(DVPSDecimateCropBehaviour value); 00141 00146 DVPSDecimateCropBehaviour getRequestedDecimateCropBehaviour(); 00147 00152 OFBool hasAdditionalSettings(); 00153 00157 const char *getReferencedPresentationLUTInstanceUID(); 00158 00162 const char *getPolarity(); 00163 00167 const char *getRequestedImageSize(); 00168 00172 const char *getMagnificationType(); 00173 00177 const char *getSmoothingType(); 00178 00182 const char *getConfigurationInformation(); 00183 00187 const char *getSOPInstanceUID(); 00188 00192 Uint16 getImageBoxPosition(); 00193 00198 OFCondition setPolarity(const char *value); 00199 00204 OFCondition setRequestedImageSize(const char *value); 00205 00212 OFCondition setMagnificationType(const char *value); 00213 00220 OFCondition setSmoothingType(const char *value); 00221 00228 OFCondition setConfigurationInformation(const char *value); 00229 00234 OFCondition setSOPInstanceUID(const char *value); 00235 00239 OFCondition setDefault(); 00240 00247 OFCondition getImageReference(const char *&studyUID, const char *&seriesUID, const char *&instanceUID); 00248 00256 OFCondition prepareBasicImageBox(DcmItem &dset); 00257 00263 void setLog(OFConsole *stream, OFBool verbMode, OFBool dbgMode); 00264 00271 OFBool matchesPresentationLUT(DVPSPrintPresentationLUTAlignment align) const; 00272 00293 OFBool printSCPSet( 00294 DVConfiguration& cfg, 00295 const char *cfgname, 00296 DcmDataset *rqDataset, 00297 T_DIMSE_Message& rsp, 00298 DcmDataset *& rspDataset, 00299 DcmDataset &imageDataset, 00300 DVPSPrintPresentationLUTAlignment align, 00301 OFBool presentationLUTnegotiated); 00302 00310 OFCondition setUIDsAndAETitle( 00311 DcmUniqueIdentifier& studyUID, 00312 DcmUniqueIdentifier& seriesUID, 00313 const char *aetitle); 00314 00315 private: 00317 DVPSImageBoxContent& operator=(const DVPSImageBoxContent&); 00318 00324 OFCondition addReferencedPLUTSQ(DcmItem &dset); 00325 00345 OFBool printSCPEvaluateBasicGrayscaleImageSequence( 00346 DVConfiguration& cfg, 00347 const char *cfgname, 00348 DcmItem *rqDataset, 00349 T_DIMSE_Message& rsp, 00350 DcmDataset &imageDataset, 00351 DVPSPrintPresentationLUTAlignment align, 00352 OFBool presentationLUTnegotiated); 00353 00355 DcmUniqueIdentifier sOPInstanceUID; 00357 DcmUnsignedShort imageBoxPosition; 00359 DcmCodeString polarity; 00361 DcmCodeString magnificationType; 00363 DcmShortText configurationInformation; 00365 DcmCodeString smoothingType; 00367 DcmDecimalString requestedImageSize; 00369 DcmCodeString requestedDecimateCropBehavior; 00370 00371 /* the following attributes belong to the ReferencedImageSequence 00372 * which must have exactly one item here. 00373 */ 00375 DcmApplicationEntity retrieveAETitle; 00377 DcmUniqueIdentifier referencedSOPClassUID; 00379 DcmUniqueIdentifier referencedSOPInstanceUID; 00381 DcmUniqueIdentifier studyInstanceUID; 00383 DcmUniqueIdentifier seriesInstanceUID; 00385 DcmIntegerString referencedFrameNumber; 00387 DcmLongString patientID; 00388 00389 // we do not support the ReferencedImageOverlayBoxSequence which is retired in Supplement 35 anyway. 00390 00391 // the ReferencedPresentationLUTSequence is only created/read on the fly 00392 DcmUniqueIdentifier referencedPresentationLUTInstanceUID; 00393 00395 DVPSImageDepth imageDepth; 00396 00399 OFConsole *logstream; 00400 00403 OFBool verboseMode; 00404 00407 OFBool debugMode; 00408 00409 }; 00410 00411 #endif 00412 00413 /* 00414 * $Log: dvpsib.h,v $ 00415 * Revision 1.21 2005/12/08 16:03:50 meichel 00416 * Changed include path schema for all DCMTK header files 00417 * 00418 * Revision 1.20 2001/09/26 15:36:12 meichel 00419 * Adapted dcmpstat to class OFCondition 00420 * 00421 * Revision 1.19 2001/06/01 15:50:17 meichel 00422 * Updated copyright header 00423 * 00424 * Revision 1.18 2000/07/04 15:58:01 joergr 00425 * Added support for overriding the presentation LUT settings made for the 00426 * image boxes. 00427 * 00428 * Revision 1.17 2000/06/14 11:28:13 joergr 00429 * Added methods to access the attributes Polarity and Requested Image Size. 00430 * 00431 * Revision 1.16 2000/06/08 10:44:29 meichel 00432 * Implemented Referenced Presentation LUT Sequence on Basic Film Session level. 00433 * Empty film boxes (pages) are not written to file anymore. 00434 * 00435 * Revision 1.15 2000/06/07 14:17:41 joergr 00436 * Added methods to access the image polarity attribute. 00437 * 00438 * Revision 1.14 2000/06/02 16:00:47 meichel 00439 * Adapted all dcmpstat classes to use OFConsole for log and error output 00440 * 00441 * Revision 1.13 2000/05/31 12:56:38 meichel 00442 * Added initial Print SCP support 00443 * 00444 * Revision 1.12 2000/03/08 16:28:53 meichel 00445 * Updated copyright header. 00446 * 00447 * Revision 1.11 1999/10/07 17:21:47 meichel 00448 * Reworked management of Presentation LUTs in order to create tighter 00449 * coupling between Softcopy and Print. 00450 * 00451 * Revision 1.10 1999/09/24 15:23:44 meichel 00452 * Print spooler (dcmprtsv) now logs diagnostic messages in log files 00453 * when operating in spool mode. 00454 * 00455 * Revision 1.9 1999/09/17 14:33:56 meichel 00456 * Completed print spool functionality including Supplement 22 support 00457 * 00458 * Revision 1.8 1999/09/15 17:43:27 meichel 00459 * Implemented print job dispatcher code for dcmpstat, adapted dcmprtsv 00460 * and dcmpsprt applications. 00461 * 00462 * Revision 1.7 1999/09/10 12:46:46 meichel 00463 * Added implementations for a number of print API methods. 00464 * 00465 * Revision 1.6 1999/09/09 14:57:32 thiel 00466 * Added methods for print spooler 00467 * 00468 * Revision 1.5 1999/09/01 16:14:40 meichel 00469 * Added support for requested image size to print routines 00470 * 00471 * Revision 1.4 1999/08/31 14:09:10 meichel 00472 * Added get/set methods for stored print attributes 00473 * 00474 * Revision 1.3 1999/08/27 15:57:55 meichel 00475 * Added methods for saving hardcopy images and stored print objects 00476 * either in file or in the local database. 00477 * 00478 * Revision 1.2 1999/08/26 09:30:59 thiel 00479 * Add extensions for the usage of the StoredPrint 00480 * 00481 * Revision 1.1 1999/07/30 13:34:47 meichel 00482 * Added new classes managing Stored Print objects 00483 * 00484 * 00485 */ 00486