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/08/12 19:47:45 $
00007 Version:   $Revision: 1.1 $
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 {
00044 class ITK_EXPORT NiftiImageIO : public ImageIOBase
00045 {
00046 public:
00048   typedef NiftiImageIO            Self;
00049   typedef ImageIOBase  Superclass;
00050   typedef SmartPointer<Self>  Pointer;
00051 
00053   itkNewMacro(Self);
00054 
00056   itkTypeMacro(NiftiImageIO, Superclass);
00057 
00058   /*-------- This part of the interfaces deals with reading data. ----- */
00059 
00066   virtual bool CanReadFile(const char* FileNameToRead) ;
00067 
00069   virtual void ReadImageInformation();
00070 
00072   virtual void Read(void* buffer);
00073 
00074   /*-------- This part of the interfaces deals with writing data. ----- */
00075 
00082   virtual bool CanWriteFile(const char * FileNameToWrite);
00083 
00085   virtual void WriteImageInformation();
00086 
00089   virtual void Write(const void* buffer);
00090 
00091 
00092 protected:
00093   NiftiImageIO();
00094   ~NiftiImageIO();
00095   void PrintSelf(std::ostream& os, Indent indent) const;
00096 private:
00097   void  DefineHeaderObjectDataType();
00113   typedef enum {
00114     ITK_ANALYZE_ORIENTATION_RPI_TRANSVERSE=0,        
00115     ITK_ANALYZE_ORIENTATION_RIP_CORONAL   =1,        
00116     ITK_ANALYZE_ORIENTATION_PIR_SAGITTAL  =2,        
00117     ITK_ANALYZE_ORIENTATION_RAI_TRANSVERSE_FLIPPED=3,
00118     ITK_ANALYZE_ORIENTATION_RSP_CORONAL_FLIPPED=4,   
00119     ITK_ANALYZE_ORIENTATION_PIL_SAGITTAL_FLIPPED=5   
00120   } ValidNiftiOrientationFlags;
00121   nifti_image * m_NiftiImage;
00122   double m_RescaleSlope;
00123   double m_RescaleIntercept;
00124 
00125   NiftiImageIO(const Self&); //purposely not implemented
00126   void operator=(const Self&); //purposely not implemented
00127 };
00128 } // end namespace itk
00129 
00130 #endif // __itkNiftiImageIO_h

Generated at Tue Aug 30 16:45:37 2005 for ITK by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2000