UsTK : Ultrasound ToolKit  version 2.0.1 under development (2024-11-21)
Tutorial: UsTK volumic mesh deformation and visualisation (Qt + VTK)

Introduction

This tutorial expains how to run the GUI tutorial displaying a mesh in a 3D scene (based on Qt and VTK libraries), and move a mesh node.

Formatting correctly your mesh to volumetric (optionnal)

If you have only a surfacic mesh, you'll have to convert it to volumetric. For this, tetgen tool is used (http://wias-berlin.de/software/tetgen/tetgen143.html). Once you compiled it, simply run the following command in build directory:

$ ./tetgen mesh.vtk -K

We assume "mesh.vtk" is a surfacic mesh you want to transform into tetrahedral mesh. Your output mesh will be "mesh.1.vtk"

Running the application with pre-generated mesh

Before running the application with a pre-genrated liver mesh, make sure you set USTK_DATASET_PATH environment variable to ustk-dataset repository. Then, simply run:

$ ./tutorial/ustk/meshDeformation/meshDeformation

To deform your mesh, use up and down keyboard arrows. It will move the first node of your mesh along Y axis

Running the application with the mesh of your choice

To use the mesh of your choice, you'll have to specify it in the code. In tutorial-mesh-deformation.cpp, simply enter your mesh filename instead of the "liver.vtk" in the following line :

std::string filename = us::getDataSetPath() + "/mesh/liver.vtk";
VISP_EXPORT std::string getDataSetPath()
Definition: us.cpp:54