00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef DVPSDEF_H
00031 #define DVPSDEF_H
00032
00033 #include "dcmtk/config/osconfig.h"
00034
00035 #include "dcmtk/oflog/oflog.h"
00036
00037 OFLogger DCM_dcmpstatGetLogger();
00038 OFLogger DCM_dcmpstatDumpGetLogger();
00039 OFLogger DCM_dcmpstatLogfileGetLogger();
00040
00041 #define DCMPSTAT_TRACE(msg) OFLOG_TRACE(DCM_dcmpstatGetLogger(), msg)
00042 #define DCMPSTAT_DEBUG(msg) OFLOG_DEBUG(DCM_dcmpstatGetLogger(), msg)
00043 #define DCMPSTAT_INFO(msg) OFLOG_INFO(DCM_dcmpstatGetLogger(), msg)
00044 #define DCMPSTAT_WARN(msg) OFLOG_WARN(DCM_dcmpstatGetLogger(), msg)
00045 #define DCMPSTAT_ERROR(msg) OFLOG_ERROR(DCM_dcmpstatGetLogger(), msg)
00046 #define DCMPSTAT_FATAL(msg) OFLOG_FATAL(DCM_dcmpstatGetLogger(), msg)
00047
00048 #define DCMPSTAT_DUMP(msg) OFLOG_DEBUG(DCM_dcmpstatDumpGetLogger(), msg)
00049 #define DCMPSTAT_LOGFILE(msg) OFLOG_DEBUG(DCM_dcmpstatLogfileGetLogger(), msg)
00050
00051
00052 #define DEFAULT_MAXPDU 16384
00053
00054 #define DEFAULT_filmDestination "DEFAULT"
00055 #define DEFAULT_filmOrientation "PORTRAIT"
00056 #define DEFAULT_filmSizeID "DEFAULT"
00057 #define DEFAULT_illumination 2000
00058 #define DEFAULT_imageDisplayFormat "STANDARD\\1,1"
00059 #define DEFAULT_imageNumber "1"
00060 #define DEFAULT_magnificationType "DEFAULT"
00061 #define DEFAULT_maxDensity 320
00062 #define DEFAULT_mediumType "DEFAULT"
00063 #define DEFAULT_minDensity 20
00064 #define DEFAULT_numberOfCopies "1"
00065 #define DEFAULT_ownerID "DEFAULT"
00066 #define DEFAULT_patientName "^^^^"
00067 #define DEFAULT_presentationLabel "UNNAMED"
00068 #define DEFAULT_printerStatus "NORMAL"
00069 #define DEFAULT_printerStatusInfo "NORMAL"
00070 #define DEFAULT_priority "MED"
00071 #define DEFAULT_reflectedAmbientLight 10
00072 #define DEFAULT_seriesNumber "1"
00073 #define DEFAULT_shutterPresentationValue 0
00074 #define DEFAULT_specificCharacterSet "ISO_IR 100"
00075 #define DEFAULT_trim "NO"
00076
00077
00078 #define WELLKNOWN_IDENTITY_PLUT_UID "1.2.276.0.7230010.3.4.1915765545.18030.917282194.1"
00079
00080
00081 #define PSTAT_DIMSE_LOG_STORAGE_UID "1.2.276.0.7230010.3.4.1915765545.18030.917282194.2"
00082
00083
00084 #define DVPS_IDX_NONE ((size_t)-1)
00085
00086
00087 #define PSTAT_MAXSTUDYCOUNT 200
00088
00089
00090 #define PSTAT_STUDYSIZE DB_UpperMaxBytesPerStudy
00091
00092
00093 #define PRINTJOB_SUFFIX ".job"
00094 #define PRINTJOB_DONE_SUFFIX ".old"
00095 #define PRINTJOB_TEMP_SUFFIX ".tmp"
00096
00097
00098 #define PSTAT_AETITLE "DCMPSTAT"
00099
00100
00101 #define PSTAT_DBFOLDER "."
00102
00103
00104 #define PSTAT_LUTFOLDER "."
00105
00106
00107 #define PSTAT_REPORTFOLDER "."
00108
00109
00110 #define PSTAT_SPOOLFOLDER "."
00111
00112
00113 #define L2_HIGHRESOLUTIONGRAPHICS "HIGHRESOLUTIONGRAPHICS"
00114
00115 #define PSTAT_DCM_LogReservation DcmTag(0x0009, 0x0010, EVR_LO)
00116 #define PSTAT_DCM_AcseSequence DcmTag(0x0009, 0x1100, EVR_SQ)
00117 #define PSTAT_DCM_LogSequence DcmTag(0x0009, 0x1200, EVR_SQ)
00118 #define PSTAT_DCM_LogEntryType DcmTag(0x0009, 0x1001, EVR_CS)
00119 #define PSTAT_DCM_LogDate DcmTag(0x0009, 0x1002, EVR_DA)
00120 #define PSTAT_DCM_LogTime DcmTag(0x0009, 0x1003, EVR_TM)
00121 #define PSTAT_DCM_AssociateData DcmTag(0x0009, 0x1004, EVR_OB)
00122
00123
00124
00125
00126 #define ADD_TO_DATASET(a_type, a_name) \
00127 if (result==EC_Normal) \
00128 { \
00129 delem = new a_type(a_name); \
00130 if (delem) dset.insert(delem, OFTrue); else result=EC_MemoryExhausted; \
00131 }
00132
00133
00134 #define ADD_TO_DATASET2(a_type, a_name) \
00135 if (result==EC_Normal) \
00136 { \
00137 delem = new a_type(a_name); \
00138 if (delem) ditem->insert(delem, OFTrue); else result=EC_MemoryExhausted; \
00139 }
00140
00141
00142 #define ADD_TO_PDATASET(a_type, a_name) \
00143 if (writeresult==EC_Normal) \
00144 { \
00145 delem = new a_type(a_name); \
00146 if (delem) rspDataset->insert(delem, OFTrue); else writeresult=EC_MemoryExhausted; \
00147 }
00148
00149
00150 #define ADD_REPEATING_ELEMENT_TO_DATASET(a_type, a_name, a_group) \
00151 if (result==EC_Normal) \
00152 { \
00153 delem = new a_type(a_name); \
00154 if (delem) \
00155 { \
00156 delem->setGTag(a_group); \
00157 dset.insert(delem, OFTrue); \
00158 } else result=EC_MemoryExhausted; \
00159 }
00160
00161
00162 #define READ_FROM_DATASET(a_type, a_name) \
00163 stack.clear(); \
00164 if (EC_Normal == dset.search((DcmTagKey &)a_name.getTag(), stack, ESM_fromHere, OFFalse)) \
00165 { \
00166 a_name = *((a_type *)(stack.top())); \
00167 }
00168
00169
00170 #define READ_FROM_DATASET2(a_type, a_name) \
00171 stack.clear(); \
00172 if (EC_Normal == item->search((DcmTagKey &)a_name.getTag(), stack, ESM_fromHere, OFFalse)) \
00173 { \
00174 a_name = *((a_type *)(stack.top())); \
00175 }
00176
00177
00178 #define READ_FROM_PDATASET(a_type, a_name) \
00179 stack.clear(); \
00180 if (rqDataset && (EC_Normal == rqDataset->search((DcmTagKey &)a_name.getTag(), stack, ESM_fromHere, OFFalse))) \
00181 { \
00182 a_name = *((a_type *)(stack.top())); \
00183 }
00184
00185
00186 #define SET_UID(a_name) \
00187 if (result==EC_Normal) \
00188 { \
00189 if (a_name.getLength()==0) result = a_name.putString(dcmGenerateUniqueIdentifier(uid)); \
00190 }
00191
00192 #endif
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234