This class helps to transform, export and import vtk point sets.
More...
#include <VtkMeshUtil.h>
|
static vtkSmartPointer
< vtkPointSet > | buildVtkPointSet (std::string vtkFileName, VtkPointSetType whatIsIt=UNKNOWN) |
| Static method that could be used from anywhere to build a vtkPointSet from a vtk file. More...
|
|
static std::string | getVtkPointSetHeaderString (std::string vtkFileName, VtkPointSetType whatIsIt=UNKNOWN) |
| static method to get the vtk header string from a vtk file More...
|
|
static bool | saveGeometryToFile (camitk::Geometry *g, std::string vtkFileName) |
| Static method that could be use to store any Geometry instance in a vtk file. More...
|
|
static bool | savePointSetToFile (vtkSmartPointer< vtkPointSet > ps, std::string fname, std::string oname="") |
| save a vtkDataset into a given file. More...
|
|
static void | savePolyDataToFile (vtkSmartPointer< vtkPolyData > pData, std::string fname, std::string oname="") |
| save a given vtkPolyData into a given file More...
|
|
static void | saveStructuredGridToFile (vtkSmartPointer< vtkStructuredGrid > sGrid, std::string fname, std::string oname="") |
| save a given vtkStructuredGrid into a given file More...
|
|
static void | saveUnstructuredGridToFile (vtkSmartPointer< vtkUnstructuredGrid > uGrid, std::string fname, std::string oname="") |
| save a given vtkUnstructuredGrid into a given file More...
|
|
static VtkPointSetType | typeOf (std::string vtkFileName) |
| static method that tells you what kind of vtk file it is. More...
|
|
static VtkMeshUtil::VtkPointSetType | typeOf (vtkSmartPointer< vtkPointSet > aPointSet) |
| static method that tells you what kind of vtkPointSet it is. More...
|
|
static vtkSmartPointer
< vtkPolyData > | vtkPointSetToVtkPolyData (vtkSmartPointer< vtkPointSet > aPointSet) |
| static method that transform any vtkPointSet to a vtkPolyData. More...
|
|
static camitk::Geometry * | vtkToGeometry (std::string vtkFileName) |
| Static method that could be used from anywhere to translate a vtk file to a Geometry instance. More...
|
|
This class helps to transform, export and import vtk point sets.
- Note
- As it is a pure transformer, all the methods are static.
static vtkSmartPointer<vtkPointSet> VtkMeshUtil::buildVtkPointSet |
( |
std::string |
vtkFileName, |
|
|
VtkPointSetType |
whatIsIt = UNKNOWN |
|
) |
| |
|
static |
Static method that could be used from anywhere to build a vtkPointSet from a vtk file.
Currently only vtkUnstructuredGrid, vtkPolyData and vtkStructuredGrid are supported. To support more file format build a specific component extension!
- Parameters
-
vtkFileName | the name of the vtk file to use as input |
whatIsIt | (optional) if you already know the file type, it is quicker to give it here |
- Returns
- the new vtkPointSet
static std::string VtkMeshUtil::getVtkPointSetHeaderString |
( |
std::string |
vtkFileName, |
|
|
VtkPointSetType |
whatIsIt = UNKNOWN |
|
) |
| |
|
static |
static method to get the vtk header string from a vtk file
- Parameters
-
vtkFileName | the name of the vtk file to get the header from |
whatIsIt | (optional) if you already know the file type, it is quicker to give it here |
- Returns
- the header string
static bool VtkMeshUtil::saveGeometryToFile |
( |
camitk::Geometry * |
g, |
|
|
std::string |
vtkFileName |
|
) |
| |
|
static |
Static method that could be use to store any Geometry instance in a vtk file.
- Parameters
-
g | the Geometry instance to save |
vtkFileName | the name of the vtk file to use as output |
- Returns
- true if everything was saved ok.
static bool VtkMeshUtil::savePointSetToFile |
( |
vtkSmartPointer< vtkPointSet > |
ps, |
|
|
std::string |
fname, |
|
|
std::string |
oname = "" |
|
) |
| |
|
static |
save a vtkDataset into a given file.
- Parameters
-
ps | the vtkPointSet to save |
fname | the file name to save to |
oname | the name of the object to save (wrote in the header) |
static void VtkMeshUtil::savePolyDataToFile |
( |
vtkSmartPointer< vtkPolyData > |
pData, |
|
|
std::string |
fname, |
|
|
std::string |
oname = "" |
|
) |
| |
|
static |
save a given vtkPolyData into a given file
- Parameters
-
pData | the vtkPolyData to save |
fname | the file name to save to |
oname | the name of the object to save (wrote in the header) |
static void VtkMeshUtil::saveStructuredGridToFile |
( |
vtkSmartPointer< vtkStructuredGrid > |
sGrid, |
|
|
std::string |
fname, |
|
|
std::string |
oname = "" |
|
) |
| |
|
static |
save a given vtkStructuredGrid into a given file
- Parameters
-
sGrid | the vtkStructuredGrid to save |
fname | the file name to save to |
oname | the name of the object to save (wrote in the header) |
static void VtkMeshUtil::saveUnstructuredGridToFile |
( |
vtkSmartPointer< vtkUnstructuredGrid > |
uGrid, |
|
|
std::string |
fname, |
|
|
std::string |
oname = "" |
|
) |
| |
|
static |
save a given vtkUnstructuredGrid into a given file
- Parameters
-
uGrid | the vtkUnstructuredGrid to save |
fname | the file name to save to |
oname | the name of the object to save (wrote in the header) |
static method that tells you what kind of vtk file it is.
If it returns VtkManager::UNKNOWN, it means the vtk data are not supported.
- Parameters
-
vtkFileName | the name of the vtk file to check |
- Returns
- the VtkPointSetType of the file given in parameter
static method that tells you what kind of vtkPointSet it is.
If it returns VtkManager::UNKNOWN, this is an unsupported type of vtkPointSet.
- Parameters
-
aPointSet | the pointset data to analyze |
- Returns
- the VtkPointSetType of the file given in parameter
static vtkSmartPointer<vtkPolyData> VtkMeshUtil::vtkPointSetToVtkPolyData |
( |
vtkSmartPointer< vtkPointSet > |
aPointSet | ) |
|
|
static |
static method that transform any vtkPointSet to a vtkPolyData.
- If the vtkPointSet is already a vtkPolyData, nothing is done.
- If the vtkPointSet is a vtkUnstructuredGrid or vtkStructuredGrid, then it uses a vtkDataSetSurfaceFilter to extract the surface
- Parameters
-
aPointSet | the vtkPointSet to transform |
- Returns
- the vtkPolyData corresponding
Static method that could be used from anywhere to translate a vtk file to a Geometry instance.
convenient method (it is based on buildVtkPointSet).
- Parameters
-
vtkFileName | the name of the vtk file to use as input |
- Returns
- the new Geometry instance
The documentation for this class was generated from the following file: