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

itkNiftiImageIO.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   Insight Segmentation & Registration Toolkit
00004 Module:    $RCSfile: itkNiftiImageIO.h,v $
00005 Language:  C++
00006 Date:      $Date: 2005/09/28 15:41:55 $
00007 Version:   $Revision: 1.2 $
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 
00025 #ifndef __itkNiftiImageIO_h
00026 #define __itkNiftiImageIO_h
00027 
00028 #ifdef _MSC_VER
00029 #pragma warning ( disable : 4786 )
00030 #endif
00031 
00032 #include <fstream>
00033 #include "itkImageIOBase.h"
00034 #include <nifti1_io.h>
00035 
00036 namespace itk
00037 {
00038 
00047 class ITK_EXPORT NiftiImageIO : public ImageIOBase
00048 {
00049 public:
00051   typedef NiftiImageIO            Self;
00052   typedef ImageIOBase  Superclass;
00053   typedef SmartPointer<Self>  Pointer;
00054 
00056   itkNewMacro(Self);
00057 
00059   itkTypeMacro(NiftiImageIO, Superclass);
00060 
00061   /*-------- This part of the interfaces deals with reading data. ----- */
00062 
00069   virtual bool CanReadFile(const char* FileNameToRead) ;
00070 
00072   virtual void ReadImageInformation();
00073 
00075   virtual void Read(void* buffer);
00076 
00077   /*-------- This part of the interfaces deals with writing data. ----- */
00078 
00085   virtual bool CanWriteFile(const char * FileNameToWrite);
00086 
00088   virtual void WriteImageInformation();
00089 
00092   virtual void Write(const void* buffer);
00093 
00094 
00095 protected:
00096   NiftiImageIO();
00097   ~NiftiImageIO();
00098   void PrintSelf(std::ostream& os, Indent indent) const;
00099 private:
00100   void  DefineHeaderObjectDataType();
00116   typedef enum {
00117 
00129   } ValidNiftiOrientationFlags;
00130   nifti_image * m_NiftiImage;
00131   double m_RescaleSlope;
00132   double m_RescaleIntercept;
00133 
00134   NiftiImageIO(const Self&); //purposely not implemented
00135   void operator=(const Self&); //purposely not implemented
00136 };
00137 } // end namespace itk
00138 
00139 #endif // __itkNiftiImageIO_h
00140 

Generated at Mon Mar 12 01:53:37 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000