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

Linux Cross Reference
Tina4/src/file/dicom.old/CTN/dcmprivate.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 **                              DICOM 93
 36 **                   Electronic Radiology Laboratory
 37 **                 Mallinckrodt Institute of Radiology
 38 **              Washington University School of Medicine
 39 **
 40 ** Module Name(s):
 41 ** Author, Date:        Stephen M. Moore, 26-Apr-93
 42 ** Intent:
 43 **      This file defines private structures for the DICOM information
 44 **      object package.
 45 ** Last Update:         $Author: smm $, $Date: 1998/01/28 04:11:16 $
 46 ** Source File:         $RCSfile: dcmprivate.h,v $
 47 ** Revision:            $Revision: 1.18 $
 48 ** Status:              $State: Exp $
 49 */
 50 
 51 #ifdef  __cplusplus
 52 extern "C" {
 53 #endif
 54 
 55 typedef struct {
 56     void *reserved[2];
 57     unsigned short group;
 58 /*    unsigned long groupLength; */
 59     unsigned long baseLength;
 60     int longVRAttributes;
 61     LST_HEAD *elementList;
 62 }   PRV_GROUP_ITEM;
 63 
 64 typedef struct {
 65     void *reserved[2];
 66     DCM_ELEMENT element;
 67     int byteOrder;
 68     off_t dataOffset;
 69     off_t currentOffset;
 70     size_t allocatedDataLength;
 71     size_t originalDataLength;
 72     size_t paddedDataLength;
 73 }   PRV_ELEMENT_ITEM;
 74 
 75 #define DCM_OBJUNDEFINED 0x01
 76 #define DCM_OBJCOMMAND  0x02
 77 #define DCM_OBJDATASET  0x03
 78 
 79 typedef struct {
 80     void *reserved[2];
 81     char keyType[32];
 82     DCM_OBJECTTYPE objectType;
 83     int accessMethod;
 84     CTNBOOLEAN deleteFlag;
 85     CTNBOOLEAN groupLengthFlag;
 86     unsigned long objectSize;
 87     unsigned long offset;
 88     unsigned long pixelSize;
 89     unsigned long pixelOffset;
 90     unsigned short pixelBitsAllocated;
 91     unsigned short pixelRepresentation;
 92     PRV_GROUP_ITEM *groupCtx;
 93     PRV_ELEMENT_ITEM *elementCtx;
 94     int fd;
 95     char fileName[1024];
 96     void *userCtx;
 97         CONDITION(*rd) (void *ctx, void *buf, int toRead, int *bytesRead);
 98         CONDITION(*sk) (void *ctx, int offset, int flag);
 99     LST_HEAD *groupList;
100     CTNBOOLEAN preambleFlag;
101     unsigned char preamble[DCM_PREAMBLELENGTH];
102     unsigned long dataOptions;
103     unsigned long metaHeaderLength;
104     int longVRAttributes;
105     char waveformDataVR[DICOM_CS_LENGTH+1];
106 }   PRIVATE_OBJECT;
107 
108 #define KEY_DCM_OBJECT  "KEY ACR NEMA V3 OBJECT"
109 
110 #define DCM_FILE_ACCESS         1
111 #define DCM_MEMORY_ACCESS       2
112 
113 typedef union {
114     unsigned short s;
115     unsigned char u[2];
116 }   SHORT_WORD;
117 
118 typedef union {
119 #ifdef __alpha
120     unsigned int l;
121 #else
122     unsigned long l;
123 #endif
124     unsigned char u[4];
125 }   LONG_WORD;
126 
127 #define GET_SHORT_SAME_ORDER(A,B) {             \
128         SHORT_WORD sss;                         \
129         sss.u[0] = (A)[0];                      \
130         sss.u[1] = (A)[1];                      \
131         (B) = sss.s;                            \
132 }
133 
134 #define GET_SHORT_REVERSE_ORDER(A,B) {          \
135         SHORT_WORD sss;                         \
136         sss.u[0] = (A)[1];                      \
137         sss.u[1] = (A)[0];                      \
138         (B) = sss.s;                            \
139 }
140 
141 #define GET_LONG_SAME_ORDER(A,B) {              \
142         LONG_WORD lll;                          \
143         lll.u[0] = (A)[0];                      \
144         lll.u[1] = (A)[1];                      \
145         lll.u[2] = (A)[2];                      \
146         lll.u[3] = (A)[3];                      \
147         (B) = lll.l;                            \
148 }
149 
150 #define GET_LONG_REVERSE_ORDER(A,B) {           \
151         LONG_WORD lll;                          \
152         lll.u[0] = (A)[3];                      \
153         lll.u[1] = (A)[2];                      \
154         lll.u[2] = (A)[1];                      \
155         lll.u[3] = (A)[0];                      \
156         (B) = lll.l;                            \
157 }
158 
159 #ifdef  __cplusplus
160 }
161 #endif
162 

~ [ 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.