ITK  5.0.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:
40  ITK_DISALLOW_COPY_AND_ASSIGN(NrrdImageIO);
41 
43  using Self = NrrdImageIO;
46 
48  itkNewMacro(Self);
49 
51  itkTypeMacro(NrrdImageIO, ImageIOBase);
52 
58  bool SupportsDimension(unsigned long) override;
59 
62  bool CanReadFile(const char *) override;
63 
65  void ReadImageInformation() override;
66 
68  void Read(void *buffer) override;
69 
72  bool CanWriteFile(const char *) override;
73 
75  void WriteImageInformation() override;
76 
79  void Write(const void *buffer) override;
80 
81 protected:
82  NrrdImageIO();
83  ~NrrdImageIO() override;
84  void PrintSelf(std::ostream & os, Indent indent) const override;
85 
88  int ITKToNrrdComponentType(const ImageIOBase::IOComponentType) const;
89 
90  ImageIOBase::IOComponentType NrrdToITKComponentType(const int) const;
91 };
92 } // end namespace itk
93 
94 #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...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60