18#ifndef itkMeshFileWriter_h
19#define itkMeshFileWriter_h
51template <
typename TInputMesh>
89 itkSetStringMacro(FileName);
90 itkGetStringMacro(FileName);
142 itkSetMacro(UseCompression,
bool);
143 itkGetConstReferenceMacro(UseCompression,
bool);
144 itkBooleanMacro(UseCompression);
153 template <
typename Output>
157 template <
typename Output>
161 template <
typename Output>
165 template <
typename Output>
195template <
typename TMeshPo
inter>
196ITK_TEMPLATE_EXPORT
void
197WriteMesh(TMeshPointer && mesh,
const std::string & filename,
bool compress =
false)
199 using NonReferenceMeshPointer = std::remove_reference_t<TMeshPointer>;
200 static_assert(std::is_pointer_v<NonReferenceMeshPointer> || mpl::IsSmartPointer<NonReferenceMeshPointer>::Value,
201 "WriteMesh requires a raw pointer or SmartPointer.");
204 using MeshType = std::remove_const_t<std::remove_reference_t<
decltype(*mesh)>>;
206 writer->SetInput(mesh);
207 writer->SetFileName(filename);
208 writer->SetUseCompression(compress);
214#ifndef ITK_MANUAL_INSTANTIATION
215# include "itkMeshFileWriter.hxx"
218#if defined ITK_MESHIO_FACTORY_REGISTER_MANAGER || defined ITK_IO_FACTORY_REGISTER_MANAGER
219# include "itkMeshIOFactoryRegisterManager.h"
Control indentation during Print() invocation.
bool m_FactorySpecifiedMeshIO
void SetFileTypeAsASCII()
typename InputMeshType::Pointer InputMeshPointer
typename MeshIOBase::SizeValueType SizeValueType
SmartPointer< const Self > ConstPointer
void SetInput(const InputMeshType *input)
const InputMeshType * GetInput()
MeshIOBase::Pointer m_MeshIO
bool m_UserSpecifiedMeshIO
void CopyPointDataToBuffer(Output *data)
void CopyPointsToBuffer(Output *data)
void SetFileTypeAsBINARY()
~MeshFileWriter() override=default
const InputMeshType * GetInput(unsigned int idx)
void PrintSelf(std::ostream &os, Indent indent) const override
void CopyCellDataToBuffer(Output *data)
void SetMeshIO(MeshIOBase *io)
SmartPointer< Self > Pointer
typename InputMeshType::RegionType InputMeshRegionType
typename InputMeshType::PixelType InputMeshPixelType
void CopyCellsToBuffer(Output *data)
typename InputMeshType::CellType InputMeshCellType
Abstract superclass defines mesh IO interface.
SmartPointer< Self > Pointer
IdentifierType SizeValueType
virtual void Modified() const
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITK_TEMPLATE_EXPORT void WriteMesh(TMeshPointer &&mesh, const std::string &filename, bool compress=false)