dicom.h

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: meichel $
00071 ** Update Date:     $Date: 2005/12/08 16:02:20 $
00072 ** Source File:     $Source: /share/dicom/cvs-depot/dcmtk/dcmnet/include/dcmtk/dcmnet/dicom.h,v $
00073 ** CVS/RCS Revision:    $Revision: 1.12 $
00074 ** Status:      $State: Exp $
00075 **
00076 ** CVS/RCS Log at end of file
00077 **
00078 */
00079 
00080 #ifndef DICOM_H
00081 #define DICOM_H
00082 
00083 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00084 
00085 #define INCLUDE_CSTDLIB
00086 #define INCLUDE_CSTDIO
00087 #define INCLUDE_LIBC
00088 #define INCLUDE_UNISTD
00089 #include "dcmtk/ofstd/ofstdinc.h"
00090 
00091 #include "dcmtk/dcmnet/cond.h"       /* condition typedefs */
00092 #include "dcmtk/dcmnet/dcompat.h"   /* compatability routines */
00093 #include "dcmtk/dcmdata/dctypes.h"  /* dcmdata toolkit basic types */
00094 #include "dcmtk/dcmdata/dcuid.h"    /* dcmdata UID definitions */
00095 
00096 /*
00097  * Useful Types
00098  */
00099 
00100 /* these types are for backwards compatibility */
00101 typedef Uint16  U_SHORT;    /* normal unsigned short*/
00102 typedef Uint32  U_LONG;     /* normal unsigned long */
00103 typedef Uint32  MASK_32;    /* For bit masks    */
00104 
00105 
00106 #define DICOM_STDAPPLICATIONCONTEXT UID_StandardApplicationContext
00107 #define DICOM_NET_IMPLEMENTATIONCLASSUID OFFIS_IMPLEMENTATION_CLASS_UID
00108 #define DICOM_NET_IMPLEMENTATIONVERSIONNAME OFFIS_DTK_IMPLEMENTATION_VERSION_NAME
00109 
00110 /* network type constants as used by the DUL layer */
00111 #define DICOM_APPLICATION_ACCEPTOR  0x01
00112 #define DICOM_APPLICATION_REQUESTOR 0x02
00113 
00114 /*
00115 ** The following defines are used in some levels of the network code.
00116 */
00117 
00118 #define DIC_US_LEN      sizeof(DIC_US)
00119 #define DIC_UL_LEN      sizeof(DIC_UL)
00120 #define DIC_UI_LEN      64      
00121 #define DIC_AE_LEN      16      
00122 #define DIC_SH_LEN      16
00123 #define DIC_PN_LEN      64
00124 #define DIC_LO_LEN      64
00125 #define DIC_CS_LEN      16
00126 #define DIC_DS_LEN      16
00127 #define DIC_IS_LEN      12
00128 #define DIC_AT_LEN      (2*sizeof(DIC_US))
00129 #define DIC_NODENAME_LEN    128
00130 
00131 #define DICOM_UI_LENGTH DIC_UI_LEN
00132 
00133 typedef Uint16  DIC_US;
00134 typedef Uint32  DIC_UL;
00135 typedef char    DIC_UI[DIC_UI_LEN + 1];
00136 typedef char    DIC_AE[DIC_AE_LEN + 1];
00137 typedef char    DIC_SH[DIC_SH_LEN + 1];
00138 typedef char    DIC_PN[DIC_PN_LEN + 1];
00139 typedef char    DIC_LO[DIC_LO_LEN + 1];
00140 typedef char    DIC_CS[DIC_CS_LEN + 1];
00141 typedef char    DIC_DS[DIC_DS_LEN + 1];
00142 typedef char    DIC_IS[DIC_IS_LEN + 1];
00143 typedef char    DIC_NODENAME[DIC_NODENAME_LEN + 1];
00144 
00145 
00146 /*
00147  * Useful Macros
00148  */
00149 
00150 #ifndef MAX
00151 #define MAX(x, y) (((x) < (y)) ? (y) : (x))
00152 #endif
00153 #ifndef MIN
00154 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
00155 #endif
00156 #ifndef IS_EVEN
00157 #define IS_EVEN(i) (~(i) & 0x01)
00158 #endif
00159 #ifndef DIM_OF
00160 #define DIM_OF(a) (sizeof(a) / sizeof(a[0]))
00161 #endif
00162 #ifndef IN_RANGE
00163 #define IN_RANGE(n, lo, hi) ((lo) <= n && (n) <= (hi))
00164 #endif
00165 
00166 #endif
00167 
00168 /*
00169 ** CVS Log
00170 ** $Log: dicom.h,v $
00171 ** Revision 1.12  2005/12/08 16:02:20  meichel
00172 ** Changed include path schema for all DCMTK header files
00173 **
00174 ** Revision 1.11  2004/08/03 11:42:43  meichel
00175 ** Headers libc.h and unistd.h are now included via ofstdinc.h
00176 **
00177 ** Revision 1.10  2002/11/27 13:04:35  meichel
00178 ** Adapted module dcmnet to use of new header file ofstdinc.h
00179 **
00180 ** Revision 1.9  2001/10/12 10:18:26  meichel
00181 ** Replaced the CONDITION types, constants and functions in the dcmnet module
00182 **   by an OFCondition based implementation which eliminates the global condition
00183 **   stack.  This is a major change, caveat emptor!
00184 **
00185 ** Revision 1.8  2001/09/26 12:28:59  meichel
00186 ** Implemented changes in dcmnet required by the adaptation of dcmdata
00187 **   to class OFCondition.  Removed some unused code.
00188 **
00189 ** Revision 1.7  2000/08/10 14:50:53  meichel
00190 ** Added initial OpenSSL support.
00191 **
00192 ** Revision 1.6  2000/02/23 15:12:25  meichel
00193 ** Corrected macro for Borland C++ Builder 4 workaround.
00194 **
00195 ** Revision 1.5  2000/02/01 10:24:06  meichel
00196 ** Avoiding to include <stdlib.h> as extern "C" on Borland C++ Builder 4,
00197 **   workaround for bug in compiler header files.
00198 **
00199 ** Revision 1.4  1997/07/21 08:40:09  andreas
00200 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
00201 **   with one unique boolean type OFBool.
00202 **
00203 ** Revision 1.3  1997/02/06 12:15:41  hewett
00204 ** Updated preliminary Apple Macintosh support for the Metrowerks CodeWarrior
00205 ** version 11 compiler and environment.
00206 **
00207 ** Revision 1.2  1996/09/27 08:29:42  hewett
00208 ** Support for Win32.  Now does not define a type BOOLEAN if <WINSOCK.H>
00209 ** is included.  Renames the ERROR(A) macro to be CONDERROR(A) macro due
00210 ** to a clash with Windows include files.
00211 **
00212 ** Revision 1.1.1.1  1996/03/26 18:38:45  hewett
00213 ** Initial Release.
00214 **
00215 **
00216 */


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