9 #include "imstkMeshIO.h" 13 class AbstractCellMesh;
18 class TetrahedralMesh;
34 static std::shared_ptr<PointSet> read(
const std::string& filePath,
MeshFileType meshType);
39 static bool write(
const std::shared_ptr<PointSet> imstkMesh,
const std::string& filePath,
const MeshFileType meshType);
46 template<
typename ReaderType>
47 static std::shared_ptr<PointSet> readVtkGenericFormatData(
const std::string& filePath);
52 template<
typename ReaderType>
53 static std::shared_ptr<SurfaceMesh> readVtkPolyData(
const std::string& filePath);
58 template<
typename WriterType>
59 static bool writeVtkImageData(
const std::shared_ptr<ImageData> imstkMesh,
const std::string& filePath);
64 template<
typename WriterType>
65 static bool writeVtkPolyData(
const std::shared_ptr<SurfaceMesh> imstkMesh,
const std::string& filePath);
70 template<
typename WriterType>
71 static bool writeVtkPolyData(
const std::shared_ptr<LineMesh> imstkMesh,
const std::string& filePath);
76 template<
typename WriterType>
77 static bool writeVtkPointSet(
const std::shared_ptr<PointSet> imstkMesh,
const std::string& filePath);
82 template<
typename WriterType>
84 template<
typename WriterType>
91 template<
typename ReaderType>
97 template<
typename ReaderType>
98 static std::shared_ptr<ImageData>
readVtkImageData(
const std::string& filePath);
118 static bool writeMetaImageData(std::shared_ptr<ImageData> imageData,
const std::string& filePath);
Implements VTK read and write functions.
static std::shared_ptr< AbstractCellMesh > readVtkUnstructuredGrid(const std::string &filePath)
Reads vtk unstructured grid. Drops cells that aren't of the last cell type.
static std::shared_ptr< ImageData > readVtkImageDataNIFTI(const std::string &filePath)
Reads nifti/nii format image data.
MeshFileType
Enumeration the mesh file type.
static bool writeVtkPolyData(const std::shared_ptr< SurfaceMesh > imstkMesh, const std::string &filePath)
Writes the given surface mesh to given file path using the provided writer type.
static bool writeVtkImageData(const std::shared_ptr< ImageData > imstkMesh, const std::string &filePath)
Writes the given image data to given file path using the provided writer type.
static bool writeVtkImageDataNIFTI(std::shared_ptr< ImageData > imageData, const std::string &filePath)
Write nifti/nii format image data.
static bool write(const std::shared_ptr< PointSet > imstkMesh, const std::string &filePath, const MeshFileType meshType)
Writes the given mesh to the specified file path.
static std::shared_ptr< ImageData > readVtkImageDataDICOM(const std::string &filePath)
TODO.
static bool writeVtkUnstructuredGrid(const std::shared_ptr< TetrahedralMesh > tetMesh, const std::string &filePath)
Writes the given volumetric mesh to given file path.
static bool writeMetaImageData(std::shared_ptr< ImageData > imageData, const std::string &filePath)
Write meta/mhd format image data.
static bool writeVtkPointSet(const std::shared_ptr< PointSet > imstkMesh, const std::string &filePath)
Writes the given point set to given file path using the provided writer type.
static std::shared_ptr< ImageData > readVtkImageData(const std::string &filePath)
Reads vtk image data.