dvpsdef.h

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  *    definitions of constants and macros for pstat module
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:03:41 $
00027  *  CVS/RCS Revision: $Revision: 1.8 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef __DVPSDEF_H__
00035 #define __DVPSDEF_H__
00036 
00037 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 
00039 /* default for max PDU size */
00040 #define DEFAULT_MAXPDU 16384
00041 
00042 #define DEFAULT_filmDestination           "DEFAULT"
00043 #define DEFAULT_filmOrientation           "PORTRAIT"
00044 #define DEFAULT_filmSizeID                "DEFAULT"
00045 #define DEFAULT_illumination              2000
00046 #define DEFAULT_imageDisplayFormat        "STANDARD\\1,1"
00047 #define DEFAULT_imageNumber               "1"
00048 #define DEFAULT_magnificationType         "DEFAULT"
00049 #define DEFAULT_maxDensity                320
00050 #define DEFAULT_mediumType                "DEFAULT"
00051 #define DEFAULT_minDensity                20
00052 #define DEFAULT_numberOfCopies            "1"
00053 #define DEFAULT_ownerID                   "DEFAULT"
00054 #define DEFAULT_patientName               "^^^^"
00055 #define DEFAULT_presentationLabel         "UNNAMED"
00056 #define DEFAULT_printerStatus             "NORMAL"
00057 #define DEFAULT_printerStatusInfo         "NORMAL"
00058 #define DEFAULT_priority                  "MED"
00059 #define DEFAULT_reflectedAmbientLight     10
00060 #define DEFAULT_seriesNumber              "1"
00061 #define DEFAULT_shutterPresentationValue  0
00062 #define DEFAULT_specificCharacterSet      "ISO_IR 100"
00063 #define DEFAULT_trim                      "NO"
00064 
00065 /* SOP instance UID used by the Print SCP when creating a default IDENTITY Presentation LUT */
00066 #define WELLKNOWN_IDENTITY_PLUT_UID       "1.2.276.0.7230010.3.4.1915765545.18030.917282194.1"
00067 
00068 /* SOP class UID used by the Print SCP when storing a DIMSE log as a DICOM file */
00069 #define PSTAT_DIMSE_LOG_STORAGE_UID       "1.2.276.0.7230010.3.4.1915765545.18030.917282194.2"
00070 
00071 /* size_t value indicating that no index is active or available */
00072 #define DVPS_IDX_NONE                     ((size_t)-1)
00073 
00074 /* max study count for DB handle creation */
00075 #define PSTAT_MAXSTUDYCOUNT               200
00076 
00077 /* study size for DB handle creation */
00078 #define PSTAT_STUDYSIZE                   DB_UpperMaxBytesPerStudy
00079 
00080 /* filename suffixes for print jobs */
00081 #define PRINTJOB_SUFFIX                   ".job"
00082 #define PRINTJOB_DONE_SUFFIX              ".old"
00083 #define PRINTJOB_TEMP_SUFFIX              ".tmp"
00084 
00085 /* default AETitle for the Presentation State viewer */
00086 #define PSTAT_AETITLE                     "DCMPSTAT"
00087 
00088 /* default path for database folder */
00089 #define PSTAT_DBFOLDER                    "."
00090 
00091 /* default path for LUT folder */
00092 #define PSTAT_LUTFOLDER                   "."
00093 
00094 /* default path for report folder */
00095 #define PSTAT_REPORTFOLDER                "."
00096 
00097 /* default path for spool folder */
00098 #define PSTAT_SPOOLFOLDER                 "."
00099 
00100 /* config file facility constant for high resolution graphics */
00101 #define L2_HIGHRESOLUTIONGRAPHICS       "HIGHRESOLUTIONGRAPHICS"
00102 
00103 #define PSTAT_DCM_LogReservation                  DcmTag(0x0009, 0x0010, EVR_LO)
00104 #define PSTAT_DCM_AcseSequence                    DcmTag(0x0009, 0x1100, EVR_SQ)
00105 #define PSTAT_DCM_LogSequence                     DcmTag(0x0009, 0x1200, EVR_SQ)
00106 #define PSTAT_DCM_LogEntryType                    DcmTag(0x0009, 0x1001, EVR_CS)
00107 #define PSTAT_DCM_LogDate                         DcmTag(0x0009, 0x1002, EVR_DA)
00108 #define PSTAT_DCM_LogTime                         DcmTag(0x0009, 0x1003, EVR_TM)
00109 #define PSTAT_DCM_AssociateData                   DcmTag(0x0009, 0x1004, EVR_OB)
00110 
00111 /* --------------- a few macros which avoid copy/paste code --------------- */
00112 
00113 // inserts a copy of a dicom data element into a dataset
00114 #define ADD_TO_DATASET(a_type, a_name)                              \
00115 if (result==EC_Normal)                                              \
00116 {                                                                   \
00117   delem = new a_type(a_name);                                       \
00118   if (delem) dset.insert(delem, OFTrue); else result=EC_MemoryExhausted;    \
00119 }
00120 
00121 // inserts a copy of a dicom data element into an item
00122 #define ADD_TO_DATASET2(a_type, a_name)                             \
00123 if (result==EC_Normal)                                              \
00124 {                                                                   \
00125   delem = new a_type(a_name);                                       \
00126   if (delem) ditem->insert(delem, OFTrue); else result=EC_MemoryExhausted;  \
00127 }
00128 
00129 // inserts a copy of a dicom data element into an item
00130 #define ADD_TO_PDATASET(a_type, a_name)                             \
00131 if (writeresult==EC_Normal)                                         \
00132 {                                                                   \
00133   delem = new a_type(a_name);                                       \
00134   if (delem) rspDataset->insert(delem, OFTrue); else writeresult=EC_MemoryExhausted; \
00135 }
00136 
00137 // inserts a copy of a repeating element into a dataset, assigns group number
00138 #define ADD_REPEATING_ELEMENT_TO_DATASET(a_type, a_name, a_group)   \
00139 if (result==EC_Normal)                                              \
00140 {                                                                   \
00141   delem = new a_type(a_name);                                       \
00142   if (delem)                                                        \
00143   {                                                                 \
00144     delem->setGTag(a_group);                                        \
00145     dset.insert(delem, OFTrue);                                     \
00146   } else result=EC_MemoryExhausted;                                 \
00147 }
00148 
00149 // reads a dicom element from a dataset if present
00150 #define READ_FROM_DATASET(a_type, a_name)                           \
00151 stack.clear();                                                      \
00152 if (EC_Normal == dset.search((DcmTagKey &)a_name.getTag(), stack, ESM_fromHere, OFFalse)) \
00153 {                                                                   \
00154   a_name = *((a_type *)(stack.top()));                              \
00155 }
00156 
00157 // reads a dicom element from an item if present
00158 #define READ_FROM_DATASET2(a_type, a_name)                          \
00159 stack.clear();                                                      \
00160 if (EC_Normal == item->search((DcmTagKey &)a_name.getTag(), stack, ESM_fromHere, OFFalse)) \
00161 {                                                                   \
00162   a_name = *((a_type *)(stack.top()));                              \
00163 }
00164 
00165 // reads a dicom element from an item if present
00166 #define READ_FROM_PDATASET(a_type, a_name)                          \
00167 stack.clear();                                                      \
00168 if (rqDataset && (EC_Normal == rqDataset->search((DcmTagKey &)a_name.getTag(), stack, ESM_fromHere, OFFalse))) \
00169 {                                                                   \
00170   a_name = *((a_type *)(stack.top()));                              \
00171 }
00172 
00173 // assigns a newly generated UID to a dicom element if it is empty
00174 #define SET_UID(a_name)                                             \
00175 if (result==EC_Normal)                                              \
00176 {                                                                   \
00177      if (a_name.getLength()==0) result = a_name.putString(dcmGenerateUniqueIdentifier(uid)); \
00178 }
00179 
00180 #endif
00181 
00182 /*
00183  *  $Log: dvpsdef.h,v $
00184  *  Revision 1.8  2005/12/08 16:03:41  meichel
00185  *  Changed include path schema for all DCMTK header files
00186  *
00187  *  Revision 1.7  2002/01/08 10:32:12  joergr
00188  *  Corrected spelling of function dcmGenerateUniqueIdentifier().
00189  *
00190  *  Revision 1.6  2001/11/28 13:59:31  joergr
00191  *  Check return value of DcmItem::insert() statements where appropriate to
00192  *  avoid memory leaks when insert procedure fails.
00193  *
00194  *  Revision 1.5  2001/06/01 15:50:15  meichel
00195  *  Updated copyright header
00196  *
00197  *  Revision 1.4  2000/11/13 10:42:40  joergr
00198  *  Added support for Structured Reporting "templates".
00199  *
00200  *  Revision 1.3  2000/06/07 13:16:37  meichel
00201  *  now using DIMSE status constants and log facilities defined in dcmnet
00202  *
00203  *  Revision 1.2  2000/06/02 16:00:45  meichel
00204  *  Adapted all dcmpstat classes to use OFConsole for log and error output
00205  *
00206  *  Revision 1.1  2000/05/31 12:56:59  meichel
00207  *  Moved dcmpstat macros and constants into a common header file
00208  *
00209  *
00210  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5