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: 2003/01/08 07:00:22 $
00007   Version:   $1.0$
00008 
00009   Copyright (c) 2002 Insight 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 #include <fstream>
00021 #include "itkImageIOBase.h"
00022 #include <stdio.h>
00023 
00024 namespace itk
00025 {
00026 
00032 class ITK_EXPORT GiplImageIO : public ImageIOBase
00033 {
00034 public:
00036   typedef GiplImageIO            Self;
00037   typedef ImageIOBase  Superclass;
00038   typedef SmartPointer<Self>  Pointer;
00039   
00041   itkNewMacro(Self);
00042 
00044   itkTypeMacro(GiplImageIO, Superclass);
00045 
00046   /*-------- This part of the interfaces deals with reading data. ----- */
00047 
00050   virtual bool CanReadFile(const char*) ;
00051 
00053   virtual void ReadImageInformation();
00054   
00056   virtual const std::type_info& GetPixelType() const;
00057 
00059   virtual void Read(void* buffer);
00060 
00064   virtual unsigned int GetComponentSize() const;
00065   
00066   /*-------- This part of the interfaces deals with writing data. ----- */
00067 
00070   virtual bool CanWriteFile(const char*);
00071 
00073   virtual void WriteImageInformation();
00074   
00077   virtual void Write(const void* buffer);
00078 
00079 
00080   GiplImageIO();
00081   ~GiplImageIO();
00082   void PrintSelf(std::ostream& os, Indent indent) const;
00083   
00084 private:
00085   GiplImageIO(const Self&); //purposely not implemented
00086   void operator=(const Self&); //purposely not implemented
00087 
00088   void SwapBytesIfNecessary(void* buffer, unsigned long numberOfPixels);
00089  
00090   std::ifstream   m_Ifstream;
00091   std::ofstream   m_Ofstream;
00092   
00093 };
00094 
00095 } // end namespace itk
00096 
00097 #endif // __itkGiplImageIO_h

Generated at Fri May 21 01:14:49 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000