ITK  4.2.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 
00025 namespace itk
00026 {
00036 class ITK_EXPORT NrrdImageIO:public ImageIOBase
00037 {
00038 public:
00040   typedef NrrdImageIO          Self;
00041   typedef ImageIOBase          Superclass;
00042   typedef SmartPointer< Self > Pointer;
00043 
00045   itkNewMacro(Self);
00046 
00048   itkTypeMacro(NrrdImageIO, ImageIOBase);
00049 
00055   virtual bool SupportsDimension(unsigned long);
00056 
00059   virtual bool CanReadFile(const char *);
00060 
00062   virtual void ReadImageInformation();
00063 
00065   virtual void Read(void *buffer);
00066 
00069   virtual bool CanWriteFile(const char *);
00070 
00072   virtual void WriteImageInformation();
00073 
00076   virtual void Write(const void *buffer);
00077 
00078 protected:
00079   NrrdImageIO();
00080   ~NrrdImageIO();
00081   void PrintSelf(std::ostream & os, Indent indent) const;
00082 
00085   int ITKToNrrdComponentType(const ImageIOBase::IOComponentType) const;
00086 
00087   ImageIOBase::IOComponentType NrrdToITKComponentType(const int) const;
00088 
00089 private:
00090   NrrdImageIO(const Self &);    //purposely not implemented
00091   void operator=(const Self &); //purposely not implemented
00092 };
00093 } // end namespace itk
00094 
00095 #endif // __itkNrrdImageIO_h
00096