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 igtl_uint8 scalar_type;
00074 igtl_uint8 endian;
00075 igtl_uint8 coord;
00076 igtl_uint16 size[3];
00077 igtl_float32 matrix[12];
00078
00079
00080
00081
00082
00083
00084
00085
00086 igtl_uint16 subvol_offset[3];
00087 igtl_uint16 subvol_size[3];
00088 } igtl_image_header;
00089
00090 #pragma pack()
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 igtl_uint64 igtl_export igtl_image_get_data_size(igtl_image_header * header);
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110 void igtl_export igtl_image_set_matrix(float spacing[3], float origin[3],
00111 float norm_i[3], float norm_j[3], float norm_k[3],
00112 igtl_image_header * header);
00113
00114 void igtl_export igtl_image_get_matrix(float spacing[3], float origin[3],
00115 float norm_i[3], float norm_j[3], float norm_k[3],
00116 igtl_image_header * header);
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126 void igtl_export igtl_image_convert_byte_order(igtl_image_header * header);
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137 igtl_uint64 igtl_export igtl_image_get_crc(igtl_image_header * header, void* image);
00138
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142
00143 #endif
00144