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: 2009-06-14 12:30:11 $
00007   Version:   $Revision: 1.14 $
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 "itkIPLCommonImageIO.h"
00039 #include "Ge5xHdr.h"
00040 
00041 namespace itk
00042 {
00051 class ITK_EXPORT GE5ImageIO : public IPLCommonImageIO
00052 {
00053 public:
00055   typedef GE5ImageIO         Self;
00056   typedef IPLCommonImageIO   Superclass;
00057   typedef SmartPointer<Self> Pointer;
00058 
00060   itkNewMacro(Self);
00061 
00063   itkTypeMacro(GE5ImageIO, Superclass);
00064 
00065   /*-------- This part of the interfaces deals with reading data. ----- */
00066 
00073   virtual bool CanReadFile(const char* FileNameToRead);
00074 
00075   /* * Set the spacing and dimension information for the set filename. */
00076   // Implemented in superclass
00077   //      virtual void ReadImageInformation();
00078 
00080   void ModifyImageInformation();
00081 
00082   /* * Get the type of the pixel.  */
00083   // Implemented in superclass
00084   //      virtual const std::type_info& GetPixelType() const;
00085 
00086   /* * Reads the data from disk into the memory buffer provided. */
00087   // Implemented in superclass
00088   //      virtual void Read(void* buffer);
00089 
00090   /* * Compute the size (in bytes) of the components of a pixel. For
00091        * example, and RGB pixel of unsigned char would have a
00092        * component size of 1 byte. */
00093   // Implemented in superclass
00094   //      virtual unsigned int GetComponentSize() const;
00095 
00096   /*-------- This part of the interfaces deals with writing data. ----- */
00097 
00098   /* * Determine if the file can be written with this ImageIO implementation.
00099    * \param FileNameToWrite The name of the file to test for writing.
00100    * \author Hans J. Johnson
00101    * \post Sets classes ImageIOBase::m_FileName variable to be FileNameToWrite
00102    * \return Returns true if this ImageIO can write the file specified.
00103   */
00104   // Implemented in superclass
00105   //      virtual bool CanWriteFile(const char * FileNameToWrite);
00106 
00107   /* * Set the spacing and dimension information for the set filename. */
00108   // Implemented in superclass
00109   //      virtual void WriteImageInformation();
00110 
00111   /* * Writes the data to disk from the memory buffer provided. Make sure
00112     * that the IORegions has been set properly. */
00113   // Implemented in superclass
00114   //      virtual void Write(const void* buffer);
00115 protected:
00116   GE5ImageIO();
00117   ~GE5ImageIO();
00118 
00119   virtual GEImageHeader *ReadHeader(const char *FileNameToRead);
00120 private:
00121   void SwapPixHdr (Ge5xPixelHeader * hdr);
00122   int CheckGE5xImages (char const * const imageFileTemplate, std::string &reason);
00123   GE5ImageIO(const Self&); //purposely not implemented
00124   void operator=(const Self&); //purposely not implemented
00125 };
00126 
00127 } // end namespace itk
00128 
00129 #endif // __itkAnalyzeImageIO_h
00130 

Generated at Mon Jul 12 2010 18:24:08 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000