00001 /* 00002 * 00003 * Copyright (C) 1998-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: dcmpstat 00015 * 00016 * Author: Marco Eichelberg, Joerg Riesmeier 00017 * 00018 * Purpose: 00019 * classes: DVConfiguration 00020 * 00021 * Last Update: $Author: joergr $ 00022 * Update Date: $Date: 2010-10-14 13:16:36 $ 00023 * CVS/RCS Revision: $Revision: 1.34 $ 00024 * Status: $State: Exp $ 00025 * 00026 * CVS/RCS Log at end of file 00027 * 00028 */ 00029 00030 00031 #ifndef DVPSCF_H 00032 #define DVPSCF_H 00033 00034 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00035 #include "dcmtk/ofstd/ofstring.h" /* for class OFString */ 00036 #include "dcmtk/dcmdata/dctypes.h" /* for Uint32 */ 00037 #include "dcmtk/dcmpstat/dvpstyp.h" /* for DVPS enums */ 00038 #include "dcmtk/oflog/oflog.h" /* for OFLogger::LogLevel */ 00039 00040 class OFConfigFile; 00041 00046 class DVConfiguration 00047 { 00048 public: 00049 00057 DVConfiguration(const char *config_file=NULL); 00058 00061 virtual ~DVConfiguration(); 00062 00063 /* access to communication partner data */ 00064 00070 Uint32 getNumberOfTargets(DVPSPeerType peerType=DVPSE_storage); 00071 00078 const char *getTargetID(Uint32 idx, DVPSPeerType peerType=DVPSE_storage); 00079 00086 const char *getTargetDescription(const char *targetID); 00087 00094 const char *getTargetHostname(const char *targetID); 00095 00102 unsigned short getTargetPort(const char *targetID); 00103 00110 DVPSPeerType getTargetType(const char *targetID); 00111 00118 const char *getTargetAETitle(const char *targetID); 00119 00126 unsigned long getTargetMaxPDU(const char *targetID); 00127 00134 Sint32 getTargetTimeout(const char *targetID); 00135 00142 OFBool getTargetImplicitOnly(const char *targetID); 00143 00150 OFBool getTargetDisableNewVRs(const char *targetID); 00151 00158 OFBool getTargetBitPreservingMode(const char *targetID); 00159 00166 OFBool getTargetCorrectUIDPadding(const char *targetID); 00167 00174 OFBool getTargetUseTLS(const char *targetID); 00175 00182 const char *getTargetCertificate(const char *targetID); 00183 00190 const char *getTargetPrivateKey(const char *targetID); 00191 00198 const char *getTargetPrivateKeyPassword(const char *targetID); 00199 00207 Uint32 getTargetNumberOfCipherSuites(const char *targetID); 00208 00217 const char *getTargetCipherSuite(const char *targetID, Uint32 idx, OFString& value); 00218 00225 DVPSCertificateVerificationType getTargetPeerAuthentication(const char *targetID); 00226 00233 const char *getTargetDiffieHellmanParameters(const char *targetID); 00234 00241 const char *getTargetRandomSeed(const char *targetID); 00242 00249 OFBool getTargetPrinterSupportsPresentationLUT(const char *targetID); 00250 00257 OFBool getTargetPrinterPresentationLUTMatchRequired(const char *targetID); 00258 00265 OFBool getTargetPrinterPresentationLUTPreferSCPRendering(const char *targetID); 00266 00273 OFBool getTargetPrinterPresentationLUTinFilmSession(const char *targetID); 00274 00282 OFBool getTargetPrinterSupports12BitTransmission(const char *targetID); 00283 00290 OFBool getTargetPrinterSupportsRequestedImageSize(const char *targetID); 00291 00298 OFBool getTargetPrinterSupportsDecimateCrop(const char *targetID); 00299 00306 OFBool getTargetPrinterSupportsTrim(const char *targetID); 00307 00315 Uint32 getTargetPrinterNumberOfBorderDensities(const char *targetID); 00316 00325 const char *getTargetPrinterBorderDensity(const char *targetID, Uint32 idx, OFString& value); 00326 00334 Uint32 getTargetPrinterNumberOfMaxDensities(const char *targetID); 00335 00344 const char *getTargetPrinterMaxDensity(const char *targetID, Uint32 idx, OFString& value); 00345 00353 Uint32 getTargetPrinterNumberOfMinDensities(const char *targetID); 00354 00363 const char *getTargetPrinterMinDensity(const char *targetID, Uint32 idx, OFString& value); 00364 00372 Uint32 getTargetPrinterNumberOfPortraitDisplayFormats(const char *targetID); 00373 00381 Uint32 getTargetPrinterPortraitDisplayFormatRows(const char *targetID, Uint32 idx); 00382 00390 Uint32 getTargetPrinterPortraitDisplayFormatColumns(const char *targetID, Uint32 idx); 00391 00399 OFBool getTargetPrinterSupportsAnnotation(const char *targetID); 00400 00407 OFBool getTargetPrinterSupportsAnnotationBoxSOPClass(const char *targetID); 00408 00415 OFBool getTargetPrinterSessionLabelAnnotation(const char *targetID); 00416 00424 const char *getTargetPrinterAnnotationDisplayFormatID(const char *targetID, OFString& value); 00425 00432 Uint16 getTargetPrinterAnnotationPosition(const char *targetID); 00433 00441 Uint32 getTargetPrinterNumberOfFilmSizeIDs(const char *targetID); 00442 00451 const char *getTargetPrinterFilmSizeID(const char *targetID, Uint32 idx, OFString& value); 00452 00460 Uint32 getTargetPrinterNumberOfMediumTypes(const char *targetID); 00461 00470 const char *getTargetPrinterMediumType(const char *targetID, Uint32 idx, OFString& value); 00471 00479 Uint32 getTargetPrinterNumberOfFilmDestinations(const char *targetID); 00480 00489 const char *getTargetPrinterFilmDestination(const char *targetID, Uint32 idx, OFString& value); 00490 00498 Uint32 getTargetPrinterNumberOfPrinterResolutionIDs(const char *targetID); 00499 00508 const char *getTargetPrinterResolutionID(const char *targetID, Uint32 idx, OFString& value); 00509 00517 Uint32 getTargetPrinterNumberOfMagnificationTypes(const char *targetID); 00518 00527 const char *getTargetPrinterMagnificationType(const char *targetID, Uint32 idx, OFString& value); 00528 00536 Uint32 getTargetPrinterNumberOfSmoothingTypes(const char *targetID); 00537 00546 const char *getTargetPrinterSmoothingType(const char *targetID, Uint32 idx, OFString& value); 00547 00554 Uint32 getTargetPrinterNumberOfConfigurationSettings(const char *targetID); 00555 00563 const char *getTargetPrinterConfigurationSetting(const char *targetID, Uint32 idx); 00564 00572 Uint32 getTargetPrinterNumberOfEmptyImageDensities(const char *targetID); 00573 00582 const char *getTargetPrinterEmptyImageDensity(const char *targetID, Uint32 idx, OFString& value); 00583 00590 OFBool getTargetPrintSCPOmitSOPClassUIDFromCreateResponse(const char *targetID); 00591 00592 /* general settings */ 00593 00599 const char *getLogFolder(); 00600 00606 const char *getLogFile(); 00607 00613 OFLogger::LogLevel getLogLevel(); 00614 00621 unsigned short getMessagePort(); 00622 00629 OFBool getMessagePortKeepOpen(); 00630 00636 const char *getNetworkAETitle(); 00637 00642 OFBool getQueryRetrieveAutoCreateConfigFile(); 00643 00649 const char *getQueryRetrieveAETitle(); 00650 00655 unsigned short getQueryRetrievePort(); 00656 00661 unsigned long getQueryRetrieveMaxPDU(); 00662 00667 Sint32 getQueryRetrieveTimeout(); 00668 00673 unsigned long getQueryRetrieveMaxAssociations(); 00674 00680 const char *getDatabaseFolder(); 00681 00687 const char *getSpoolFolder(); 00688 00693 OFBool getDetailedLog(); 00694 00699 OFBool getBinaryLog(); 00700 00706 const char *getSenderName(); 00707 00713 const char *getReceiverName(); 00714 00719 const char *getQueryRetrieveServerName(); 00720 00726 const char *getSpoolerName(); 00727 00733 const char *getPrintServerName(); 00734 00740 const char *getDumpToolName(); 00741 00747 const char *getCheckToolName(); 00748 00753 unsigned long getSpoolerSleep(); 00754 00759 OFBool getSpoolerDeletePrintJobs(); 00760 00765 OFBool getSpoolerAlwaysDeleteTerminateJobs(); 00766 00772 const char *getMonitorCharacteristicsFile(); 00773 00777 double getMonitorPixelWidth(); 00778 00782 double getMonitorPixelHeight(); 00783 00788 Uint32 getMaxPreviewResolutionX(); 00789 00794 Uint32 getMaxPreviewResolutionY(); 00795 00803 const char *getGUIConfigEntry(const char *key); 00804 00814 OFBool getGUIConfigEntryBool(const char *key, OFBool dfl); 00815 00821 const char *getLUTFolder(); 00822 00828 const char *getReportFolder(); 00829 00830 /* Presentation Look Up Tables (LUTs) */ 00831 00835 Uint32 getNumberOfLUTs(); 00836 00842 const char *getLUTID(Uint32 idx); 00843 00849 const char *getLUTDescription(const char *lutID); 00850 00856 const char *getLUTFilename(const char *lutID); 00857 00858 /* Structured Reporting (SR) "templates" */ 00859 00863 Uint32 getNumberOfReports(); 00864 00870 const char *getReportID(Uint32 idx); 00871 00878 const char *getReportDescription(const char *reportID); 00879 00886 const char *getReportFilename(const char *reportID); 00887 00888 /* general print settings */ 00889 00894 Uint32 getMinPrintResolutionX(); 00895 00900 Uint32 getMinPrintResolutionY(); 00901 00906 Uint32 getMaxPrintResolutionX(); 00907 00912 Uint32 getMaxPrintResolutionY(); 00913 00918 Uint16 getDefaultPrintIllumination(); 00919 00924 Uint16 getDefaultPrintReflection(); 00925 00926 /* VOI settings */ 00927 00932 Uint32 getNumberOfVOIPresets(const char *modality); 00933 00939 const char *getVOIPresetDescription(const char *modality, Uint32 idx); 00940 00946 double getVOIPresetWindowCenter(const char *modality, Uint32 idx); 00947 00953 double getVOIPresetWindowWidth(const char *modality, Uint32 idx); 00954 00955 /* TLS settings */ 00956 00961 const char *getTLSFolder(); 00962 00967 const char *getTLSCACertificateFolder(); 00968 00974 OFBool getTLSPEMFormat(); 00975 00976 /* User login settings */ 00977 00982 const char *getUserCertificateFolder(); 00983 00987 Uint32 getNumberOfUsers(); 00988 00994 const char *getUserID(Uint32 idx); 00995 01001 const char *getUserLogin(const char *userID); 01002 01008 const char *getUserName(const char *userID); 01009 01015 const char *getUserDICOMName(const char *userID); 01016 01022 const char *getUserOrganization(const char *userID); 01023 01029 const char *getUserCodingSchemeDesignator(const char *userID, OFString& value); 01030 01036 const char *getUserCodingSchemeVersion(const char *userID, OFString& value); 01037 01043 const char *getUserCodeValue(const char *userID, OFString& value); 01044 01050 const char *getUserCodeMeaning(const char *userID, OFString& value); 01051 01057 const char *getUserCertificate(const char *userID); 01058 01064 const char *getUserPrivateKey(const char *userID); 01065 01066 private: 01067 01070 DVConfiguration(const DVConfiguration&); 01071 01074 DVConfiguration& operator=(const DVConfiguration&); 01075 01082 const char *getConfigEntry(const char *l2_key, const char *l1_key, const char *l0_key); 01083 01091 OFBool getConfigBoolEntry(const char *l2_key, const char *l1_key, const char *l0_key, OFBool deflt); 01092 01093 /* member variables */ 01094 01098 OFConfigFile *pConfig; 01099 01100 }; 01101 01102 #endif 01103 01104 /* 01105 * CVS/RCS Log: 01106 * $Log: dvpscf.h,v $ 01107 * Revision 1.34 2010-10-14 13:16:36 joergr 01108 * Updated copyright header. Added reference to COPYRIGHT file. 01109 * 01110 * Revision 1.33 2009-11-24 14:12:57 uli 01111 * Switched to logging mechanism provided by the "new" oflog module. 01112 * 01113 * Revision 1.32 2005-12-08 16:03:36 meichel 01114 * Changed include path schema for all DCMTK header files 01115 * 01116 * Revision 1.31 2003/04/29 10:13:56 meichel 01117 * Moved configuration file parser from module dcmpstat to ofstd and renamed 01118 * class to OFConfigFile. Cleaned up implementation (no more friend declarations). 01119 * 01120 * Revision 1.30 2002/11/29 13:16:31 meichel 01121 * Introduced new command line option --timeout for controlling the 01122 * connection request timeout. 01123 * 01124 * Revision 1.29 2002/11/25 18:27:39 meichel 01125 * Converted compile time option to leniently handle space padded UIDs 01126 * in the Storage Service Class into command line / config file option. 01127 * 01128 * Revision 1.28 2001/06/01 15:50:12 meichel 01129 * Updated copyright header 01130 * 01131 * Revision 1.27 2000/11/13 14:20:54 joergr 01132 * Updated comments. 01133 * 01134 * Revision 1.26 2000/11/13 11:52:41 meichel 01135 * Added support for user logins and certificates. 01136 * 01137 * Revision 1.25 2000/11/13 10:42:39 joergr 01138 * Added support for Structured Reporting "templates". 01139 * 01140 * Revision 1.24 2000/10/10 12:23:40 meichel 01141 * Added extensions for TLS encrypted communication 01142 * 01143 * Revision 1.23 2000/06/21 15:40:57 meichel 01144 * Added DICOMscope support for calling the Presentation State Checker. 01145 * 01146 * Revision 1.22 2000/06/07 14:16:21 joergr 01147 * Added configuration file entry "LogLevel" to filter log messages. 01148 * 01149 * Revision 1.21 2000/06/07 13:17:45 meichel 01150 * added binary and textual log facilities to Print SCP. 01151 * 01152 * Revision 1.20 2000/06/06 09:42:48 joergr 01153 * Moved configuration file entry "LogDirectory" from "[PRINT]" to new 01154 * (more general) section "[APPLICATION]". 01155 * 01156 * Revision 1.19 2000/06/05 16:22:27 joergr 01157 * Implemented log message methods. 01158 * 01159 * Revision 1.18 2000/06/02 16:00:43 meichel 01160 * Adapted all dcmpstat classes to use OFConsole for log and error output 01161 * 01162 * Revision 1.17 2000/06/02 13:53:54 joergr 01163 * Implemented start/terminatePrintServer methods. 01164 * 01165 * Revision 1.16 2000/06/02 12:41:51 joergr 01166 * Corrected wrong interface descriptions. 01167 * 01168 * Revision 1.15 2000/05/31 12:56:37 meichel 01169 * Added initial Print SCP support 01170 * 01171 * Revision 1.14 2000/05/30 13:40:02 joergr 01172 * Removed methods which were already marked as "retired". 01173 * Added new section to the config file describing the query/retrieve server 01174 * settings. 01175 * 01176 * Revision 1.13 2000/03/08 16:28:49 meichel 01177 * Updated copyright header. 01178 * 01179 * Revision 1.12 1999/11/03 13:05:32 meichel 01180 * Added support for transmitting annotations in the film session label. 01181 * Added support for dump tool launched from DVInterface. 01182 * 01183 * Revision 1.11 1999/10/20 10:47:14 joergr 01184 * Added support for a down-scaled preview image of the current DICOM image 01185 * (e.g. useful for online-windowing or print preview). 01186 * 01187 * Revision 1.10 1999/10/19 14:46:02 meichel 01188 * added support for the Basic Annotation Box SOP Class 01189 * as well as access methods for Max Density and Min Density. 01190 * 01191 * Revision 1.9 1999/10/13 14:11:56 meichel 01192 * Added config file entries and access methods 01193 * for user-defined VOI presets, log directory, verbatim logging 01194 * and an explicit list of image display formats for each printer. 01195 * 01196 * Revision 1.8 1999/10/07 17:21:46 meichel 01197 * Reworked management of Presentation LUTs in order to create tighter 01198 * coupling between Softcopy and Print. 01199 * 01200 * Revision 1.7 1999/10/01 13:32:36 joergr 01201 * Added new option to config file: AlwaysDeleteTerminateJobs. 01202 * 01203 * Revision 1.6 1999/09/24 15:24:29 meichel 01204 * Added support for CP 173 (Presentation LUT clarifications) 01205 * 01206 * Revision 1.5 1999/09/23 17:37:13 meichel 01207 * Added support for Basic Film Session options to dcmpstat print code. 01208 * 01209 * Revision 1.4 1999/09/15 17:43:26 meichel 01210 * Implemented print job dispatcher code for dcmpstat, adapted dcmprtsv 01211 * and dcmpsprt applications. 01212 * 01213 * Revision 1.3 1999/09/13 15:19:09 meichel 01214 * Added implementations for a number of further print API methods. 01215 * 01216 * Revision 1.2 1999/09/10 12:46:45 meichel 01217 * Added implementations for a number of print API methods. 01218 * 01219 * Revision 1.1 1999/09/08 16:42:02 meichel 01220 * Moved configuration file evaluation to separate class. 01221 * 01222 * 01223 */