00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00031
#ifndef __itkSiemensVisionImageIO_h
00032
#define __itkSiemensVisionImageIO_h
00033
00034
#ifdef _MSC_VER
00035
#pragma warning ( disable : 4786 )
00036
#endif
00037
00038
#include <fstream>
00039
#include "itkImageIOBase.h"
00040
#include "itkIPLCommonImageIO.h"
00041
#include "itkGEImageHeader.h"
00042
00043
namespace itk
00044 {
00049 class ITK_EXPORT SiemensVisionImageIO :
public IPLCommonImageIO
00050 {
00051
public:
00053
typedef SiemensVisionImageIO
Self;
00054 typedef IPLCommonImageIO Superclass;
00055 typedef SmartPointer<Self> Pointer;
00056
00058
itkNewMacro(
Self);
00059
00061
itkTypeMacro(SiemensVisionImageIO,
Superclass);
00062
00063
00064
00071
virtual bool CanReadFile(
const char* FileNameToRead) ;
00072
00074
00075
00076
00078
00079
00080
00082
00083
00084
00088
00089
00090
00091
00092
00099
00100
00101
00103
00104
00105
00108
00109
00110
protected:
00111 SiemensVisionImageIO();
00112 ~SiemensVisionImageIO();
00113
00114
00115
virtual struct GEImageHeader *ReadHeader(
const char *FileNameToRead);
00116
private:
00117
typedef enum {
00118 HDR_STUDY_YEAR= 0,
00119 HDR_STUDY_YEAR_LEN= 4,
00120 HDR_STUDY_MONTH= 4,
00121 HDR_STUDY_MONTH_LEN= 4,
00122 HDR_STUDY_DAY= 8,
00123 HDR_STUDY_DAY_LEN= 4,
00124 HDR_ACQ_YEAR= 12,
00125 HDR_ACQ_YEAR_LEN= 4,
00126 HDR_ACQ_MONTH= 16,
00127 HDR_ACQ_MONTH_LEN= 4,
00128 HDR_ACQ_DAY= 20,
00129 HDR_ACQ_DAY_LEN= 4,
00130 HDR_IMAGE_YEAR= 24,
00131 HDR_IMAGE_YEAR_LEN= 4,
00132 HDR_IMAGE_MONTH= 28,
00133 HDR_IMAGE_MONTH_LEN= 4,
00134 HDR_IMAGE_DAY= 32,
00135 HDR_IMAGE_DAY_LEN= 4,
00136 HDR_STUDY_HOUR= 36,
00137 HDR_STUDY_HOUR_LEN= 4,
00138 HDR_STUDY_MIN= 40,
00139 HDR_STUDY_MIN_LEN= 4,
00140 HDR_STUDY_SEC= 44,
00141 HDR_STUDY_SEC_LEN= 4,
00142 HDR_ACQ_HOUR= 52,
00143 HDR_ACQ_HOUR_LEN= 4,
00144 HDR_ACQ_MIN= 56,
00145 HDR_ACQ_MIN_LEN= 4,
00146 HDR_ACQ_SEC= 60,
00147 HDR_ACQ_SEC_LEN= 4,
00148 HDR_IMAGE_HOUR= 68,
00149 HDR_IMAGE_HOUR_LEN= 4,
00150 HDR_IMAGE_MIN= 72,
00151 HDR_IMAGE_MIN_LEN= 4,
00152 HDR_IMAGE_SEC= 76,
00153 HDR_IMAGE_SEC_LEN= 4,
00154 HDR_MANUFAC= 96,
00155 HDR_MANUFAC_LEN= 7,
00156 HDR_INSTUTE_NAME= 105,
00157 HDR_INSTUTE_NAME_LEN= 25,
00158 HDR_ANNOTATION= 186,
00159 HDR_ANNOTATION_LEN= 32,
00160 HDR_MODEL_NAME= 281,
00161 HDR_MODEL_NAME_LEN= 12,
00162 HDR_LMOVE_YEAR= 412,
00163 HDR_LMOVE_YEAR_LEN= 4,
00164 HDR_LMOVE_MONTH= 416,
00165 HDR_LMOVE_MONTH_LEN= 4,
00166 HDR_LMOVE_DAY= 420,
00167 HDR_LMOVE_DAY_LEN= 4,
00168 HDR_LMOVE_HOUR= 424,
00169 HDR_LMOVE_HOUR_LEN= 4,
00170 HDR_LMOVE_MIN= 428,
00171 HDR_LMOVE_MIN_LEN= 4,
00172 HDR_LMOVE_SEC= 432,
00173 HDR_LMOVE_SEC_LEN= 4,
00174 HDR_PAT_NAME= 768,
00175 HDR_PAT_NAME_LEN= 25,
00176 HDR_PAT_ID= 795,
00177 HDR_PAT_ID_LEN= 12,
00178 HDR_DOB_YEAR= 808,
00179 HDR_DOB_YEAR_LEN= 4,
00180 HDR_DOB_MONTH= 812,
00181 HDR_DOB_MONTH_LEN= 4,
00182 HDR_DOB_DAY= 816,
00183 HDR_DOB_DAY_LEN= 4,
00184 HDR_PAT_AGE= 851,
00185 HDR_PAT_AGE_LEN= 3,
00186 HDR_AGE_UNIT= 854,
00187 HDR_AGE_UNIT_LEN= 1,
00188 HDR_REG_YEAR= 1052,
00189 HDR_REG_YEAR_LEN= 4,
00190 HDR_REG_MONTH= 1056,
00191 HDR_REG_MONTH_LEN= 4,
00192 HDR_REG_DAY= 1060,
00193 HDR_REG_DAY_LEN= 4,
00194 HDR_REG_HOUR= 1064,
00195 HDR_REG_HOUR_LEN= 4,
00196 HDR_REG_MIN= 1068,
00197 HDR_REG_MIN_LEN= 4,
00198 HDR_REG_SEC= 1072,
00199 HDR_REG_SEC_LEN= 4,
00200 HDR_SLICE_THCK= 1544,
00201 HDR_SLICE_THCK_LEN= 8,
00202 HDR_TR= 1560,
00203 HDR_TR_LEN= 8,
00204 HDR_TE= 1568,
00205 HDR_TE_LEN= 8,
00206 HDR_FREQ= 1592,
00207 HDR_FREQ_LEN= 8,
00208 HDR_STATION= 1639,
00209 HDR_STATION_LEN= 5,
00210 HDR_CAL_YEAR= 1712,
00211 HDR_CAL_YEAR_LEN= 4,
00212 HDR_CAL_MONTH= 1716,
00213 HDR_CAL_MONTH_LEN= 4,
00214 HDR_CAL_DAY= 1720,
00215 HDR_CAL_DAY_LEN= 4,
00216 HDR_CAL_HOUR= 1724,
00217 HDR_CAL_HOUR_LEN= 4,
00218 HDR_CAL_MIN= 1728,
00219 HDR_CAL_MIN_LEN= 4,
00220 HDR_CAL_SEC= 1732,
00221 HDR_CAL_SEC_LEN= 4,
00222 HDR_COIL= 1767,
00223 HDR_COIL_LEN= 16,
00224 HDR_IMAGE_NUC= 1828,
00225 HDR_IMAGE_NUC_LEN= 4,
00226 HDR_FLIP_ANGLE= 2112,
00227 HDR_FLIP_ANGLE_LEN= 8,
00228 HDR_FIELD= 2560,
00229 HDR_FIELD_LEN= 8,
00230 HDR_DISPLAY_SIZE= 2864,
00231 HDR_DISPLAY_SIZE_LEN= 4,
00232 HDR_SEQPROG_NAME= 2944,
00233 HDR_SEQPROG_NAME_LEN= 65,
00234 HDR_WKC_NAME= 3009,
00235 HDR_WKC_NAME_LEN= 65,
00236 HDR_AUTHOR= 3074,
00237 HDR_AUTHOR_LEN= 9,
00238 HDR_SEQUENCE_TYPE= 3083,
00239 HDR_SEQUENCE_TYPE_LEN= 8,
00240 HDR_FOV_ROW= 3744,
00241 HDR_FOV_ROW_LEN= 8,
00242 HDR_FOV_COLUMN= 3752,
00243 HDR_FOV_COLUMN_LEN= 8,
00244 HDR_CENTER_X= 3768,
00245 HDR_CENTER_X_LEN= 8,
00246 HDR_CENTER_Y= 3776,
00247 HDR_CENTER_Y_LEN= 8,
00248 HDR_CENTER_Z= 3784,
00249 HDR_CENTER_Z_LEN= 8,
00250 HDR_NORMV_X= 3792,
00251 HDR_NORMV_X_LEN= 8,
00252 HDR_NORMV_Y= 3800,
00253 HDR_NORMV_Y_LEN= 8,
00254 HDR_NORMV_Z= 3808,
00255 HDR_NORMV_Z_LEN= 8,
00256 HDR_DIST_ISO= 3816,
00257 HDR_DIST_ISO_LEN= 8,
00258 HDR_ROWV_X= 3832,
00259 HDR_ROWV_X_LEN= 8,
00260 HDR_ROWV_Y= 3840,
00261 HDR_ROWV_Y_LEN= 8,
00262 HDR_ROWV_Z= 3848,
00263 HDR_ROWV_Z_LEN= 8,
00264 HDR_COLMNV_X= 3856,
00265 HDR_COLMNV_X_LEN= 8,
00266 HDR_COLMNV_Y= 3864,
00267 HDR_COLMNV_Y_LEN= 8,
00268 HDR_COLMNV_Z= 3872,
00269 HDR_COLMNV_Z_LEN= 8,
00270 HDR_ORNT_SET1X= 3880,
00271 HDR_ORNT_SET1X_LEN= 3,
00272 HDR_ORNT_SET1Y= 3884,
00273 HDR_ORNT_SET1Y_LEN= 3,
00274 HDR_ORNT_SET1Z= 3888,
00275 HDR_ORNT_SET1Z_LEN= 3,
00276 HDR_ORNT_SET2X= 3892,
00277 HDR_ORNT_SET2X_LEN= 3,
00278 HDR_ORNT_SET2Y= 3896,
00279 HDR_ORNT_SET2Y_LEN= 3,
00280 HDR_ORNT_SET2Z= 3900,
00281 HDR_ORNT_SET2Z_LEN= 3,
00282 HDR_PROTOCOL_NAME= 2944,
00283 HDR_PROTOCOL_NAME_LEN= 64,
00284 HDR_PIXELSIZE_ROW= 5000,
00285 HDR_PIXELSIZE_ROW_LEN= 8,
00286 HDR_PIXELSIZE_CLMN= 5008,
00287 HDR_PIXELSIZE_CLMN_LEN= 8,
00288 TEXT_PAT_ID= 5504,
00289 TEXT_PAT_ID_LEN= 12,
00290 TEXT_PAT_SEX= 5517,
00291 TEXT_PAT_SEX_LEN= 1,
00292 TEXT_PAT_AGE= 5518,
00293 TEXT_PAT_AGE_LEN= 3,
00294 TEXT_AGE_UNIT= 5521,
00295 TEXT_AGE_UNIT_LEN= 1,
00296 TEXT_PAT_POS= 5529,
00297 TEXT_PAT_POS_LEN= 7,
00298 TEXT_IMG_FLAG= 5541,
00299 TEXT_IMG_FLAG_LEN= 5,
00300 TEXT_IMG_NUMBER= 5546,
00301 TEXT_IMG_NUMBER_LEN= 4,
00302 TEXT_IMG_DAY= 5559,
00303 TEXT_IMG_DAY_LEN= 2,
00304 TEXT_IMG_MONTH= 5562,
00305 TEXT_IMG_MONTH_LEN= 3,
00306 TEXT_IMG_YEAR= 5566,
00307 TEXT_IMG_YEAR_LEN= 4,
00308 TEXT_IMG_HOUR= 5571,
00309 TEXT_IMG_HOUR_LEN= 2,
00310 TEXT_IMG_MIN= 5574,
00311 TEXT_IMG_MIN_LEN= 2,
00312 TEXT_ACQ_FLAG= 5577,
00313 TEXT_ACQ_FLAG_LEN= 2,
00314 TEXT_ACQ_MIN= 5583,
00315 TEXT_ACQ_MIN_LEN= 2,
00316 TEXT_ACQ_SEC= 5586,
00317 TEXT_ACQ_SEC_LEN= 2,
00318 TEXT_ANNOTATION= 5601,
00319 TEXT_ANNOTATION_LEN= 32,
00320 TEXT_ORGANIZATION= 5655,
00321 TEXT_ORGANIZATION_LEN= 25,
00322 TEXT_STATION= 5682,
00323 TEXT_STATION_LEN= 5,
00324 TEXT_ACQ_MTRX_PHASE= 5695,
00325 TEXT_ACQ_MTRX_PHASE_LEN= 3,
00326 TEXT_ACQ_PHASE_DIR= 5698,
00327 TEXT_ACQ_PHASE_DIR_LEN= 1,
00328 TEXT_ACQ_MTRX_FREQ= 5700,
00329 TEXT_ACQ_MTRX_FREQ_LEN= 3,
00330 TEXT_ACQ_MTRX_FREQO= 5703,
00331 TEXT_ACQ_MTRX_FREQO_LEN= 1,
00332 TEXT_ACQ_MTRX_FREQS= 5704,
00333 TEXT_ACQ_MTRX_FREQS_LEN= 1,
00334 TEXT_SEQUENCE= 5706,
00335 TEXT_SEQUENCE_LEN= 8,
00336 TEXT_FLIP_ANGLE= 5714,
00337 TEXT_FLIP_ANGLE_LEN= 3,
00338 TEXT_SCAN_FLAG= 5718,
00339 TEXT_SCAN_FLAG_LEN= 4,
00340 TEXT_SCANA_NUM= 5723,
00341 TEXT_SCANA_NUM_LEN= 3,
00342 TEXT_SCANB_NUM= 5726,
00343 TEXT_SCANB_NUM_LEN= 3,
00344 TEXT_TR_FLAG= 5730,
00345 TEXT_TR_FLAG_LEN= 2,
00346 TEXT_TR= 5734,
00347 TEXT_TR_LEN= 7,
00348 TEXT_TE_FLAG= 5742,
00349 TEXT_TE_FLAG_LEN= 2,
00350 TEXT_TE= 5746,
00351 TEXT_TE_LEN= 5,
00352 TEXT_ECHO_NUM= 5752,
00353 TEXT_ECHO_NUM_LEN= 1,
00354 TEXT_THCK_FLAG= 5790,
00355 TEXT_THCK_FLAG_LEN= 2,
00356 TEXT_SLICE_THCK= 5794,
00357 TEXT_SLICE_THCK_LEN= 7,
00358 TEXT_POS_FLAG= 5802,
00359 TEXT_POS_FLAG_LEN= 2,
00360 TEXT_SLICE_POS= 5806,
00361 TEXT_SLICE_POS_LEN= 7,
00362 TEXT_ANGLE_FLAG1= 5814,
00363 TEXT_ANGLE_FLAG1_LEN= 3,
00364 TEXT_ANGLE_FLAG2= 5817,
00365 TEXT_ANGLE_FLAG2_LEN= 1,
00366 TEXT_ANGLE_FLAG3= 5818,
00367 TEXT_ANGLE_FLAG3_LEN= 3,
00368 TEXT_ANGLE= 5821,
00369 TEXT_ANGLE_LEN= 4,
00370 TEXT_FOV_FLAG= 5838,
00371 TEXT_FOV_FLAG_LEN= 3,
00372 TEXT_FOVH= 5842,
00373 TEXT_FOVH_LEN= 3,
00374 TEXT_FOVV= 5846,
00375 TEXT_FOVV_LEN= 3,
00376 TEXT_TABLEPOS_FLAG= 5874,
00377 TEXT_TABLEPOS_FLAG_LEN= 2,
00378 TEXT_TABLE_POS= 5878,
00379 TEXT_TABLE_POS_LEN= 7,
00380 TEXT_STUDY_FLAG= 5938,
00381 TEXT_STUDY_FLAG_LEN= 5,
00382 TEXT_STUDY_NUM= 5943,
00383 TEXT_STUDY_NUM_LEN= 2,
00384 TEXT_DOB_DAY= 5956,
00385 TEXT_DOB_DAY_LEN= 2,
00386 TEXT_DOB_MONTH= 5959,
00387 TEXT_DOB_MONTH_LEN= 3,
00388 TEXT_DOB_YEAR= 5963,
00389 TEXT_DOB_YEAR_LEN= 4,
00390 TEXT_STUDY_FLAG2= 5992,
00391 TEXT_STUDY_FLAG2_LEN= 3,
00392 TEXT_IMAGE_FLAG2= 5996,
00393 TEXT_IMAGE_FLAG2_LEN= 3,
00394 TEXT_STUDY_NUM2= 5999,
00395 TEXT_STUDY_NUM2_LEN= 2,
00396 TEXT_IMAGE_NUM2= 6002,
00397 TEXT_IMAGE_NUM2_LEN= 2,
00398 TEXT_IMAGE_NUM3= 6013,
00399 TEXT_IMAGE_NUM3_LEN= 5,
00400 TEXT_MODEL_NAME= 6031,
00401 TEXT_MODEL_NAME_LEN= 15,
00402 TEXT_PAT_NAME= 6058,
00403 TEXT_PAT_NAME_LEN= 25,
00404 TEXT_START_HOUR= 6085,
00405 TEXT_START_HOUR_LEN= 2,
00406 TEXT_START_MIN= 6088,
00407 TEXT_START_MIN_LEN= 2,
00408 TEXT_START_SEC= 6091,
00409 TEXT_START_SEC_LEN= 2,
00410 HDR_TOTAL_LENGTH= 6144,
00411 } SiemensVisionHeaderInfo ;
00412 SiemensVisionImageIO(
const Self&);
00413
void operator=(
const Self&);
00414 };
00415
00416 }
00417
00418
#endif // __itkSiemensVisionImageIO_h