~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/file/dicom.old/CTN/dicom.h

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2           Copyright (C) 1993, 1994, RSNA and Washington University
  3 
  4           The software and supporting documentation for the Radiological
  5           Society of North America (RSNA) 1993, 1994 Digital Imaging and
  6           Communications in Medicine (DICOM) Demonstration were developed
  7           at the
  8                   Electronic Radiology Laboratory
  9                   Mallinckrodt Institute of Radiology
 10                   Washington University School of Medicine
 11                   510 S. Kingshighway Blvd.
 12                   St. Louis, MO 63110
 13           as part of the 1993, 1994 DICOM Central Test Node project for, and
 14           under contract with, the Radiological Society of North America.
 15 
 16           THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR
 17           WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS
 18           PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
 19           USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY
 20           SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF
 21           THE SOFTWARE IS WITH THE USER.
 22 
 23           Copyright of the software and supporting documentation is
 24           jointly owned by RSNA and Washington University, and free access
 25           is hereby granted as a license to use this software, copy this
 26           software and prepare derivative works based upon this software.
 27           However, any distribution of this software source code or
 28           supporting documentation or derivative works (source code and
 29           supporting documentation) must include the three paragraphs of
 30           the copyright notice.
 31 */
 32 /* Copyright marker.  Copyright will be inserted above.  Do not remove */
 33 /*
 34 ** @$=@$=@$=
 35 */
 36 /*
 37 **                              DICOM 93
 38 **                   Electronic Radiology Laboratory
 39 **                 Mallinckrodt Institute of Radiology
 40 **              Washington University School of Medicine
 41 **
 42 ** Module Name(s):
 43 ** Author, Date:        Stephen M. Moore, 15-Apr-93
 44 ** Intent:              This header defines public typedefs for the DICOM
 45 **                      software produced at the Mallinckrodt Institute of
 46 **                      Radiology.  It also defines unique identifiers
 47 **                      for standard classes and objects defined by the
 48 **                      standard.
 49 ** Last Update:         $Author: smm $, $Date: 1998/10/22 15:24:48 $
 50 ** Source File:         $RCSfile: dicom.h,v $
 51 ** Revision:            $Revision: 1.31 $
 52 ** Status:              $State: Exp $
 53 */
 54 
 55 #ifndef DICOM_IS_IN
 56 #define DICOM_IS_IN 1
 57 
 58 #ifdef _MSC_VER
 59 #include "dicom_platform.h"
 60 #endif
 61 
 62 #ifdef  __cplusplus
 63 extern "C" {
 64 #endif
 65 
 66 #ifndef _SITE_MACROS
 67     typedef unsigned long CONDITION;
 68     typedef unsigned short U_SHORT;     /* normal unsigned short */
 69     typedef unsigned long U_LONG;       /* normal unsigned long */
 70     typedef unsigned long MASK_32;      /* For bit masks         */
 71     typedef unsigned long CTNBOOLEAN;   /* for boolean ops       */
 72 
 73 #if !defined(SHORTSIZE) || SHORTSIZE != 16
 74 /* The writers of this code assume that shorts are 16 bits long.
 75 ** If that is not the case, this system will not operate properly.
 76 ** This code will trip the compiler.  This code also tripes the
 77 ** compiler if you have not defined the macro SHORTSIZE.  You
 78 ** also want to define INTSIZE and LONGSIZE.
 79 */
 80 
 81     short c;
 82     char c;                     /* See note above */
 83 #endif
 84 
 85     typedef unsigned short U16; /* unsigned, 16 bit */
 86     typedef short S16;          /* signed, 16 bit */
 87 
 88 #if LONGSIZE == 64 && INTSIZE == 32     /* Such as an Alpha */
 89     typedef unsigned int U32;
 90     typedef int S32;
 91 
 92 #elif LONGSIZE == 32            /* Most 32 bit workstations */
 93     typedef unsigned long U32;
 94     typedef long S32;
 95 
 96 #else                           /* Something we do not support */
 97 
 98 /* The writers of this code assume that we can find a 32 bit integer
 99 ** defined for this system as an int or a long.  If that assumption
100 ** is not true, this code will not operate properly.
101 ** This code will trip the compiler.
102 */
103 
104     short c;
105     char c;                     /* See note above */
106 
107 #endif
108 
109 #endif
110 
111 #define FORM_COND(facility, severity, value) \
112         (CONDITION)((((unsigned long)value)<<16) | \
113         (((unsigned long)facility) << 4) | ((unsigned long)severity))
114 
115 #define SEV_SUCC        1
116 #define SEV_INFORM      3
117 #define SEV_WARN        5
118 #define SEV_ERROR       2
119 #define SEV_FATAL       4
120 
121 #define CTN_SUCCESS(A)  (((A)&0xf) == SEV_SUCC)
122 #define CTN_INFORM(A)   (((A)&0xf) == SEV_INFORM)
123 #define CTN_WARNING(A)  (((A)&0xf) == SEV_WARN)
124 #define CTN_ERROR(A)    (((A)&0xf) == SEV_ERROR)
125 #define CTN_FATAL(A)    (((A)&0xf) == SEV_FATAL)
126 
127 #if 0
128 /* We turn these on to force compiler errors to find dependencies
129 ** on these older macros.  These are retired as of 2.8.6.
130 */
131 #define SUCCESS(A)      (zzzz)
132 #define INFORM(A)       (zzzz)
133 #define WARNING(A)      (zzzz)
134 #define ERROR(A)        (zzzz)
135 #define FATAL(A)        (zzzz)
136 #endif
137 
138 #define FACILITY(A)     ((unsigned long)(A)>>4) & 0xfff
139 
140 #ifndef _FACILITY_CODES
141 #define FAC_DUL         1
142 #define FAC_ACR         2
143 #define FAC_IDX         3
144 #define FAC_LST         4
145 #define FAC_DIAG        5
146 #define FAC_COND        6
147 #define FAC_GQ          7
148 #define FAC_SRV         8
149 #define FAC_DCM         9
150 #define FAC_MSG         10
151 #define FAC_HUNK        11
152 #define FAC_DB          12
153 #define FAC_CFG         13
154 #define FAC_IAP         14
155 #define FAC_HIS         15
156 #define FAC_HAP         16
157 #define FAC_IE          17
158 #define FAC_UID         18
159 #define FAC_SQ          19
160 #define FAC_ICON        20
161 #define FAC_PRN         21
162 #define FAC_TBL         22      /* Table functions (relational database) */
163 #define FAC_DMAN        23      /* DICOM Management of application
164                                  * connections */
165 #define FAC_UTL         24      /* Utility functions */
166 #define FAC_IDB         25      /* Image database */
167 #define FAC_MUT         26      /* Motif utilities */
168 #define FAC_IMAN        27      /* Image management */
169 #define FAC_ICPY        30      /* Image copy (structures for queueing) */
170 #define FAC_FIS         31      /* Fake information system */
171 #define FAC_SNP         32      /* TCP/IP snoop facility */
172 #define FAC_LUT         34      /* LUT facility */
173 #define FAC_IODV        35      /* IOD Verification */
174 #define FAC_THR         36      /* CTN Threading routines */
175 #define FAC_DDR         37      /* DICOM Directory Services */
176 #define FAC_ATH         38      /* Application thread usage */
177 #define FAC_IRS         39      /* Image recycle system */
178 
179 #define FAC_MAXIMUM     40      /* Maximum number of facilities.  This can increase */
180 
181 #define FAC_APP 0x0fff          /* for stand-alone programs      */
182 #endif
183 
184 #ifndef TRUE
185 #define TRUE    1
186 #define FALSE   0
187 #endif
188 
189 
190 #ifndef MAX
191 #define MAX(x, y) (((x) < (y)) ? (y) : (x))
192 #endif
193 #ifndef MIN
194 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
195 #endif
196 #define IS_EVEN(i) (~(i) & 0x01)
197 #define DIM_OF(a) (sizeof(a) / sizeof(a[0]))
198 #define IN_RANGE(n, lo, hi) ((lo) <= n && (n) <= (hi))
199 #define STRUCT_OFFSET(s, f)  (off_t)(((s *)(0))->f)
200 
201 #ifdef NO_STRERROR
202     static char *
203         strerror(int e) {
204         static char string[256];
205 
206             sprintf(string, "Error number: %d", e);
207             return string;
208     }
209 #endif
210 
211 #define DICOM_AS_LENGTH 4
212 #define DICOM_CS_LENGTH 16
213 #define DICOM_DS_LENGTH 16
214 #define DICOM_IS_LENGTH 12
215 #define DICOM_PN_LENGTH 64
216 #define DICOM_DA_LENGTH 8
217 #define DICOM_LO_LENGTH 64
218 #define DICOM_TM_LENGTH 16
219 #define DICOM_UI_LENGTH 64
220 #define DICOM_SH_LENGTH 16
221 #define DICOM_AE_LENGTH 16
222 #define DICOM_ST_LENGTH 1024
223 #define DICOM_LT_LENGTH 10240
224 #define DICOM_DT_LENGTH 26
225 
226 #define VERSION_JUN1993 199306
227 #define VERSION_JUL1993 199307
228 #define VERSION_AUG1993 199308
229 #define VERSION_SEP1993 199309
230 #define VERSION_OCT1993 199310
231 #define VERSION_NOV1993 199311
232 #define VERSION_DEC1993 199312
233 #define VERSION_JAN1994 199401
234 #define VERSION_FEB1994 199402
235 #define VERSION_MAR1994 199403
236 #define VERSION_APR1994 199404
237 #define VERSION_MAY1994 199405
238 #define VERSION_JUN1994 199406
239 #define VERSION_JUL1994 199407
240 #define VERSION_AUG1994 199408
241 #define VERSION_SEP1994 199409
242 #define VERSION_OCT1994 199410
243 #define VERSION_NOV1994 199411
244 #define VERSION_DEC1994 199412
245 #define VERSION_JAN1995 199501
246 #define VERSION_FEB1995 199502
247 #define VERSION_MAR1995 199503
248 #define VERSION_APR1995 199504
249 #define VERSION_MAY1995 199505
250 #define VERSION_JUN1995 199506
251 
252 #ifndef STANDARD_VERSION
253 #define STANDARD_VERSION VERSION_JUN1995
254 #endif
255 
256 #ifdef MALLOC_TEST
257 
258 #define malloc(a) (void *)COND_Malloc((a), __FILE__, __LINE__)
259 #define free(a) (void)COND_Free((a), __FILE__, __LINE__)
260 
261 #endif
262 
263 #define CTN_MALLOC(a) malloc((a))
264 #define CTN_FREE(a)   free((a))
265 
266 #ifdef  __cplusplus
267 }
268 #endif
269 
270 #endif
271 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.