18 #ifndef itkMeshFileReader_h
19 #define itkMeshFileReader_h
78 template <
typename TOutputMesh,
79 typename ConvertPointPixelTraits = MeshConvertPixelTraits<typename TOutputMesh::PixelType>,
80 typename ConvertCellPixelTraits = MeshConvertPixelTraits<typename TOutputMesh::CellPixelType>>
122 static constexpr
unsigned int OutputPointDimension = OutputMeshType::PointDimension;
125 itkSetStringMacro(FileName);
126 itkGetStringMacro(FileName);
137 itkGetModifiableObjectMacro(MeshIO,
MeshIOBase);
143 GenerateOutputInformation()
override;
145 template <
typename T>
147 ReadPoints(T * buffer);
149 template <
typename T>
151 ReadCells(T * buffer);
163 PrintSelf(std::ostream & os,
Indent indent)
const override;
166 template <
typename T>
168 ConvertPointPixelBuffer(
void * inputData, T * outputData,
size_t numberOfPixels);
170 template <
typename T>
172 ConvertCellPixelBuffer(
void * inputData, T * outputData,
size_t numberOfPixels);
180 TestFileExistanceAndReadability();
184 GenerateData()
override;
187 bool m_UserSpecifiedMeshIO{};
189 std::string m_FileName{};
192 template <
typename T>
194 ReadPointsUsingMeshIO();
196 template <
typename T>
198 ReadCellsUsingMeshIO();
200 std::string m_ExceptionMessage{};
213 template <
typename TOutputMesh,
214 typename ConvertPointPixelTraits = MeshConvertPixelTraits<typename TOutputMesh::PixelType>,
215 typename ConvertCellPixelTraits = MeshConvertPixelTraits<typename TOutputMesh::CellPixelType>>
220 reader->SetFileName(filename);
222 return reader->GetOutput();
228 #ifndef ITK_MANUAL_INSTANTIATION
229 # include "itkMeshFileReader.hxx"
232 #if defined ITK_MESHIO_FACTORY_REGISTER_MANAGER || defined ITK_IO_FACTORY_REGISTER_MANAGER
233 # include "itkMeshIOFactoryRegisterManager.h"