ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkNrrdImageIO.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkNrrdImageIO_h
19 #define itkNrrdImageIO_h
20 #include "ITKIONRRDExport.h"
21 
22 
23 #include "itkImageIOBase.h"
24 #include <fstream>
25 
26 namespace itk
27 {
37 class ITKIONRRD_EXPORT NrrdImageIO:public ImageIOBase
38 {
39 public:
41  typedef NrrdImageIO Self;
44 
46  itkNewMacro(Self);
47 
49  itkTypeMacro(NrrdImageIO, ImageIOBase);
50 
56  virtual bool SupportsDimension(unsigned long) ITK_OVERRIDE;
57 
60  virtual bool CanReadFile(const char *) ITK_OVERRIDE;
61 
63  virtual void ReadImageInformation() ITK_OVERRIDE;
64 
66  virtual void Read(void *buffer) ITK_OVERRIDE;
67 
70  virtual bool CanWriteFile(const char *) ITK_OVERRIDE;
71 
73  virtual void WriteImageInformation() ITK_OVERRIDE;
74 
77  virtual void Write(const void *buffer) ITK_OVERRIDE;
78 
79 protected:
80  NrrdImageIO();
81  ~NrrdImageIO() ITK_OVERRIDE;
82  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
83 
86  int ITKToNrrdComponentType(const ImageIOBase::IOComponentType) const;
87 
88  ImageIOBase::IOComponentType NrrdToITKComponentType(const int) const;
89 
90 private:
91  ITK_DISALLOW_COPY_AND_ASSIGN(NrrdImageIO);
92 };
93 } // end namespace itk
94 
95 #endif // itkNrrdImageIO_h
Light weight base class for most itk classes.
Abstract superclass defines image IO interface.
Read and write the &quot;Nearly Raw Raster Data&quot; (Nrrd) image format. The Nrrd format was developed as par...
ImageIOBase Superclass
NrrdImageIO Self
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49