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

itkGE5ImageIO.h

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

Generated at Wed May 24 23:11:37 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000