00001 /* 00002 ** Copyright (C) 1993/1994, OFFIS, Oldenburg University and CERIUM 00003 ** 00004 ** This software and supporting documentation were 00005 ** developed by 00006 ** 00007 ** Institut OFFIS 00008 ** Bereich Kommunikationssysteme 00009 ** Westerstr. 10-12 00010 ** 26121 Oldenburg, Germany 00011 ** 00012 ** Fachbereich Informatik 00013 ** Abteilung Prozessinformatik 00014 ** Carl von Ossietzky Universitaet Oldenburg 00015 ** Ammerlaender Heerstr. 114-118 00016 ** 26111 Oldenburg, Germany 00017 ** 00018 ** CERIUM 00019 ** Laboratoire SIM 00020 ** Faculte de Medecine 00021 ** 2 Avenue du Pr. Leon Bernard 00022 ** 35043 Rennes Cedex, France 00023 ** 00024 ** for CEN/TC251/WG4 as a contribution to the Radiological 00025 ** Society of North America (RSNA) 1993 Digital Imaging and 00026 ** Communications in Medicine (DICOM) Demonstration. 00027 ** 00028 ** THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER OFFIS, 00029 ** OLDENBURG UNIVERSITY NOR CERIUM MAKE ANY WARRANTY REGARDING 00030 ** THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00031 ** FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER 00032 ** DISEASES OR ITS CONFORMITY TO ANY SPECIFICATION. THE 00033 ** ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF THE SOFTWARE 00034 ** IS WITH THE USER. 00035 ** 00036 ** Copyright of the software and supporting documentation 00037 ** is, unless otherwise stated, jointly owned by OFFIS, 00038 ** Oldenburg University and CERIUM and free access is hereby 00039 ** granted as a license to use this software, copy this 00040 ** software and prepare derivative works based upon this 00041 ** software. However, any distribution of this software 00042 ** source code or supporting documentation or derivative 00043 ** works (source code and supporting documentation) must 00044 ** include the three paragraphs of this copyright notice. 00045 ** 00046 */ 00047 /* 00048 ** dicom.h 00049 ** 00050 ** This header defines public typedefs for the DICOM software produced 00051 ** by the CEN Dicom Development Team. These definitions are 00052 ** meant to be used in a number of packages and need to be in a central 00053 ** location. 00054 ** 00055 ** The header file has evolved from a version written for the 00056 ** RSNA'92 InfoRAD DICOM Demonstration by: 00057 ** 00058 ** Stephen Moore (smm@wuerl.wustl.edu) 00059 ** Electronic Radiology Laboratory 00060 ** Mallinckrodt Institute of Radiology 00061 ** Washington University School of Medicine 00062 ** 23-May-1992 00063 ** 00064 ** 00065 ** Modifications: 00066 ** Andrew Hewett 00067 ** OFFIS/University of Oldenburg, Germany. 00068 ** 00069 ** 00070 ** Last Update: $Author: joergr $ 00071 ** Update Date: $Date: 2010-10-14 13:17:22 $ 00072 ** CVS/RCS Revision: $Revision: 1.13 $ 00073 ** Status: $State: Exp $ 00074 ** 00075 ** CVS/RCS Log at end of file 00076 ** 00077 */ 00078 00079 #ifndef DICOM_H 00080 #define DICOM_H 00081 00082 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00083 00084 #define INCLUDE_CSTDLIB 00085 #define INCLUDE_CSTDIO 00086 #define INCLUDE_LIBC 00087 #define INCLUDE_UNISTD 00088 #include "dcmtk/ofstd/ofstdinc.h" 00089 00090 #include "dcmtk/dcmnet/cond.h" /* condition typedefs */ 00091 #include "dcmtk/dcmnet/dcompat.h" /* compatability routines */ 00092 #include "dcmtk/dcmdata/dctypes.h" /* dcmdata toolkit basic types */ 00093 #include "dcmtk/dcmdata/dcuid.h" /* dcmdata UID definitions */ 00094 00095 /* 00096 * Useful Types 00097 */ 00098 00099 /* these types are for backwards compatibility */ 00100 typedef Uint16 U_SHORT; /* normal unsigned short*/ 00101 typedef Uint32 U_LONG; /* normal unsigned long */ 00102 typedef Uint32 MASK_32; /* For bit masks */ 00103 00104 00105 #define DICOM_STDAPPLICATIONCONTEXT UID_StandardApplicationContext 00106 #define DICOM_NET_IMPLEMENTATIONCLASSUID OFFIS_IMPLEMENTATION_CLASS_UID 00107 #define DICOM_NET_IMPLEMENTATIONVERSIONNAME OFFIS_DTK_IMPLEMENTATION_VERSION_NAME 00108 00109 /* network type constants as used by the DUL layer */ 00110 #define DICOM_APPLICATION_ACCEPTOR 0x01 00111 #define DICOM_APPLICATION_REQUESTOR 0x02 00112 00113 /* 00114 ** The following defines are used in some levels of the network code. 00115 */ 00116 00117 #define DIC_US_LEN sizeof(DIC_US) 00118 #define DIC_UL_LEN sizeof(DIC_UL) 00119 #define DIC_UI_LEN 64 00120 #define DIC_AE_LEN 16 00121 #define DIC_SH_LEN 16 00122 #define DIC_PN_LEN 64 00123 #define DIC_LO_LEN 64 00124 #define DIC_CS_LEN 16 00125 #define DIC_DS_LEN 16 00126 #define DIC_IS_LEN 12 00127 #define DIC_AT_LEN (2*sizeof(DIC_US)) 00128 #define DIC_NODENAME_LEN 128 00129 00130 #define DICOM_UI_LENGTH DIC_UI_LEN 00131 00132 typedef Uint16 DIC_US; 00133 typedef Uint32 DIC_UL; 00134 typedef char DIC_UI[DIC_UI_LEN + 1]; 00135 typedef char DIC_AE[DIC_AE_LEN + 1]; 00136 typedef char DIC_SH[DIC_SH_LEN + 1]; 00137 typedef char DIC_PN[DIC_PN_LEN + 1]; 00138 typedef char DIC_LO[DIC_LO_LEN + 1]; 00139 typedef char DIC_CS[DIC_CS_LEN + 1]; 00140 typedef char DIC_DS[DIC_DS_LEN + 1]; 00141 typedef char DIC_IS[DIC_IS_LEN + 1]; 00142 typedef char DIC_NODENAME[DIC_NODENAME_LEN + 1]; 00143 00144 00145 /* 00146 * Useful Macros 00147 */ 00148 00149 #ifndef MAX 00150 #define MAX(x, y) (((x) < (y)) ? (y) : (x)) 00151 #endif 00152 #ifndef MIN 00153 #define MIN(x, y) (((x) < (y)) ? (x) : (y)) 00154 #endif 00155 #ifndef IS_EVEN 00156 #define IS_EVEN(i) (~(i) & 0x01) 00157 #endif 00158 #ifndef DIM_OF 00159 #define DIM_OF(a) (sizeof(a) / sizeof(a[0])) 00160 #endif 00161 #ifndef IN_RANGE 00162 #define IN_RANGE(n, lo, hi) ((lo) <= n && (n) <= (hi)) 00163 #endif 00164 00165 #endif 00166 00167 /* 00168 ** CVS Log 00169 ** $Log: dicom.h,v $ 00170 ** Revision 1.13 2010-10-14 13:17:22 joergr 00171 ** Updated copyright header. Added reference to COPYRIGHT file. 00172 ** 00173 ** Revision 1.12 2005/12/08 16:02:20 meichel 00174 ** Changed include path schema for all DCMTK header files 00175 ** 00176 ** Revision 1.11 2004/08/03 11:42:43 meichel 00177 ** Headers libc.h and unistd.h are now included via ofstdinc.h 00178 ** 00179 ** Revision 1.10 2002/11/27 13:04:35 meichel 00180 ** Adapted module dcmnet to use of new header file ofstdinc.h 00181 ** 00182 ** Revision 1.9 2001/10/12 10:18:26 meichel 00183 ** Replaced the CONDITION types, constants and functions in the dcmnet module 00184 ** by an OFCondition based implementation which eliminates the global condition 00185 ** stack. This is a major change, caveat emptor! 00186 ** 00187 ** Revision 1.8 2001/09/26 12:28:59 meichel 00188 ** Implemented changes in dcmnet required by the adaptation of dcmdata 00189 ** to class OFCondition. Removed some unused code. 00190 ** 00191 ** Revision 1.7 2000/08/10 14:50:53 meichel 00192 ** Added initial OpenSSL support. 00193 ** 00194 ** Revision 1.6 2000/02/23 15:12:25 meichel 00195 ** Corrected macro for Borland C++ Builder 4 workaround. 00196 ** 00197 ** Revision 1.5 2000/02/01 10:24:06 meichel 00198 ** Avoiding to include <stdlib.h> as extern "C" on Borland C++ Builder 4, 00199 ** workaround for bug in compiler header files. 00200 ** 00201 ** Revision 1.4 1997/07/21 08:40:09 andreas 00202 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL) 00203 ** with one unique boolean type OFBool. 00204 ** 00205 ** Revision 1.3 1997/02/06 12:15:41 hewett 00206 ** Updated preliminary Apple Macintosh support for the Metrowerks CodeWarrior 00207 ** version 11 compiler and environment. 00208 ** 00209 ** Revision 1.2 1996/09/27 08:29:42 hewett 00210 ** Support for Win32. Now does not define a type BOOLEAN if <WINSOCK.H> 00211 ** is included. Renames the ERROR(A) macro to be CONDERROR(A) macro due 00212 ** to a clash with Windows include files. 00213 ** 00214 ** Revision 1.1.1.1 1996/03/26 18:38:45 hewett 00215 ** Initial Release. 00216 ** 00217 ** 00218 */