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/09/10 14:29:34 $ 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 00036 class ITK_EXPORT GiplImageIO : public ImageIOBase 00037 { 00038 public: 00040 typedef GiplImageIO Self; 00041 typedef ImageIOBase Superclass; 00042 typedef SmartPointer<Self> Pointer; 00043 00045 itkNewMacro(Self); 00046 00048 itkTypeMacro(GiplImageIO, Superclass); 00049 00050 /*-------- This part of the interfaces deals with reading data. ----- */ 00051 00054 virtual bool CanReadFile(const char*) ; 00055 00057 virtual void ReadImageInformation(); 00058 00060 virtual const std::type_info& GetPixelType() const; 00061 00063 virtual void Read(void* buffer); 00064 00068 virtual unsigned int GetComponentSize() const; 00069 00070 /*-------- This part of the interfaces deals with writing data. ----- */ 00071 00074 virtual bool CanWriteFile(const char*); 00075 00077 virtual void WriteImageInformation(); 00078 00081 virtual void Write(const void* buffer); 00082 00083 00084 GiplImageIO(); 00085 ~GiplImageIO(); 00086 void PrintSelf(std::ostream& os, Indent indent) const; 00087 00088 private: 00089 GiplImageIO(const Self&); //purposely not implemented 00090 void operator=(const Self&); //purposely not implemented 00091 00092 void SwapBytesIfNecessary(void* buffer, unsigned long numberOfPixels); 00093 00094 std::ifstream m_Ifstream; 00095 std::ofstream m_Ofstream; 00096 00097 }; 00098 00099 } // end namespace itk 00100 00101 #endif // __itkGiplImageIO_h

Generated at Sat Mar 31 02:19:44 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000