00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00040
#ifndef __itkBrains2MaskImageIO_h
00041
#define __itkBrains2MaskImageIO_h
00042
00043
#ifdef WIN32
00044
#pragma warning(disable:4786)
00045
#endif
00046
00047
#include <fstream>
00048
#include "itkImageIOBase.h"
00049
#include "itkBrains2IPLHeaderInfo.h"
00050
#include "itkOctree.h"
00051
00052
namespace itk
00053 {
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 const std::type_info& GetPixelType() const;
00087
00089 virtual
void Read(
void* buffer);
00090
00094 virtual
unsigned int GetComponentSize() const;
00095
00096
00097
00104 virtual
bool CanWriteFile(const
char * FileNameToWrite);
00105
00107 virtual
void WriteImageInformation();
00108
00111 virtual
void Write(const
void* buffer);
00112
00113
00114 protected:
00115 Brains2MaskImageIO();
00116 ~Brains2MaskImageIO();
00117
void PrintSelf(std::ostream& os,
Indent indent) const;
00118 private:
00119 Brains2MaskImageIO(const
Self&);
00120
void operator=(const Self&);
00121 itk::
OctreeNodeBranch * readOctree (
00122 std::ifstream & octreestream,
00123 const
ImageIOBase::ByteOrder machineByteOrder,
00124 const
ImageIOBase::ByteOrder fileByteOrder);
00125
ImageIOBase::ByteOrder m_MachineByteOrder;
00126
00127 itk::
Brains2IPLHeaderInfo m_IPLHeaderInfo;
00128
OctreeBase *m_Octree;
00129 };
00130
00131 }
00132
00133 #endif