7 #include "imstkMeshIO.h" 8 #include "imstkTetrahedralMesh.h" 9 #include "imstkVegaMeshIO.h" 10 #include "imstkVTKMeshIO.h" 12 using namespace imstk;
14 const std::string defaultFileName = iMSTK_DATA_ROOT
"textured_organs/heart_volume.vtk";
17 main(
int argc,
char** argv)
19 std::string vtkFileName = defaultFileName;
20 std::string vegaFileName =
"convertedMesh.veg";
24 vtkFileName = std::string(argv[1]);
27 auto tetMesh = MeshIO::read<TetrahedralMesh>(vtkFileName);
28 tetMesh->rotate(Vec3d(1.0, 0.0, 0.0), -1.3, Geometry::TransformType::ApplyToData);
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 bool write(const std::shared_ptr< imstk::PointSet > imstkMesh, const std::string &filePath, const MeshFileType meshType)
Write a volumetric mesh in vega file format.