00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkBrains2MaskImageIO_h
00019 #define __itkBrains2MaskImageIO_h
00020
00021 #ifdef WIN32
00022 #pragma warning(disable:4786)
00023 #endif
00024
00025 #include <fstream>
00026 #include "itkImageIOBase.h"
00027 #include "itkBrains2IPLHeaderInfo.h"
00028 #include "itkOctree.h"
00029
00030 namespace itk
00031 {
00058 class ITK_EXPORT Brains2MaskImageIO : public ImageIOBase
00059 {
00060 public:
00062 typedef Brains2MaskImageIO Self;
00063 typedef ImageIOBase Superclass;
00064 typedef SmartPointer<Self> Pointer;
00065
00067 itkNewMacro(Self);
00068
00070 itkTypeMacro(Brains2MaskImageIO, Superclass);
00071
00072
00073
00080 virtual bool CanReadFile(const char* FileNameToRead) ;
00081
00083 virtual void ReadImageInformation();
00084
00086 virtual void Read(void* buffer);
00087
00088
00089
00096 virtual bool CanWriteFile(const char * FileNameToWrite);
00097
00099 virtual void WriteImageInformation();
00100
00103 virtual void Write(const void* buffer);
00104
00105
00106 protected:
00107 Brains2MaskImageIO();
00108 ~Brains2MaskImageIO();
00109 void PrintSelf(std::ostream& os, Indent indent) const;
00110 private:
00111 Brains2MaskImageIO(const Self&);
00112 void operator=(const Self&);
00113 itk::OctreeNodeBranch * readOctree (
00114 std::ifstream & octreestream,
00115 const ImageIOBase::ByteOrder machineByteOrder,
00116 const ImageIOBase::ByteOrder fileByteOrder);
00117 ImageIOBase::ByteOrder m_MachineByteOrder;
00118
00119 itk::Brains2IPLHeaderInfo m_IPLHeaderInfo;
00120 OctreeBase *m_Octree;
00121 itk::Brains2IPLHeaderInfo m_B2MaskHeader;
00122 };
00123
00124 }
00125
00126 #endif // __itkBrains2MaskImageIO_h
00127