JunkBox_Lib++ (for Windows)
1.10.1
Loading...
Searching...
No Matches
gheader.h
Go to the documentation of this file.
1
2
#ifndef __JBXL_GRAPHIC_HEADER_H_
3
#define __JBXL_GRAPHIC_HEADER_H_
4
5
58
#include "
tools.h
"
59
60
62
// CT(Moon) format ヘッダ
63
//
64
typedef
struct
_CTHead {
65
sWord
xsize
;
66
sWord
ysize
;
67
sWord
ctmin
;
68
sWord
ctmax
;
69
sWord
cutup
;
70
sWord
cutdown
;
71
sWord
cutleft
;
72
sWord
cutright
;
73
sWord
anydata[23];
74
sWord
img_flag
;
75
}
CTHead
;
76
77
79
// SUN RASTER File
80
// see... man 5 rasterfile
81
//
82
typedef
struct
_RasHead {
83
int
ras_magic
;
84
int
ras_width
;
85
int
ras_height
;
86
int
ras_depth
;
87
int
ras_length
;
88
int
ras_type
;
89
int
ras_maptype
;
90
int
ras_maplength
;
91
}
RasHead
;
92
93
94
#define RAS_MAGIC 0x59a66a95
95
#define RAS_RLE 0x80
96
#define RT_OLD 0
97
#define RT_STANDARD 1
98
#define RT_BYTE_ENCODED 2
99
#define RT_FORMAT_RGB 3
100
#define RMT_NONE 0
101
#define RMT_EQUAL_RGB 1
102
#define RMT_RAW 2
103
104
106
// 共通ヘッダ
107
//
108
109
// ファイル用
110
typedef
struct
_CmnHead_Entry {
111
int
kind
;
112
int
xsize
;
113
int
ysize
;
114
int
zsize
;
115
int
depth
;
116
unsigned
int
bsize
;
117
unsigned
int
lsize
;
118
int
option
;
119
}
CmnHead_Entry
;
120
121
// 作業用
122
// x86 と x64 でサイズが変化するので注意!
123
typedef
struct
_CmnHead {
124
union
{
125
CmnHead_Entry
entry
;
126
struct
{
127
int
kind
;
128
int
xsize
;
129
int
ysize
;
130
int
zsize
;
131
int
depth
;
132
unsigned
int
bsize
;
133
unsigned
int
lsize
;
134
int
option
;
135
};
136
};
137
uByte
*
buf
;
138
uByte
*
grptr
;
139
}
CmnHead
;
140
141
/*
142
typedef struct _CmnHead {
143
int kind; ///< Kind of Graphics Format
144
int xsize; ///< Width of Graphics
145
int ysize; ///< Height of Graphics
146
int zsize; ///< For 3D Data (or Color)
147
int depth; ///< Color Depth of Graphics (bit unit)
148
unsigned int bsize; ///< Fllowing buf size or Any Data (byte unit)
149
unsigned int lsize; ///< Size of Graphics Data (byte unit)
150
uByte* buf; ///< Ture Header buffer
151
uByte* grptr; ///< Pointer to Data
152
} CmnHead;
153
*/
154
155
157
//
158
typedef
struct
_RGB24Data
159
{
160
uByte
R
;
161
uByte
G
;
162
uByte
B
;
163
}
RGB24Data
;
164
165
167
// ヘッダ型
168
// 0x0000 - 0x0080
169
#define UN_KNOWN_DATA 0
170
#define PROC_DATA 1
171
#define CREATE_DATA 2
172
#define MOON_DATA 3
173
#define DICOM_DATA 4
174
#define USERSET_DATA 5
175
176
// for CT Data
177
#define CT_DATA 16
178
#define CT_3DM 18
179
#define CT_3D_VOL 19
180
#define CT_RGN_SL 20
181
182
// for Well Known Graphic Data
183
#define JPEG_DATA 32
184
#define JPEG_RGB_DATA 32
185
#define JPEG_MONO_DATA 33
186
#define JPEG16_RGB_DATA 34
187
#define JPEG16_ARGB_DATA 35
188
#define JPEG16_RGBA_DATA 36
189
#define JPEG_ARGB_DATA 37
190
#define JPEG_RGBA_DATA 38
191
192
#define TIFF_DATA 48
193
#define PNG_DATA 64
194
#define TGA_DATA 80
195
#define JP2K_DATA 96
196
197
// Sun Raster
198
#define RAS_DATA 112
199
#define RAS8_DATA 113
200
#define RAS16_DATA 114
201
#define RAS24_DATA 115
202
203
// 0x0100 - 0x4000 パラメータ
204
#define HAS_DUMMY1 256
205
#define HAS_DUMMY2 512
206
#define HAS_BASE 1024
207
#define HAS_ZSPACE 2048
208
#define HAS_RZXY 4096
209
#define HAS_RBOUND 8192
210
#define HAS_LENDIAN 16384
211
212
#define HEADER_NONE 32768
213
#define NUM_KDATA 32767
214
215
#define RZXY_RATE 10000
216
#define ZEROCT_BASE 4096
217
218
// Data Name
219
#define UN_KNOWN_DATA_STR "UNKNOWN DATA"
220
#define PROC_DATA_STR "PROC DATA"
221
#define CREATE_DATA_STR "CREATE DATA"
222
#define USERSET_DATA_STR "USERSET DATA"
223
#define DICOM_DATA_STR "DICOM"
224
#define RAS_DATA_STR "SUN RASTER"
225
#define CT_DATA_STR "Common Header"
226
#define CT_3DM_STR "Common 3D"
227
#define MOON_DATA_STR "CT (Moon)"
228
#define JPEG_RGB_DATA_STR "JPEG RGB"
229
#define JPEG_MONO_DATA_STR "JPEG MONO"
230
#define PNG_DATA_STR "PNG"
231
#define TIFF_DATA_STR "TIFF"
232
#define CT_3D_VOL_STR "3D VOL"
233
234
#define STATE_GRAPH_NOERR 0
235
236
242
#define GRAPH_COLOR_MONO 0
243
#define GRAPH_COLOR_MONO8 0
244
#define GRAPH_COLOR_GRAY 0
245
#define GRAPH_COLOR_GRAY8 0
246
247
#define GRAPH_COLOR_MONO16 16
248
#define GRAPH_COLOR_GRAY16 16
249
250
#define GRAPH_COLOR_R5G6B5 17
251
#define GRAPH_COLOR_RGB16 17
252
253
#define GRAPH_COLOR_R4G4B4A4 18
254
#define GRAPH_COLOR_RGBA16 18
255
256
#define GRAPH_COLOR_A4R4G4B4 19
257
#define GRAPH_COLOR_ARGB16 19
258
259
// 2 PLANE or 16bit Pixcel
260
#define GRAPH_COLOR_MA 20
261
#define GRAPH_COLOR_M8A8 20
262
#define GRAPH_COLOR_MA16 20
263
#define GRAPH_COLOR_GA 20
264
#define GRAPH_COLOR_G8A8 20
265
#define GRAPH_COLOR_GA16 20
266
267
// 3 PLNAE or 24bit Pixcel
268
#define GRAPH_COLOR_R8G8B8 32
269
#define GRAPH_COLOR_RGB24 32
270
#define GRAPH_COLOR_RGB 32
271
272
#define GRAPH_COLOR_B8G8R8 48
273
#define GRAPH_COLOR_BGR24 48
274
#define GRAPH_COLOR_BGR 48
275
276
// 4 Plane or 32bit Pixcel
277
#define GRAPH_COLOR_A8R8G8B8 64
278
#define GRAPH_COLOR_ARGB32 64
279
#define GRAPH_COLOR_ARGB 64
280
281
#define GRAPH_COLOR_R8G8B8A8 65
282
#define GRAPH_COLOR_RGBA32 65
283
#define GRAPH_COLOR_RGBA 65
284
285
#define GRAPH_COLOR_X8R8G8B8 66
286
#define GRAPH_COLOR_XRGB32 66
287
#define GRAPH_COLOR_XRGB 66
288
289
#define GRAPH_COLOR_A8B8G8R8 80
290
#define GRAPH_COLOR_ABGR32 80
291
#define GRAPH_COLOR_ABGR 80
292
293
#define GRAPH_COLOR_B8G8R8A8 81
294
#define GRAPH_COLOR_BGRA32 81
295
#define GRAPH_COLOR_BGRA 81
296
297
#define GRAPH_COLOR_X8B8G8R8 82
298
#define GRAPH_COLOR_XBGR32 82
299
#define GRAPH_COLOR_XBGR 82
300
301
302
#define GRAPH_COLOR_UNKNOWN 112
303
304
306
// DICOM
307
#define DICOM_STUDY_GROUP 0x0020
308
#define DICOM_IMAGE_GROUP 0x0028
309
#define DICOM_PIXEL_GROUP 0x7fe0
310
311
#define DICOM_PIXEL_ELEMENT 0x0010
312
#define DICOM_XSIZE_ELEMENT 0x0011
313
#define DICOM_YSIZE_ELEMENT 0x0010
314
#define DICOM_PXLSPC_ELEMENT 0x0030
315
#define DICOM_DEPTH_ELEMENT 0x0100
316
#define DICOM_GRYLV_ELEMENT 0x0101
317
318
#define DICOM_PIXCEL_VR 0x574f
319
#define DICOM_STR_VR 0x5344
320
#define DICOM_INT_VR 0x5355
321
322
323
#endif
// __JBXL_GRAPHIC_HEADER_H_
324
sWord
short sWord
2Byte
Definition
common.h:335
uByte
unsigned char uByte
1Byte
Definition
common.h:332
CTHead
Definition
gheader.h:64
CTHead::xsize
sWord xsize
Definition
gheader.h:65
CTHead::cutdown
sWord cutdown
Definition
gheader.h:70
CTHead::ctmax
sWord ctmax
Definition
gheader.h:68
CTHead::ysize
sWord ysize
Definition
gheader.h:66
CTHead::img_flag
sWord img_flag
Definition
gheader.h:74
CTHead::cutright
sWord cutright
Definition
gheader.h:72
CTHead::cutup
sWord cutup
Definition
gheader.h:69
CTHead::ctmin
sWord ctmin
Definition
gheader.h:67
CTHead::cutleft
sWord cutleft
Definition
gheader.h:71
CmnHead_Entry
Definition
gheader.h:110
CmnHead_Entry::lsize
unsigned int lsize
Size of Graphics Data (byte unit)
Definition
gheader.h:117
CmnHead_Entry::option
int option
General purpose (pating)
Definition
gheader.h:118
CmnHead_Entry::zsize
int zsize
For 3D Data (or Color)
Definition
gheader.h:114
CmnHead_Entry::kind
int kind
Kind of Graphics Format.
Definition
gheader.h:111
CmnHead_Entry::bsize
unsigned int bsize
Fllowing buf size or Any Data (byte unit)
Definition
gheader.h:116
CmnHead_Entry::ysize
int ysize
Height of Graphics.
Definition
gheader.h:113
CmnHead_Entry::depth
int depth
Color Depth of Graphics (bit unit)
Definition
gheader.h:115
CmnHead_Entry::xsize
int xsize
Width of Graphics.
Definition
gheader.h:112
CmnHead
Definition
gheader.h:123
CmnHead::entry
CmnHead_Entry entry
Definition
gheader.h:125
CmnHead::lsize
unsigned int lsize
Size of Graphics Data (byte unit)
Definition
gheader.h:133
CmnHead::option
int option
General purpose (pating)
Definition
gheader.h:134
CmnHead::buf
uByte * buf
Ture Header buffer
Definition
gheader.h:137
CmnHead::zsize
int zsize
For 3D Data (or Color)
Definition
gheader.h:130
CmnHead::kind
int kind
Kind of Graphics Format.
Definition
gheader.h:127
CmnHead::bsize
unsigned int bsize
Fllowing buf size or Any Data (byte unit)
Definition
gheader.h:132
CmnHead::grptr
uByte * grptr
Pointer to Data.
Definition
gheader.h:138
CmnHead::ysize
int ysize
Height of Graphics.
Definition
gheader.h:129
CmnHead::depth
int depth
Color Depth of Graphics (bit unit)
Definition
gheader.h:131
CmnHead::xsize
int xsize
Width of Graphics.
Definition
gheader.h:128
RGB24Data
Definition
gheader.h:159
RGB24Data::G
uByte G
Definition
gheader.h:161
RGB24Data::R
uByte R
Definition
gheader.h:160
RGB24Data::B
uByte B
Definition
gheader.h:162
RasHead
Definition
gheader.h:82
RasHead::ras_length
int ras_length
Definition
gheader.h:87
RasHead::ras_maptype
int ras_maptype
Definition
gheader.h:89
RasHead::ras_magic
int ras_magic
Definition
gheader.h:83
RasHead::ras_height
int ras_height
Definition
gheader.h:85
RasHead::ras_depth
int ras_depth
Definition
gheader.h:86
RasHead::ras_type
int ras_type
Definition
gheader.h:88
RasHead::ras_maplength
int ras_maplength
Definition
gheader.h:90
RasHead::ras_width
int ras_width
Definition
gheader.h:84
tools.h
汎用ツールヘッダ
GraphLib
gheader.h
Generated on Sat Oct 12 2024 19:42:08 for JunkBox_Lib++ (for Windows) by
1.11.0