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 
00140     SU_HDR_LEN=114
00141   };
00142   /*
00143         EXAM HEADER
00144       */
00145   enum GE_EX_ENUM {
00146 
00270     EX_HDR_LEN=1024
00271   };
00272 
00273   enum GE_SE_ENUM {
00437     SE_HDR_LEN=1020
00438   };
00439   /*
00440         image header
00441       */
00442   enum GE_IMAGE_HEADER_ENUM {
00443 
00749     IM_HDR_LEN=1022
00750   };
00751   /*
00752         these values are relative to the start of the suite information
00753         the suite information starts at some variable location as specified
00754         in the pixel data header at the start of the image file
00755       */
00756   enum GE_RELATIVE_STARTS {
00757     SU_HDR_START=0,
00758     EX_HDR_START=SU_HDR_LEN,
00759     SE_HDR_START=EX_HDR_START+EX_HDR_LEN,
00760     IM_HDR_START=SE_HDR_START+SE_HDR_LEN,
00761     IMG_HDR_START=0
00762   };
00763   int checkGe5xImages (char const * const imageFileTemplate);
00764   GE5ImageIO(const Self&); //purposely not implemented
00765   void operator=(const Self&); //purposely not implemented
00766 };
00768 
00769 } // end namespace itk
00770 
00771 #endif // __itkAnalyzeImageIO_h
00772 

Generated at Sat Sep 2 20:27:34 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000