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