ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkMZ3MeshIO.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 *=========================================================================*/
18#ifndef itkMZ3MeshIO_h
19#define itkMZ3MeshIO_h
20#include "IOMeshMZ3Export.h"
21
22#include "itkMeshIOBase.h"
23
24#include <fstream>
25
26namespace itk
27{
28class MZ3MeshIOInternals;
29
55class IOMeshMZ3_EXPORT MZ3MeshIO : public MeshIOBase
56{
57public:
58 ITK_DISALLOW_COPY_AND_MOVE(MZ3MeshIO);
59
61 using Self = MZ3MeshIO;
65
68
70 itkNewMacro(Self);
71
73 itkOverrideGetNameOfClassMacro(MZ3MeshIO);
74
75 /*-------- This part of the interfaces deals with reading data. ----- */
76
82 bool
83 CanReadFile(const char * fileName) override;
84
85 void
87
89 void
90 ReadPoints(void * buffer) override;
91
92 void
93 ReadCells(void * buffer) override;
94
95 void
96 ReadPointData(void * buffer) override;
97
98 void
99 ReadCellData(void * buffer) override;
100
101 /*-------- This part of the interfaces deals with writing data. ----- */
102
108 bool
109 CanWriteFile(const char * fileName) override;
110
112 void
114
116 void
117 WritePoints(void * buffer) override;
118
119 void
120 WriteCells(void * buffer) override;
121
122 void
123 WritePointData(void * buffer) override;
124
125 void
126 WriteCellData(void * buffer) override;
127
128 void
129 Write() override;
130
131protected:
133 ~MZ3MeshIO() override;
134
135 void
136 PrintSelf(std::ostream & os, Indent indent) const override;
137
138private:
139 class MZ3MeshIOInternals;
140
141 template <typename T>
142 void
143 WritePoints(T * buffer);
144
145 template <typename T>
146 void
147 WriteCells(T * buffer);
148
149 template <typename T>
150 void
151 WritePointData(T * buffer);
152
153 std::ifstream m_Ifstream{};
154 std::ofstream m_Ofstream{};
156
157 const std::unique_ptr<MZ3MeshIOInternals> m_Internal;
158};
159} // end namespace itk
160
161#endif
Control indentation during Print() invocation.
Definition itkIndent.h:53
void ReadCells(void *buffer) override
void WritePoints(void *buffer) override
bool CanReadFile(const char *fileName) override
void WriteCells(void *buffer) override
void ReadCellData(void *buffer) override
SmartPointer< Self > Pointer
std::ofstream m_Ofstream
Superclass::StreamOffsetType StreamOffsetType
void WriteCells(T *buffer)
void WritePointData(void *buffer) override
bool CanWriteFile(const char *fileName) override
void WritePointData(T *buffer)
SmartPointer< const Self > ConstPointer
void WriteCellData(void *buffer) override
void WriteMeshInformation() override
Superclass::SizeValueType SizeValueType
void PrintSelf(std::ostream &os, Indent indent) const override
std::ifstream m_Ifstream
~MZ3MeshIO() override
void WritePoints(T *buffer)
void Write() override
void ReadPointData(void *buffer) override
void ReadPoints(void *buffer) override
MeshIOBase Superclass
void ReadMeshInformation() override
MZ3MeshIO Self
const std::unique_ptr< MZ3MeshIOInternals > m_Internal
IdentifierType SizeValueType
std::streamoff StreamOffsetType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....