ITK  6.0.0
Insight Toolkit
itkMINCImageIO.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 *=========================================================================*/
27#ifndef itkMINCImageIO_h
28#define itkMINCImageIO_h
29
30#include "itkImageIOBase.h"
31
32#include "itkMatrix.h"
33
34#include "ITKIOMINCExport.h"
35#include <memory> // For unique_ptr.
36
37namespace itk
38{
39
40// Structure for "Pointer to Implementation" or "Private
41// Implementation" to hide MINC data from the ITK interface.
42struct ITKIOMINC_HIDDEN MINCImageIOPImpl;
43
71class ITKIOMINC_EXPORT MINCImageIO : public ImageIOBase
72{
73public:
74 ITK_DISALLOW_COPY_AND_MOVE(MINCImageIO);
75
81
83 itkNewMacro(Self);
84
86 itkOverrideGetNameOfClassMacro(MINCImageIO);
87
89 bool
90 SupportsDimension(unsigned long dim) override
91 {
92 return dim < 4;
93 }
94
95 /*-------- This part of the interface deals with reading data. ------ */
96
99 bool
100 CanReadFile(const char *) override;
101
103 void
105
107 void
108 Read(void * buffer) override;
109
110 /*-------- This part of the interfaces deals with writing data. ----- */
111
114 bool
115 CanWriteFile(const char *) override;
116
119 void
121
124 void
125 Write(const void * buffer) override;
126
127protected:
129 ~MINCImageIO() override;
130
131 void
132 PrintSelf(std::ostream & os, Indent indent) const override;
133
134 void
135 WriteSlice(std::string & fileName, const void * buffer);
136
139 void
141
143 void
145
147 void
149
150private:
151 const std::unique_ptr<MINCImageIOPImpl> m_MINCPImpl;
152
153 MatrixType m_DirectionCosines{};
154
155 // complex type images, composed of complex numbers
156 // int m_Complex;
157};
158} // end namespace itk
159
160#endif // itkMINCImageIO_h
Abstract superclass defines image IO interface.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Class that defines how to read MINC file format.
bool SupportsDimension(unsigned long dim) override
~MINCImageIO() override
void Write(const void *buffer) override
void ReadImageInformation() override
void WriteSlice(std::string &fileName, const void *buffer)
void PrintSelf(std::ostream &os, Indent indent) const override
bool CanReadFile(const char *) override
void AllocateDimensions(int nDims)
void CleanupDimensions()
const std::unique_ptr< MINCImageIOPImpl > m_MINCPImpl
bool CanWriteFile(const char *) override
void WriteImageInformation() override
void Read(void *buffer) override
Base class for most ITK classes.
Definition: itkObject.h:62
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
struct ITKIOMINC_HIDDEN MINCImageIOPImpl