ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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 *=========================================================================*/
26
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
90 bool
91 SupportsDimension(unsigned long dim) override
92 {
93 return dim < 5;
94 }
95
96 /*-------- This part of the interface deals with reading data. ------ */
97
100 bool
101 CanReadFile(const char *) override;
102
104 void
106
108 void
109 Read(void * buffer) override;
110
111 /*-------- This part of the interfaces deals with writing data. ----- */
112
115 bool
116 CanWriteFile(const char *) override;
117
120 void
122
125 void
126 Write(const void * buffer) override;
127
130 itkSetMacro(RAStoLPS, bool);
131 itkGetConstMacro(RAStoLPS, bool);
132 itkBooleanMacro(RAStoLPS);
134protected:
136 ~MINCImageIO() override;
137
138 void
139 PrintSelf(std::ostream & os, Indent indent) const override;
140
141 void
142 WriteSlice(std::string & fileName, const void * buffer);
143
146 void
148
150 void
152
154 void
156
157private:
158 const std::unique_ptr<MINCImageIOPImpl> m_MINCPImpl;
159
161
162 // complex type images, composed of complex numbers
163 // int m_Complex;
164 bool m_RAStoLPS{ false };
165};
166} // end namespace itk
167
168#endif // itkMINCImageIO_h
Control indentation during Print() invocation.
Definition itkIndent.h:51
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
MatrixType m_DirectionCosines
bool CanReadFile(const char *) override
void AllocateDimensions(int nDims)
void CleanupDimensions()
const std::unique_ptr< MINCImageIOPImpl > m_MINCPImpl
SmartPointer< Self > Pointer
ImageIOBase Superclass
bool CanWriteFile(const char *) override
void WriteImageInformation() override
void Read(void *buffer) override
Matrix< float, 3, 3 > MatrixType
A templated class holding a M x N size Matrix.
Definition itkMatrix.h:71
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
struct ITKIOMINC_HIDDEN MINCImageIOPImpl