00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00031
#ifndef __itkGE5ImageIO_h
00032
#define __itkGE5ImageIO_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
00044
namespace itk
00045 {
00050 class ITK_EXPORT GE5ImageIO :
public IPLCommonImageIO
00051 {
00052
public:
00054
typedef GE5ImageIO
Self;
00055 typedef IPLCommonImageIO Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057
00059
itkNewMacro(
Self);
00060
00062
itkTypeMacro(GE5ImageIO,
Superclass);
00063
00064
00065
00072
virtual bool CanReadFile(
const char* FileNameToRead) ;
00073
00075
00076
00077
00079
00080
00081
00083
00084
00085
00089
00090
00091
00092
00093
00100
00101
00102
00104
00105
00106
00109
00110
00111
protected:
00112 GE5ImageIO();
00113 ~GE5ImageIO();
00114
00115
00116
virtual struct GEImageHeader *ReadHeader(
const char *FileNameToRead);
00117
private:
00118
00119
00120
00121
enum GE_SU_ENUM {
00122 SU_ID=0,
00123 SU_UNIQ=4,
00124 SU_DISKID=6,
00125 SU_PRODID=7,
00126 SU_VERSCRE=20,
00127 SU_VERSCUR=22,
00128 SU_CHECKSUM=24,
00129 SU_HDR_LEN=114
00130 };
00131
00132
00133
00134
enum GE_EX_ENUM {
00135 EX_SUID=0,
00136 EX_UNIQ=4,
00137 EX_DISKID=6,
00138 EX_NO=8,
00139 EX_HOSPNAME=10,
00140 EX_DETECT=44,
00141 EX_NUMCELLS=46,
00142 EX_ZEROCELL=50,
00143 EX_CELLSPACE=54,
00144 EX_SRCTODET=58,
00145 EX_SRCTOISO=62,
00146 EX_TUBETYP=66,
00147 EX_DASTYP=68,
00148 EX_NUM_DCNK=70,
00149 EX_DCN_LEN=72,
00150 EX_DCN_DENSITY=74,
00151 EX_DCN_STEPSIZE=76,
00152 EX_DCN_SHIFTCNT=78,
00153 EX_MAGSTRENGTH=80,
00154 EX_PATID=84,
00155 EX_PATNAME=97,
00156 EX_PATAGE=122,
00157 EX_PATIAN=124,
00158 EX_PATSEX=126,
00159 EX_PATWEIGHT=128,
00160 EX_TRAUMA=132,
00161 EX_HIST=134,
00162 EX_REQNUM=195,
00163 EX_DATETIME=208,
00164 EX_REFPHY=212,
00165 EX_DIAGRAD=245,
00166 EX_OP=278,
00167 EX_DESC=282,
00168 EX_TYP=305,
00169 EX_FORMAT=308,
00170 EX_FIRSTAXTIME=310,
00171 EX_SYSID=318,
00172 EX_LASTMOD=328,
00173 EX_PROTOCOLFLAG=332,
00174 EX_ALLOC_KEY=334,
00175 EX_DELTA_CNT=348,
00176 EX_VERSCRE=352,
00177 EX_VERSCUR=354,
00178 EX_CHECKSUM=356,
00179 EX_COMPLETE=360,
00180 EX_SERIESCT=364,
00181 EX_NUMARCH=368,
00182 EX_NUMSERIES=372,
00183 EX_SERIES=376,
00184 EX_NUMUNSER=384,
00185 EX_UNSERIES=388,
00186 EX_TOARCHCNT=396,
00187 EX_TOARCHIVE=400,
00188 EX_PROSPCNT=408,
00189 EX_PROSP=421,
00190 EX_MODELNUM=420,
00191 EX_MODELCNT=424,
00192 EX_MODELS=428,
00193 EX_STAT=436,
00194 EX_UNIQUE_SYS_ID=438,
00195 EX_SERVICE_ID=454,
00196 EX_MOBILE_LOC=470,
00197 EX_HDR_LEN=1024
00198 };
00199
00200
enum GE_SE_ENUM {
00201 SE_SUID=0,
00202 SE_UNIQ=4,
00203 SE_DISKID=6,
00204 SE_EXNO=8,
00205 SE_NO=10,
00206 SE_DATETIME=12,
00207 SE_ACTUAL_DT=16,
00208 SE_DESC=20,
00209 SE_PR_SYSID=50,
00210 SE_PANSYSID=59,
00211 SE_TYP=68,
00212 SE_SOURCE=70,
00213 SE_PLANE=72,
00214 SE_SCAN_TYPE=74,
00215 SE_POSITION=76,
00216 SE_ENTRY=80,
00217 SE_ANREF=84,
00218 SE_LMHOR=88,
00219 SE_PRTCL=92,
00220 SE_CONTRAST=118,
00221 SE_START_RAS=120,
00222 SE_START_LOC=122,
00223 SE_END_RAS=126,
00224 SE_END_LOC=128,
00225 SE_PSEQ=132,
00226 SE_SORTORDER=134,
00227 SE_LNDMRKCNT=136,
00228 SE_NACQ=140,
00229 SE_XBASEST=142,
00230 SE_XBASEEND=144,
00231 SE_XENHST=146,
00232 SE_XENHEND=148,
00233 SE_LASTMOD=150,
00234 SE_ALLOC_KEY=154,
00235 SE_DELTA_CNT=168,
00236 SE_VERSCRE=172,
00237 SE_VERSCUR=174,
00238 SE_PDS_A=176,
00239 SE_PDS_C=180,
00240 SE_PDS_U=184,
00241 SE_CHECKSUM=188,
00242 SE_COMPLETE=192,
00243 SE_NUMARCH=196,
00244 SE_IMAGECT=200,
00245 SE_NUMIMAGES=204,
00246 SE_IMAGES=208,
00247 SE_NUMUNIMG=216,
00248 SE_UNIMAGES=220,
00249 SE_TOARCHCNT=228,
00250 SE_TOARCHIVE=232,
00251 SE_ECHO1_ALPHA=240,
00252 SE_ECHO1_BETA=244,
00253 SE_ECHO1_WINDOW=248,
00254 SE_ECHO1_LEVEL=250,
00255 SE_ECHO2_ALPHA=252,
00256 SE_ECHO2_BETA=256,
00257 SE_ECHO2_WINDOW=260,
00258 SE_ECHO2_LEVEL=262,
00259 SE_ECHO3_ALPHA=264,
00260 SE_ECHO3_BETA=268,
00261 SE_ECHO3_WINDOW=272,
00262 SE_ECHO3_LEVEL=274,
00263 SE_ECHO4_ALPHA=276,
00264 SE_ECHO4_BETA=280,
00265 SE_ECHO4_WINDOW=284,
00266 SE_ECHO4_LEVEL=286,
00267 SE_ECHO5_ALPHA=288,
00268 SE_ECHO5_BETA=292,
00269 SE_ECHO5_WINDOW=296,
00270 SE_ECHO5_LEVEL=298,
00271 SE_ECHO6_ALPHA=300,
00272 SE_ECHO6_BETA=304,
00273 SE_ECHO6_WINDOW=308,
00274 SE_ECHO6_LEVEL=310,
00275 SE_ECHO7_ALPHA=312,
00276 ECHO7_BETA=316,
00277 ECHO7_WINDOW=320,
00278 ECHO7_LEVEL=322,
00279 ECHO8_ALPHA=324,
00280 ECHO8_BETA=328,
00281 ECHO8_WINDOW=332,
00282 ECHO8_LEVEL=334,
00283 SE_HDR_LEN=1020
00284 };
00285
00286
00287
00288
enum GE_IMAGE_HEADER_ENUM {
00289 IM_SUID=0,
00290 IM_UNIQ=4,
00291 IM_DISKID=6,
00292 IM_EXNO=8,
00293 IM_SENO=10,
00294 IM_NO=12,
00295 IM_DATETIME=14,
00296 IM_ACTUAL_DT=18,
00297 IM_SCTIME=22,
00298 IM_SLTHICK=26,
00299 IM_IMATRIX_X=30,
00300 IM_IMATRIX_Y=32,
00301 IM_DFOV=34,
00302 IM_DFOV_RECT=38,
00303 IM_DIM_X=42,
00304 IM_DIM_Y=46,
00305 IM_PIXSIZE_X=50,
00306 IM_PIXSIZE_Y=54,
00307 IM_PDID=58,
00308 IM_CONTRASTIV=72,
00309 IM_CONTRASTORAL=79,
00310 IM_CONTMODE=106,
00311 IM_SERRX=108,
00312 IM_IMGRX=110,
00313 IM_SCREENFORMAT=112,
00314 IM_PLANE=114,
00315 IM_SCANSPACING=116,
00316 IM_COMPRESS=120,
00317 IM_SCOUTTYPE=122,
00318 IM_LOC_RAS=124,
00319 IM_LOC=126,
00320 IM_CTR_R=130,
00321 IM_CTR_A=134,
00322 IM_CTR_S=138,
00323 IM_NORM_R=142,
00324 IM_NORM_A=146,
00325 IM_NORM_S=150,
00326 IM_TLHC_R=154,
00327 IM_TLHC_A=158,
00328 IM_TLHC_S=162,
00329 IM_TRHC_R=166,
00330 IM_TRHC_A=170,
00331 IM_TRHC_S=174,
00332 IM_BRHC_R=178,
00333 IM_BRHC_A=182,
00334 IM_BRHC_S=186,
00335 IM_FORIMGREV=190,
00336 IM_TR=194,
00337 IM_TI=198,
00338 IM_TE=202,
00339 IM_TE2=206,
00340 IM_NUMECHO=210,
00341 IM_ECHONUM=212,
00342 IM_TBLDLTA=214,
00343 IM_NEX=218,
00344 IM_CONTIG=222,
00345 IM_HRTRATE=224,
00346 IM_TDEL=226,
00347 IM_SARAVG=230,
00348 IM_SARPEAK=234,
00349 IM_MONSAR=238,
00350 IM_TRGWINDOW=240,
00351 IM_REPTIME=242,
00352 IM_IMGPCYC=246,
00353 IM_XMTGAIN=248,
00354 IM_RCVGAIN1=250,
00355 IM_RCVGAIN2=252,
00356 IM_MR_FLIP=254,
00357 IM_MINDAT=256,
00358 IM_CPHASE=260,
00359 IM_SWAPPF=262,
00360 IM_PAUSEINT=264,
00361 IM_PAUSETIME=266,
00362 IM_OBPLANE=270,
00363 IM_SLOCFOV=274,
00364 IM_XMTFREQ=278,
00365 IM_AUTOXMTFREQ=282,
00366 IM_AUTOXMTGAIN=286,
00367 IM_PRESCAN_R1=288,
00368 IM_PRESCAN_R2=290,
00369 IM_USER_BITMAP=292,
00370 IM_CENFREQ=296,
00371 IM_IMODE=298,
00372 IM_IOPT=300,
00373 IM_PSEQ=304,
00374 IM_PSEQMODE=306,
00375 IM_PSDNAME=308,
00376 IM_PSD_DATETIME=342,
00377 IM_PSD_INAME=346,
00378 IM_CTYP=360,
00379 IM_CNAME=362,
00380 IM_SURFCTYP=380,
00381 IM_SURFCEXT=382,
00382 IM_RAWRUNNUM=384,
00383 IM_CAL_FLDSTR=388,
00384 IM_SUPP_TECH=392,
00385 IM_VBW=394,
00386 IM_SLQUANT=398,
00387 IM_GPRE=400,
00388 IM_INTR_DEL=402,
00389 IM_USER0=406,
00390 IM_USER1=410,
00391 IM_USER2=414,
00392 IM_USER3=418,
00393 IM_USER4=422,
00394 IM_USER5=426,
00395 IM_USER6=430,
00396 IM_USER7=434,
00397 IM_USER8=438,
00398 IM_USER9=442,
00399 IM_USER10=446,
00400 IM_USER11=450,
00401 IM_USER12=454,
00402 IM_USER13=458,
00403 IM_USER14=462,
00404 IM_USER15=466,
00405 IM_USER16=470,
00406 IM_USER17=474,
00407 IM_USER18=478,
00408 IM_USER19=482,
00409 IM_USER20=486,
00410 IM_USER21=490,
00411 IM_USER22=494,
00412 IM_USER23=498,
00413 IM_USER24=502,
00414 IM_ALLOC_KEY=506,
00415 IM_LASTMOD=520,
00416 IM_VERSCRE=524,
00417 IM_VERSCUR=526,
00418 IM_PDS_A=528,
00419 IM_PDS_C=532,
00420 IM_PDS_U=536,
00421 IM_CHECKSUM=540,
00422 IM_ARCHIVED=544,
00423 IM_COMPLETE=548,
00424 IM_SATBITS=552,
00425 IM_SCIC=554,
00426 IM_SATXLOC1=556,
00427 IM_SATXLOC2=558,
00428 IM_SATYLOC1=560,
00429 IM_SATYLOC2=562,
00430 IM_SATZLOC1=566,
00431 IM_SATZLOC2=568,
00432 IM_SATXTHICK=570,
00433 IM_SATYTHICK=572,
00434 IM_SATZTHICK=574,
00435 IM_FLAX=576,
00436 IM_VENC=578,
00437 IM_THK_DISCLMR=580,
00438 IM_PS_FLAG=582,
00439 IM_PS_STATUS=584,
00440 IM_IMAGE_TYPE=586,
00441 IM_VAS_COLLAPSE=588,
00442 IM_HDR_LEN=1022
00443 };
00444
00445
00446
00447
00448
00449
enum GE_RELATIVE_STARTS {
00450 SU_HDR_START=0,
00451 EX_HDR_START=SU_HDR_LEN,
00452 SE_HDR_START=EX_HDR_START+EX_HDR_LEN,
00453 IM_HDR_START=SE_HDR_START+SE_HDR_LEN,
00454 IMG_HDR_START=0
00455 };
00456
int checkGe5xImages (
char const *
const imageFileTemplate);
00457 GE5ImageIO(
const Self&);
00458
void operator=(
const Self&);
00459 };
00460
00461 }
00462
00463
#endif // __itkAnalyzeImageIO_h