ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkNrrdImageIO.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkNrrdImageIO_h
00019 #define __itkNrrdImageIO_h
00020 
00021 
00022 #include "itkImageIOBase.h"
00023 #include <fstream>
00024 #include "NrrdIO.h"
00025 
00026 namespace itk
00027 {
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 
00060   virtual bool CanReadFile(const char *);
00061 
00063   virtual void ReadImageInformation();
00064 
00066   virtual void Read(void *buffer);
00067 
00070   virtual bool CanWriteFile(const char *);
00071 
00073   virtual void WriteImageInformation();
00074 
00077   virtual void Write(const void *buffer);
00078 
00079 protected:
00080   NrrdImageIO();
00081   ~NrrdImageIO();
00082   void PrintSelf(std::ostream & os, Indent indent) const;
00083 
00086   int ITKToNrrdComponentType(const ImageIOBase::IOComponentType) const;
00087 
00088   ImageIOBase::IOComponentType NrrdToITKComponentType(const int) const;
00089 
00090 private:
00091   NrrdImageIO(const Self &);    //purposely not implemented
00092   void operator=(const Self &); //purposely not implemented
00093 };
00094 } // end namespace itk
00095 
00096 #endif // __itkNrrdImageIO_h
00097