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: 2007-03-22 14:28:50 $
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   
00041 class ITK_EXPORT GiplImageIO : public ImageIOBase
00042 {
00043 public:
00045   typedef GiplImageIO        Self;
00046   typedef ImageIOBase        Superclass;
00047   typedef SmartPointer<Self> Pointer;
00048 
00050   itkNewMacro(Self);
00051 
00053   itkTypeMacro(GiplImageIO, Superclass);
00054 
00055   /*-------- This part of the interfaces deals with reading data. ----- */
00056 
00059   virtual bool CanReadFile(const char*);
00060 
00062   virtual void ReadImageInformation();
00063 
00065   virtual void Read(void* buffer);
00066 
00067   /*-------- This part of the interfaces deals with writing data. ----- */
00068 
00071   virtual bool CanWriteFile(const char*);
00072 
00074   virtual void WriteImageInformation();
00075 
00078   virtual void Write(const void* buffer);
00079 
00080 
00081   GiplImageIO();
00082   ~GiplImageIO();
00083   void PrintSelf(std::ostream& os, Indent indent) const;
00084   
00085 private:
00086   GiplImageIO(const Self&); //purposely not implemented
00087   void operator=(const Self&); //purposely not implemented
00088 
00089   void SwapBytesIfNecessary(void* buffer, unsigned long numberOfPixels);
00090   bool CheckExtension(const char*);
00091 
00092   std::ifstream   m_Ifstream;
00093   std::ofstream   m_Ofstream;
00094   bool            m_IsCompressed;
00095 
00096   GiplImageIOInternals * m_Internal;
00097 };
00098 
00099 } // end namespace itk
00100 
00101 #endif // __itkGiplImageIO_h
00102 

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