00001 
00002 #ifndef  __JBXL_GRAPHIC_HEADER_H_
00003 #define  __JBXL_GRAPHIC_HEADER_H_
00004 
00005 
00058 #include "tools.h"
00059 
00060 
00062 
00063 
00064 typedef struct _CTHead {
00065     sWord  xsize;
00066     sWord  ysize;
00067     sWord  ctmin;
00068     sWord  ctmax;
00069     sWord  cutup; 
00070     sWord  cutdown;
00071     sWord  cutleft;
00072     sWord  cutright;
00073     sWord  anydata[23];
00074     sWord  img_flag;
00075 } CTHead;
00076 
00077 
00079 
00080 
00081 
00082 typedef struct _RasHead {
00083     int  ras_magic;
00084     int  ras_width;
00085     int  ras_height;
00086     int  ras_depth;
00087     int  ras_length;
00088     int  ras_type;
00089     int  ras_maptype;
00090     int  ras_maplength;
00091 } RasHead;
00092 
00093 
00094 #define RAS_MAGIC       0x59a66a95
00095 #define RAS_RLE         0x80
00096 #define RT_OLD          0  
00097 #define RT_STANDARD     1 
00098 #define RT_BYTE_ENCODED 2 
00099 #define RT_FORMAT_RGB   3
00100 #define RMT_NONE        0
00101 #define RMT_EQUAL_RGB   1
00102 #define RMT_RAW         2
00103 
00104 
00106 
00107 
00108 typedef struct _CmnHead {
00109     int kind;               
00110     int xsize;              
00111     int ysize;              
00112     int zsize;              
00113     int depth;              
00114     unsigned int bsize;     
00115     unsigned int lsize;     
00116     uByte* buf;             
00117     uByte* grptr;           
00118 } CmnHead;
00119 
00120 
00122 
00123 typedef struct _RGB24Data
00124 {
00125     uByte  R;
00126     uByte  G;
00127     uByte  B;
00128 } RGB24Data;
00129 
00130 
00132 
00133 
00134 #define  UN_KNOWN_DATA          0       
00135 #define  PROC_DATA              1       
00136 #define  CREATE_DATA            2       
00137 #define  MOON_DATA              3       
00138 #define  DICOM_DATA             4       
00139 #define  USERSET_DATA           5       
00140 
00141 #define  RAS_DATA               8       
00142 #define  RAS8_DATA              8       
00143 #define  RAS16_DATA             9       
00144 #define  RAS24_DATA             9       
00145 
00146 
00147 #define  CT_DATA                16      
00148 #define  CT_3DM                 18      
00149 #define  CT_3D_VOL              19      
00150 #define  CT_RGN_SL              20      
00151 
00152 
00153 #define  JPEG_DATA              32      
00154 #define  JPEG_RGB_DATA          32      
00155 #define  JPEG_MONO_DATA         33      
00156 #define  JPEG16_RGB_DATA        34      
00157 #define  JPEG16_ARGB_DATA       35      
00158 #define  JPEG16_RGBA_DATA       36      
00159 #define  JPEG_ARGB_DATA         37      
00160 #define  JPEG_RGBA_DATA         38      
00161 
00162 #define  TIFF_DATA              48      
00163 #define  PNG_DATA               64      
00164 
00165 #define  TGA_DATA               80      
00166 
00167 
00168 #define  HAS_DUMMY1             256     
00169 #define  HAS_DUMMY2             512     
00170 #define  HAS_BASE               1024    
00171 #define  HAS_ZSPACE             2048    
00172 #define  HAS_RZXY               4096    
00173 #define  HAS_RBOUND             8192    
00174 #define  HAS_LENDIAN            16384   
00175 
00176 #define  HEADER_NONE            32768   
00177 #define  NUM_KDATA              32767   
00178 
00179 #define  RZXY_RATE              10000   
00180 #define  ZEROCT_BASE            4096
00181 
00182 
00183 #define  UN_KNOWN_DATA_STR      "UNKNOWN DATA"
00184 #define  PROC_DATA_STR          "PROC DATA"
00185 #define  CREATE_DATA_STR        "CREATE DATA"
00186 #define  USERSET_DATA_STR       "USERSET DATA"
00187 #define  DICOM_DATA_STR         "DICOM"
00188 #define  RAS_DATA_STR           "SUN RASTER"
00189 #define  CT_DATA_STR            "Common Header"
00190 #define  CT_3DM_STR             "Common 3D"
00191 #define  MOON_DATA_STR          "CT (Moon)"
00192 #define  JPEG_RGB_DATA_STR      "JPEG RGB"
00193 #define  JPEG_MONO_DATA_STR     "JPEG MONO"
00194 #define  PNG_DATA_STR           "PNG"
00195 #define  TIFF_DATA_STR          "TIFF"
00196 #define  CT_3D_VOL_STR          "3D VOL"
00197 
00198 
00199 
00200 #define  GRAPH_COLOR_MONO       0       
00201 #define  GRAPH_COLOR_MONO8      0
00202 
00203 
00204 #define  GRAPH_COLOR_MONO16     16      
00205 
00206 #define  GRAPH_COLOR_R5G6B5     17      
00207 #define  GRAPH_COLOR_RGB16      17
00208 
00209 #define  GRAPH_COLOR_R4G4B4A4   18      
00210 #define  GRAPH_COLOR_RGBA16     18
00211 
00212 #define  GRAPH_COLOR_A4R4G4B4   19      
00213 #define  GRAPH_COLOR_ARGB16     19
00214 
00215 #define  GRAPH_COLOR_MA         20      
00216 #define  GRAPH_COLOR_M8A8       20
00217 #define  GRAPH_COLOR_MA16       20
00218 
00219 
00220 #define  GRAPH_COLOR_R8G8B8     32      
00221 #define  GRAPH_COLOR_RGB24      32
00222 #define  GRAPH_COLOR_RGB        32
00223 
00224 #define  GRAPH_COLOR_B8G8R8     48      
00225 #define  GRAPH_COLOR_BGR24      48
00226 #define  GRAPH_COLOR_BGR        48
00227 
00228 
00229 #define  GRAPH_COLOR_A8R8G8B8   64      
00230 #define  GRAPH_COLOR_ARGB32     64
00231 #define  GRAPH_COLOR_ARGB       64
00232 
00233 #define  GRAPH_COLOR_R8G8B8A8   65      
00234 #define  GRAPH_COLOR_RGBA32     65
00235 #define  GRAPH_COLOR_RGBA       65
00236 
00237 #define  GRAPH_COLOR_X8R8G8B8   66      
00238 #define  GRAPH_COLOR_XRGB32     66
00239 #define  GRAPH_COLOR_XRGB       66
00240 
00241 #define  GRAPH_COLOR_A8B8G8R8   80      
00242 #define  GRAPH_COLOR_ABGR32     80
00243 #define  GRAPH_COLOR_ABGR       80
00244 
00245 #define  GRAPH_COLOR_B8G8R8A8   81      
00246 #define  GRAPH_COLOR_BGRA32     81
00247 #define  GRAPH_COLOR_BGRA       81
00248 
00249 #define  GRAPH_COLOR_X8B8G8R8   82      
00250 #define  GRAPH_COLOR_XBGR32     82
00251 #define  GRAPH_COLOR_XBGR       82
00252 
00253 #define  GRAPH_COLOR_UNKNOWN    112     
00254 
00255 
00257 
00258 
00259 #define  GRAPH_COLOR_USE_PLANE  128     
00260 #define  GRAPH_COLOR_MASK       127     
00261 
00262 
00263 #define  GRAPH_COLOR_PR8G8B8    160     
00264 #define  GRAPH_COLOR_PRGB24     160
00265 #define  GRAPH_COLOR_PRGB       160
00266 
00267 #define  GRAPH_COLOR_PB8G8R8    176     
00268 #define  GRAPH_COLOR_PBGR24     176
00269 #define  GRAPH_COLOR_PBGR       176
00270 
00271 
00272 #define  GRAPH_COLOR_PA8R8G8B8  192     
00273 #define  GRAPH_COLOR_PARGB32    192
00274 #define  GRAPH_COLOR_PARGB      192
00275 
00276 #define  GRAPH_COLOR_PR8G8B8A8  193     
00277 #define  GRAPH_COLOR_PRGBA32    193
00278 #define  GRAPH_COLOR_PRGBA      193
00279 
00280 #define  GRAPH_COLOR_PX8R8G8B8  194     
00281 #define  GRAPH_COLOR_PXRGB32    194
00282 #define  GRAPH_COLOR_PXRGB      194
00283 
00284 #define  GRAPH_COLOR_PA8B8G8R8  208     
00285 #define  GRAPH_COLOR_PABGR32    208
00286 #define  GRAPH_COLOR_PABGR      208
00287 
00288 #define  GRAPH_COLOR_PB8G8R8A8  209     
00289 #define  GRAPH_COLOR_PBGRA32    209
00290 #define  GRAPH_COLOR_PBGRA      209
00291 
00292 #define  GRAPH_COLOR_PX8B8G8R8  210     
00293 #define  GRAPH_COLOR_PXBGR32    210
00294 #define  GRAPH_COLOR_PXBGR      210
00295 
00296 #define  STATE_GRAPH_NOERR      0
00297 
00298 
00300 
00301 #define  DICOM_STUDY_GROUP      0x0020
00302 #define  DICOM_IMAGE_GROUP      0x0028
00303 #define  DICOM_PIXEL_GROUP      0x7fe0
00304 
00305 #define  DICOM_PIXEL_ELEMENT    0x0010
00306 #define  DICOM_XSIZE_ELEMENT    0x0011
00307 #define  DICOM_YSIZE_ELEMENT    0x0010
00308 #define  DICOM_PXLSPC_ELEMENT   0x0030
00309 #define  DICOM_DEPTH_ELEMENT    0x0100
00310 #define  DICOM_GRYLV_ELEMENT    0x0101
00311 
00312 #define  DICOM_PIXCEL_VR        0x574f  
00313 #define  DICOM_STR_VR           0x5344  
00314 #define  DICOM_INT_VR           0x5355  
00315 
00316 
00317 #endif      // __JBXL_GRAPHIC_HEADER_H_
00318