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

itkGiplImageIO.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGiplImageIO.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/08/13 18:40:53 $
00007   Version:   $1.0$
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 #ifndef __itkGiplImageIO_h
00018 #define __itkGiplImageIO_h
00019 
00020 #ifdef _MSC_VER
00021 #pragma warning ( disable : 4786 )
00022 #endif
00023 
00024 #include <fstream>
00025 #include "itkImageIOBase.h"
00026 #include <stdio.h>
00027 
00028 namespace itk
00029 {
00030 
00031 class GiplImageIOInternals;
00032   
00033   
00039 class ITK_EXPORT GiplImageIO : public ImageIOBase
00040 {
00041 public:
00043   typedef GiplImageIO            Self;
00044   typedef ImageIOBase  Superclass;
00045   typedef SmartPointer<Self>  Pointer;
00046   
00048   itkNewMacro(Self);
00049 
00051   itkTypeMacro(GiplImageIO, Superclass);
00052 
00053   /*-------- This part of the interfaces deals with reading data. ----- */
00054 
00057   virtual bool CanReadFile(const char*) ;
00058 
00060   virtual void ReadImageInformation();
00061   
00063   virtual void Read(void* buffer);
00064 
00065   /*-------- This part of the interfaces deals with writing data. ----- */
00066 
00069   virtual bool CanWriteFile(const char*);
00070 
00072   virtual void WriteImageInformation();
00073   
00076   virtual void Write(const void* buffer);
00077 
00078 
00079   GiplImageIO();
00080   ~GiplImageIO();
00081   void PrintSelf(std::ostream& os, Indent indent) const;
00082   
00083 private:
00084   GiplImageIO(const Self&); //purposely not implemented
00085   void operator=(const Self&); //purposely not implemented
00086 
00087   void SwapBytesIfNecessary(void* buffer, unsigned long numberOfPixels);
00088   bool CheckExtension(const char*);
00089 
00090   std::ifstream   m_Ifstream;
00091   std::ofstream   m_Ofstream;
00092   bool            m_IsCompressed;
00093   GiplImageIOInternals * m_Internal;
00094 };
00095 
00096 } // end namespace itk
00097 
00098 #endif // __itkGiplImageIO_h

Generated at Tue Mar 29 23:52:38 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000