igtl_image.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __IGTL_IMAGE_H
00018 #define __IGTL_IMAGE_H
00019
00020 #include "igtl_win32header.h"
00021 #include "igtl_util.h"
00022 #include "igtl_types.h"
00023 #include "igtl_win32header.h"
00024
00025 #define IGTL_IMAGE_HEADER_VERSION 1
00026 #define IGTL_IMAGE_HEADER_SIZE 72
00027
00028
00029 #define IGTL_IMAGE_DTYPE_SCALAR 1
00030 #define IGTL_IMAGE_DTYPE_VECTOR 2
00031
00032
00033 #define IGTL_IMAGE_STYPE_TYPE_INT8 2
00034 #define IGTL_IMAGE_STYPE_TYPE_UINT8 3
00035 #define IGTL_IMAGE_STYPE_TYPE_INT16 4
00036 #define IGTL_IMAGE_STYPE_TYPE_UINT16 5
00037 #define IGTL_IMAGE_STYPE_TYPE_INT32 6
00038 #define IGTL_IMAGE_STYPE_TYPE_UINT32 7
00039 #define IGTL_IMAGE_STYPE_TYPE_FLOAT32 10
00040 #define IGTL_IMAGE_STYPE_TYPE_FLOAT64 11
00041
00042
00043 #define IGTL_IMAGE_ENDIAN_BIG 1
00044 #define IGTL_IMAGE_ENDIAN_LITTLE 2
00045
00046
00047 #define IGTL_IMAGE_COORD_RAS 1
00048 #define IGTL_IMAGE_COORD_LPS 2
00049
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053
00054 #pragma pack(1)
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 typedef struct {
00071 igtl_uint16 version;
00072 igtl_uint8 data_type;
00073
00074 igtl_uint8 scalar_type;
00075
00076 igtl_uint8 endian;
00077
00078 igtl_uint8 coord;
00079 igtl_uint16 size[3];
00080 igtl_float32 matrix[12];
00081
00082
00083
00084
00085
00086
00087
00088
00089 igtl_uint16 subvol_offset[3];
00090 igtl_uint16 subvol_size[3];
00091 } igtl_image_header;
00092
00093 #pragma pack()
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 igtl_uint64 igtl_export igtl_image_get_data_size(igtl_image_header * header);
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 void igtl_export igtl_image_set_matrix(float spacing[3], float origin[3],
00114 float norm_i[3], float norm_j[3], float norm_k[3],
00115 igtl_image_header * header);
00116
00117 void igtl_export igtl_image_get_matrix(float spacing[3], float origin[3],
00118 float norm_i[3], float norm_j[3], float norm_k[3],
00119 igtl_image_header * header);
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 void igtl_export igtl_image_convert_byte_order(igtl_image_header * header);
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140 igtl_uint64 igtl_export igtl_image_get_crc(igtl_image_header * header, void* image);
00141
00142 #ifdef __cplusplus
00143 }
00144 #endif
00145
00146 #endif
00147