Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

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


Generated on 8 Dec 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.9.1