00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkNrrdImageIO_h
00018 #define __itkNrrdImageIO_h
00019
00020 #ifdef _MSC_VER
00021 #pragma warning ( disable : 4786 )
00022 #endif
00023
00024 #include "itkImageIOBase.h"
00025 #include <fstream>
00026 #include "NrrdIO/NrrdIO.h"
00027
00028 namespace itk
00029 {
00030
00037 class ITK_EXPORT NrrdImageIO : public ImageIOBase
00038 {
00039 public:
00041 typedef NrrdImageIO Self;
00042 typedef ImageIOBase Superclass;
00043 typedef SmartPointer<Self> Pointer;
00044
00046 itkNewMacro(Self);
00047
00049 itkTypeMacro(NrrdImageIO, ImageIOBase);
00050
00056 virtual bool SupportsDimension(unsigned long )
00057 {return true;}
00058
00061 virtual bool CanReadFile(const char*);
00062
00064 virtual void ReadImageInformation();
00065
00067 virtual void Read(void* buffer);
00068
00071 virtual bool CanWriteFile(const char*);
00072
00074 virtual void WriteImageInformation();
00075
00078 virtual void Write(const void* buffer);
00079
00080 protected:
00081 NrrdImageIO() {}
00082 ~NrrdImageIO() {}
00083 void PrintSelf(std::ostream& os, Indent indent) const;
00084
00087 int ITKToNrrdPixelType( const ImageIOBase::IOComponentType ) const;
00088 ImageIOBase::IOComponentType NrrdToITKComponentType( const int ) const;
00089
00090 private:
00091 NrrdImageIO(const Self&);
00092 void operator=(const Self&);
00093
00094 };
00095
00096 }
00097
00098 #endif // __itkNrrdImageIO_h