Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkGE4ImageIO.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkGE4ImageIO.h,v $ 00005 Language: C++ 00006 Date: $Date: 2004/01/08 00:39:04 $ 00007 Version: $Revision: 1.6 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00031 #ifndef __itkGE4ImageIO_h 00032 #define __itkGE4ImageIO_h 00033 00034 #ifdef _MSC_VER 00035 #pragma warning ( disable : 4786 ) 00036 #endif 00037 00038 #include <fstream> 00039 #include "itkIPLCommonImageIO.h" 00040 #include "itkImageIOBase.h" 00041 #include "itkGEImageHeader.h" 00042 00043 namespace itk 00044 { 00049 class ITK_EXPORT GE4ImageIO : public IPLCommonImageIO 00050 { 00051 public: 00053 typedef GE4ImageIO Self; 00054 typedef IPLCommonImageIO Superclass; 00055 typedef SmartPointer<Self> Pointer; 00056 00058 itkNewMacro(Self); 00059 00061 itkTypeMacro(GE4ImageIO, Superclass); 00062 00063 /*-------- This part of the interfaces deals with reading data. ----- */ 00064 00071 virtual bool CanReadFile(const char* FileNameToRead) ; 00072 00074 // Implemented in superclass 00075 // virtual void ReadImageInformation(); 00076 00078 // Implemented in superclass 00079 // virtual const std::type_info& GetPixelType() const; 00080 00082 // Implemented in superclass 00083 // virtual void Read(void* buffer); 00084 00088 // Implemented in superclass 00089 // virtual unsigned int GetComponentSize() const; 00090 00091 /*-------- This part of the interfaces deals with writing data. ----- */ 00092 00099 // Implemented in superclass 00100 // virtual bool CanWriteFile(const char * FileNameToWrite); 00101 00103 // Implemented in superclass 00104 // virtual void WriteImageInformation(); 00105 00108 // Implemented in superclass 00109 // virtual void Write(const void* buffer); 00110 protected: 00111 GE4ImageIO(); 00112 ~GE4ImageIO(); 00113 // Implemented in Superclass 00114 // void PrintSelf(std::ostream& os, Indent indent) const; 00115 virtual struct GEImageHeader *ReadHeader(const char *FileNameToRead); 00116 private: 00117 GE4ImageIO(const Self&); //purposely not implemented 00118 float MvtSunf (int numb); 00119 enum Study_Header_offsets { 00120 STHDR_ID= 0, // Study Header Identifier 00121 STHDR_REV= 7, // Study Header Revision Number 00122 STHDR_BLKS= 11, // Number of Study Header Blocks 00123 STHDR_CRTRP= 12, // Study Header Creator (Process 00124 STHDR_CRTRT= 28, // Study Header Creator (Task 00125 STHDR_RAWNM= 29, // Raw Data Study Number 00126 STHDR_STNUM= 32, // Study Number 00127 STHDR_RAWID= 35, // Raw Data System ID 00128 STHDR_SGENID= 37, // System Generation ID 00129 STHDR_DATE= 39, // Date of Study (ascii 00130 STHDR_IDATE= 44, // Date of Study (integer 00131 STHDR_TIME= 47, // Time of Study (ascii 00132 STHDR_ITIME= 51, // Time of Study (integer 00133 STHDR_PNM= 54, // Patient Name 00134 STHDR_PID= 70, // Patient ID 00135 STHDR_PIDTMP= 76, // Patient ID padding for future exp. 00136 STHDR_AGE= 78, // Age of patient 00137 STHDR_SEX= 80, // Sex of patient 00138 STHDR_WGHT= 81, // Weight of the patient in grams 00139 STHDR_RFR= 83, // Refered by 00140 STHDR_DGN= 99, // Diognostician 00141 STHDR_OP= 115, // Operator 00142 STHDR_DESC= 131, // Description 00143 STHDR_HIST= 161, // History 00144 STHDR_STIME= 221, // Creation time in seconds. 00145 STHDR_HOSP= 223, // Hospital name 00146 STHDR_STAT= 239, // Patient status 00147 STHDR_RSRV1= 240, // GE NMR Reserved Area 00148 STHDR_RSRV2= 256, // GE NMR Reserved Area 00149 STHDR_CHECK= 511, // Study Header Checksum 00150 00151 }; 00152 enum Series_Header_Offsets { 00153 SEHDR_ID= 0, // Series Header Identifier 00154 SEHDR_REV= 7, // Series Header Revision Number 00155 SEHDR_BLKS= 11, // Number of Series Header Blocks 00156 SEHDR_CRTRP= 12, // Series Header Creator (Proc 00157 SEHDR_CRTRT= 28, // Series Header Creator (Task 00158 SEHDR_RAWNM= 29, // Original Series Number 00159 SEHDR_SERNUM= 31, // Series Number 00160 SEHDR_RAWID= 33, // Raw Data System ID 00161 SEHDR_SGENID= 35, // System Generation ID 00162 SEHDR_DATE= 37, // Date of series (ascii 00163 SEHDR_IDATE= 42, // Date of series (integer 00164 SEHDR_TIME= 45, // Time of Series (ascii 00165 SEHDR_ITIME= 49, // Time of Series (integer 00166 SEHDR_DESC= 52, // Series Description 00167 SEHDR_TYPE= 112, // Series Type 00168 SEHDR_CTYPE= 113, // Coil Type 00169 SEHDR_CNAME= 114, // Coil Name 00170 SEHDR_CNTRDESC= 122, // Contrast Description 00171 SEHDR_PTYPE= 138, // Plane Type 00172 SEHDR_PNAME= 139, // Plane Name 00173 SEHDR_IMODE= 147, // Image Mode 00174 SEHDR_FSTREN= 148, // Magnetic Field Strength 00175 SEHDR_PSEQ= 149, // Pulse Sequence 00176 SEHDR_PSSTYPE= 150, // Pulse sequence subtype 00177 SEHDR_FOV= 151, // Field of view 00178 SEHDR_CENTER= 153, // Center 00179 SEHDR_ORIEN= 159, // Orientation 00180 SEHDR_POS= 160, // Position 00181 SEHDR_ANREF= 161, // Longitudinal Anotomical Reference 00182 SEHDR_VANREF= 177, // Vertical Anotomical Reference 00183 SEHDR_VERLAN= 193, // Vertical Landmark 00184 SEHDR_HORLAN= 195, // Horizontal Landmark 00185 SEHDR_TBLLOC= 197, // Physical Table Location 00186 SEHDR_SMATRIX= 199, // Scan Matrix 00187 SEHDR_IMATRIX= 201, // Image Matrix 00188 SEHDR_IALLOC= 202, // No. of Images Allocated 00189 SEHDR_GTYP= 203, // Gating Type 00190 SEHDR_PSMODE= 204, // Pulse sequence mode 00191 SEHDR_DNAME= 205, // PSD name from NAME = aPPL psd name 00192 SEHDR_LNDMRK= 211, // Landmark counter 00193 SEHDR_PROTO= 213, // Protocol name for Scan 00194 SEHDR_SCOIL_TYPE= 223, // Surface coil type 00195 SEHDR_SUPP_TECH= 224, // Suppression technique 00196 SEHDR_RSRV1= 225, // GE NMR Reserved 00197 SEHDR_RSRV2= 256, // GE NMR Reserved 00198 SEHDR_CHECK= 511, // Checksum for Series Header 00199 }; 00200 enum Image_Header_Offsets { 00201 IHDR_ID= 0, // Image Header Identifier 00202 IHDR_REV= 7, // Image Header Revision Number 00203 IHDR_BLKS= 11, // Number of Image Header Blocks 00204 IHDR_CRTRP= 12, // Image Header Creator (Proc 00205 IHDR_CRTRT= 28, // Image Header Creator (Task 00206 IHDR_DATE= 29, // Image Creation Date (ascii 00207 IHDR_IDATE= 34, // Image Creation Date (integer 00208 IHDR_TIME= 37, // Image Creation Time (ascii 00209 IHDR_ITIME= 41, // Image Creation Time (integer 00210 IHDR_IMNUM= 44, // Image Number 00211 IHDR_SERNM= 46, // Series Number of Image 00212 IHDR_RAWID= 48, // Raw Data System ID 00213 IHDR_SGENID= 50, // System Generation ID 00214 IHDR_STRTX= 52, // Start Location X, Right min 00215 IHDR_ENDX= 54, // End Location X, Right max 00216 IHDR_STRTY= 56, // Start Location Y, Anterior min 00217 IHDR_ENDY= 58, // End Location Y, Anterior max 00218 IHDR_STRTZ= 60, // Start Location Z, Superior min 00219 IHDR_ENDZ= 62, // End Location Z, Superior max 00220 IHDR_OBLIQUE= 64, // Reserved for future use. 00221 IHDR_LOCATN= 73, // Image Location 00222 IHDR_TBLPOS= 75, // Table Position 00223 IHDR_THICK= 77, // Thickness 00224 IHDR_SPACE= 79, // Spacing 00225 IHDR_ROUND= 81, // Round 00226 IHDR_TR= 82, // Repititon/Recovery Time 00227 IHDR_TS= 84, // Scan Time 00228 IHDR_TE= 86, // Echo Delay 00229 IHDR_TI= 88, // Inversion Time 00230 IHDR_TY= 90, // Reserved for future use. 00231 IHDR_NECHO= 98, // Number of echos. 00232 IHDR_ECHON= 99, // Echo number. 00233 IHDR_SLQUANT= 100, // Number of slices in scan group. 00234 IHDR_NAVE= 101, // Number of averages. 00235 IHDR_RSRCH= 102, // Research mode used ? 00236 IHDR_PNAME= 103, // Name of PSD file. 00237 IHDR_PSDDT= 119, // Creation Date of PSD file. 00238 IHDR_GPRE= 125, // Graphically Prescribed ? 00239 IHDR_PSERIES= 126, // Prescribed Series Numbers 00240 IHDR_PIMAGES= 131, // Prescribed Image Numbers 00241 IHDR_SHAPE= 136, // Image Shape 00242 IHDR_X= 137, // X pixel dimension 00243 IHDR_Y= 138, // Y pixel dimension 00244 IHDR_PIXSIZ= 139, // Pixel Size 00245 IHDR_CMPRS= 141, // Image Compressed ? 00246 IHDR_BITPIX= 142, // Bits per Pixel 00247 IHDR_WINDOW= 143, // Default Window 00248 IHDR_LEVEL= 144, // Default Level 00249 IHDR_IFBLKS= 145, // Number of Blocks in File 00250 IHDR_NEX= 146, // Number of excitations (Real . 00251 IHDR_PSAR= 148, // Value of peak SAR (Real . 00252 IHDR_ASAR= 150, // Value of average SAR (Real . 00253 IHDR_MONITOR= 152, // SAR monitored ? 00254 IHDR_CONTIG= 153, // Contiguous slices ? 00255 IHDR_HRT_RT= 154, // Cardiac Heart Rate 00256 IHDR_DEL_TRG= 155, // Total Delay Time After Trigger 00257 IHDR_ARR= 157, // Arrhythmia Rejection Ratio 00258 IHDR_RTIME= 158, // Cardiac Rep Time 00259 IHDR_IMGS_PCY= 159, // Images per Cardiac Cycle 00260 IHDR_ARRS_SCN= 160, // Number of ARR's during the Scan 00261 IHDR_XMTATTN= 162, // Transmit attenuator setting 00262 IHDR_RCVATTN= 163, // Recieve attenuator setting 00263 IHDR_FLDSTR= 164, // Magnetic Field Strength 00264 IHDR_IMG_OFF= 166, // Image offser 00265 IHDR_INTR_DEL= 167, // Inter image/inter location delay 00266 IHDR_IHDR_DNAME=169, // PSD name from NAME = aPPL psd name 00267 IHDR_FLPANG= 175, // Flip angle for GRASS 00268 IHDR_SC_TYPE= 176, // Type of correction for surface coils 00269 IHDR_SC_SER= 178, // Series no. of corrected/uncor images 00270 IHDR_SC_IMA= 180, // Image no. of corrected/uncor images 00271 IHDR_SC_EXTR= 182, // Extremety coil? true/false 00272 IHDR_SC_RSRV= 183, // Reserved for future surface coil use 00273 IHDR_PSERIES_2= 193, // Series no. of second localizer 00274 IHDR_PIMAGE_2= 195, // Image no. of second localizer 00275 IHDR_R_CC= 197, // R center coordinate on plane image 00276 IHDR_A_CC= 199, // A center coordinate on plane image 00277 IHDR_S_CC= 201, // S center coordinate on plane image 00278 IHDR_R_NC= 203, // R normal coordinate 00279 IHDR_A_NC= 205, // A normal coordinate 00280 IHDR_S_NC= 207, // S normal coordinate 00281 IHDR_TLHC_R= 209, // TLHC R coordinate 00282 IHDR_TLHC_A= 211, // TLHC A coordinate 00283 IHDR_TLHC_S= 213, // TLHC S coordinate 00284 IHDR_TRHC_R= 215, // TRHC R coordinate 00285 IHDR_TRHC_A= 217, // TRHC A coordinate 00286 IHDR_TRHC_S= 219, // TRHC S coordinate 00287 IHDR_BLHC_R= 221, // BLHC R coordinate 00288 IHDR_BLHC_A= 223, // BLHC A coordinate 00289 IHDR_BLHC_S= 225, // BLHC S coordinate 00290 IHDR_DISCLMR= 227, // Image header disclamer 00291 IHDR_MINDAT= 228, // Minimum delay after trigger 00292 IHDR_CPHASE= 229, // Multiplier of slices to obtain phase 00293 IHDR_TE2= 230, // TE2 (VEMP) 00294 IHDR_SWAP_PF= 232, // swap phase/frequency axis 00295 IHDR_PAUSIN= 233, // Pause interval 00296 IHDR_PAUSTM= 234, // Pause time 00297 IHDR_USET= 236, // Bitmap defining users CVs 00298 IHDR_USER0= 237, // User defined variables that are PSD dependent 00299 IHDR_USER1= 239, 00300 IHDR_USER2= 241, 00301 IHDR_USER3= 243, 00302 IHDR_USER4= 245, 00303 IHDR_USER5= 247, 00304 IHDR_USER6= 249, 00305 IHDR_USER7= 251, 00306 IHDR_USER8= 253, 00307 IHDR_USER9= 255, 00308 IHDR_OBPLANE= 257, // Oblique pl 00309 IHDR_CNTRST= 258, // BOOLEAN - was contrast used? 00310 IHDR_CSTAGNT= 259, // Contrast agent 00311 IHDR_CSTAMT= 264, // Contrast amount 00312 IHDR_FILFMT= 266, // FILE format (3.0 or earlier 00313 IHDR_AUTOCF= 267, // Auto center frequency 00314 IHDR_XMTFREQ= 268, // Actual transmit freq usen on scan 00315 IHDR_RCVFREQ= 270, // Actual receive freq usen on scan 00316 IHDR_AUTOXMTFERQ=272, // Recommended automated transmit freq 00317 IHDR_AUTORCVFREQ=274, // Recommended automated receive freq 00318 IHDR_AUTOXMTATTN=276, // Recommended automated transmit attenuation 00319 IHDR_AUTORCVATTN=278, // Recommended automated receive attenuation 00320 IHDR_HISTO= 280, // is histogram present in raw header 00321 IHDR_PF_SWAPPED= 281, // Swapped phase/frequency - true/false 00322 IHDR_R1= 282, // for prescan 00323 IHDR_R2= 283, // for prescan 00324 IHDR_VBW= 284, // Variable bandwidth 00325 IHDR_RSRV2= 285, // GE NMR Reserved 00326 IHDR_CHECK= 511, // Image Header Checksum 00327 }; 00328 enum DSS_Header_Offsets { 00329 DSSHDR_ID= 0, // DSS Header Identifier 00330 DSSHDR_REV= 7, // DSS Header Revision Number 00331 DSSHDR_BLKS= 11, // Number of DSS Header Blocks 00332 DSSHDR_CRTRP= 12, // DSS Header Creator (process 00333 DSSHDR_CRTRT= 28, // DSS Header Creator (task 00334 DSSHDR_DATE= 29, // Date of Creation (ascii 00335 DSSHDR_IDATE= 34, // Date of Creation (integer 00336 DSSHDR_TIME= 37, // Time of Creation (ascii 00337 DSSHDR_ITIME= 41, // Time of Creation (integer 00338 DSSHDR_TLM= 44, // Time the DSSHDR was last modified 00339 DSSHDR_ASTAT= 46, // Study Archive Status 00340 DSSHDR_APEND= 47, // Study archive pending count. 00341 DSSHDR_SPEND= 48, // Substructure archive pending count. 00342 DSSHDR_LOCK= 49, // Resource locking queue desc 00343 DSSHDR_STLST= 57, // IDBM Formated Study List Entry 00344 DSSHDR_STIME= 121, // Creation time in seconds. 00345 DSSHDR_MSERIES= 123, // Maximum series number created to date 00346 DSSHDR_SERIES= 124, // Bit map for series in study. 00347 DSSHDR_DEFSER= 126, // Default series and iii for the study. 00348 DSSHDR_EOF= 129, // Points to the next block to allocate. 00349 DSSHDR_SDIR= 130, // Series number and sgenid referenced by max 00350 DSSHDR_IMAP= 223, // Image block number map for each series 00351 DSSHDR_RSRV1= 471, // GE NMR Reserved Area 00352 }; 00353 enum DSS_Header_Series_Offsets { 00354 DSSHDR_SERIES_MIMAGE= 0, // Maximum image number created to date. 00355 DSSHDR_SERIES_IMAGE= 1, // Number of images in the series. 00356 DSSHDR_SERIES_RSRV= 2, // Number of images reserved for space. 00357 DSSHDR_SERIES_PTYPE= 3,// Series plane type, AXIAL, SAG ... 00358 DSSHDR_SERIES_PSEQ= 4, // Pulse sequence type. 00359 DSSHDR_SERIES_ANREF= 5, // Anatomical reference, 2 chars. 00360 DSSHDR_SERIES_VANREF= 6, // Vertical Anatomical reference. 00361 DSSHDR_SERIES_FOV= 7, // Field of view. in I*2 mm * 10 00362 DSSHDR_SERIES_DESC= 8, // First 22 chars of series description. 00363 DSSHDR_SERIES_ASTAT= 19, // Archive status. 00364 DSSHDR_SERIES_APEND= 20, // Archive pending status. 00365 DSSHDR_SERIES_IMATRIX= 21, // Image matrix size. 00366 DSSHDR_SERIES_MINLOC= 22, // Minimum location, I*2 mm * 10. 00367 DSSHDR_SERIES_MAXLOC= 23, // Maximim location, I*2 mm * 10. 00368 DSSHDR_SERIES_LOCCHAR= 24, // Characters whcih represent +,- pos. 00369 DSSHDR_SERIES_TLM= 25, // Time the series was last modified. 00370 DSSHDR_SERIES_CHECK= 27, // Checksum for the series header. 00371 DSSHDR_SERIES_DEFIM= 28, // Default image for the series. 00372 DSSHDR_SERIES_TIMAGE= 29, // Total image count (partial & complete 00373 DSSHDR_SERIES_GTYPE= 30, // Gating type if cardiac gated 00374 DSSHDR_SERIES_WPENTRY= 33, // Words per series entry. 00375 }; 00376 enum DSS_Header_Image_Offsets { 00377 DSSHDR_IMAGE_LOCATN= 0, // Image location in I*2 mm * 10 00378 DSSHDR_IMAGE_THICK= 1, // Image thickness in I*2 mm * 10 00379 DSSHDR_IMAGE_NEXT= 2, // Next image by location. 00380 DSSHDR_IMAGE_PRIOR= 3, // Prior image by location. 00381 DSSHDR_IMAGE_EXIST= 4, // None, header or data exists. 00382 DSSHDR_IMAGE_T1= 5, 00383 DSSHDR_IMAGE_T2= 7, 00384 DSSHDR_IMAGE_TRGD= 9, // Trigger Delay 00385 DSSHDR_IMAGE_ECHON= 11, // Echo number 00386 DSSHDR_IMAGE_NXTEN= 12, // Next image by echo number 00387 DSSHDR_IMAGE_PREN= 13, // Prior image by echo number 00388 DSSHDR_IMAGE_GPRE= 14, // Graphically Prescribed flag 00389 DSSHDR_IMAGE_RCC= 15, // R center coordinate 00390 DSSHDR_IMAGE_ACC= 17, // A center coordinate 00391 DSSHDR_IMAGE_SCC= 19, // S center coordinate 00392 DSSHDR_IMAGE_RNC= 21, // R normal coordinate 00393 DSSHDR_IMAGE_ANC= 23, // R normal coordinate 00394 DSSHDR_IMAGE_SNC= 25, // R normal coordinate 00395 DSSHDR_IMAGE_OBP= 27, // Oblique plane 00396 DSSHDR_IMAGE_WPENTRY= 32, 00397 }; 00398 enum Block_Offsets { 00399 SYSCON_START = 0*256, 00400 SITCUS_START= 4*256, 00401 STHDR_START= 6*256, 00402 SEHDR_START= 8*256, 00403 IHDR_START= 10*256, 00404 RDBM_START= 12*256, 00405 PSD_START= 16*256, 00406 PIXMAP_START= 26*256, 00407 IDATA_START= 28*256, 00408 }; 00409 enum Sys_Config_Offsets { 00410 SCON_SYSID= 6, // System ID String 00411 SCON_HNAME= 16 // Hospital Name 00412 }; 00413 void operator=(const Self&); //purposely not implemented 00414 }; 00415 00416 } // end namespace itk 00417 00418 #endif // __itkAnalyzeImageIO_h

Generated at Sun Apr 1 02:29:32 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000