This class helps to transform, export and import vtk point sets. More...
#include <VtkMeshUtil.h>
Collaboration diagram for VtkMeshUtil:Public Types | |
| enum | VtkPointSetType { UNKNOWN , UNSTRUCTURED_GRID , STRUCTURED_GRID , POLY_DATA } |
| constant for the vtk point set type More... | |
Static Public Member Functions | |
| 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.
|
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!
| 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 |
References POLY_DATA, STRUCTURED_GRID, typeOf(), UNKNOWN, and UNSTRUCTURED_GRID.
Referenced by VtkMeshComponent::VtkMeshComponent().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
static method to get the vtk header string from a vtk file
| 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 |
References POLY_DATA, STRUCTURED_GRID, typeOf(), UNKNOWN, and UNSTRUCTURED_GRID.
Referenced by VtkMeshComponent::VtkMeshComponent().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Static method that could be use to store any Geometry instance in a vtk file.
| g | the Geometry instance to save |
| vtkFileName | the name of the vtk file to use as output |
References camitk::Geometry::getLabel(), and camitk::Geometry::getPointSet().
Here is the call graph for this function:
|
static |
save a vtkDataset into a given file.
| ps | the vtkPointSet to save |
| fname | the file name to save to |
| oname | the name of the object to save (wrote in the header) |
References POLY_DATA, STRUCTURED_GRID, and UNSTRUCTURED_GRID.
Referenced by VtkMeshComponentExtension::save().
Here is the caller graph for this function:
|
static |
save a given vtkPolyData into a given file
| 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 |
save a given vtkStructuredGrid into a given file
| 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 |
save a given vtkUnstructuredGrid into a given file
| 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 |
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.
| vtkFileName | the name of the vtk file to check |
References POLY_DATA, STRUCTURED_GRID, UNKNOWN, and UNSTRUCTURED_GRID.
Referenced by buildVtkPointSet(), getVtkPointSetHeaderString(), VtkMeshComponent::VtkMeshComponent(), and vtkToGeometry().
Here is the caller graph for this function:
|
static |
static method that tells you what kind of vtkPointSet it is.
If it returns VtkManager::UNKNOWN, this is an unsupported type of vtkPointSet.
| aPointSet | the pointset data to analyze |
References POLY_DATA, STRUCTURED_GRID, UNKNOWN, and UNSTRUCTURED_GRID.
|
static |
static method that transform any vtkPointSet to a vtkPolyData.
| aPointSet | the vtkPointSet to transform |
References POLY_DATA.
Referenced by CleanPolyData::apply(), and FillWithPoints::apply().
Here is the caller graph for this function:
|
static |
Static method that could be used from anywhere to translate a vtk file to a Geometry instance.
convenient method (it is based on buildVtkPointSet).
| vtkFileName | the name of the vtk file to use as input |
References camitk::InterfaceGeometry::Surface, typeOf(), and UNKNOWN.
Here is the call graph for this function: