fw4spl
|
Helper to manage vtkPolyData and fwData::Mesh. More...
#include <Mesh.hpp>
Static Public Member Functions | |
static FWVTKIO_API void | fromVTKMesh (vtkSmartPointer< vtkPolyData > _polyData,::fwData::Mesh::sptr _mesh) |
Convert a vtkPolyData to a ::fwData::Mesh::sptr. More... | |
static FWVTKIO_API void | fromVTKGrid (vtkSmartPointer< vtkUnstructuredGrid > grid,::fwData::Mesh::sptr mesh) |
Convert a vtkUnstructuredGrid to a ::fwData::Mesh::sptr. More... | |
static FWVTKIO_API void | toVTKGrid (const ::fwData::Mesh::csptr &mesh, vtkSmartPointer< vtkUnstructuredGrid > grid) |
Convert a ::fwData::Mesh::csptr to a vtkUnstructuredGrid. More... | |
static FWVTKIO_API void | toVTKMesh (const ::fwData::Mesh::csptr &_mesh, vtkSmartPointer< vtkPolyData > _polyData) |
Convert a ::fwData::Mesh::csptr to a vtkPolyData. More... | |
static FWVTKIO_API void | updatePolyDataPoints (vtkSmartPointer< vtkPolyData > polyDataDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkPolyData with ::fwData::Mesh::sptr points. More... | |
static FWVTKIO_API void | updatePolyDataPointColor (vtkSmartPointer< vtkPolyData > polyDataDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkPolyData with point color of fwData::Mesh. More... | |
static FWVTKIO_API void | updatePolyDataCellColor (vtkSmartPointer< vtkPolyData > polyDataDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkPolyData with cell color of fwData::Mesh. More... | |
static FWVTKIO_API void | updatePolyDataPointNormals (vtkSmartPointer< vtkPolyData > polyDataDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkPolyData with point normals of fwData::Mesh. More... | |
static FWVTKIO_API void | updatePolyDataCellNormals (vtkSmartPointer< vtkPolyData > polyDataDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkPolyData with cell normals of fwData::Mesh. More... | |
static FWVTKIO_API void | updatePolyDataPointTexCoords (vtkSmartPointer< vtkPolyData > polyDataDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkPolyData with point texCoords of fwData::Mesh. More... | |
static FWVTKIO_API void | updatePolyDataCellTexCoords (vtkSmartPointer< vtkPolyData > polyDataDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkPolyData with cell texCoords of fwData::Mesh. More... | |
static FWVTKIO_API void | updateGridPoints (vtkSmartPointer< vtkUnstructuredGrid > gridDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkUnstructuredGrid with ::fwData::Mesh::sptr points. More... | |
static FWVTKIO_API void | updateGridPointColor (vtkSmartPointer< vtkUnstructuredGrid > gridDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkUnstructuredGrid with point color of fwData::Mesh. More... | |
static FWVTKIO_API void | updateGridCellColor (vtkSmartPointer< vtkUnstructuredGrid > gridDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkUnstructuredGrid with cell color of fwData::Mesh. More... | |
static FWVTKIO_API void | updateGridPointNormals (vtkSmartPointer< vtkUnstructuredGrid > gridDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkUnstructuredGrid with point normals of fwData::Mesh. More... | |
static FWVTKIO_API void | updateGridCellNormals (vtkSmartPointer< vtkUnstructuredGrid > gridDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkUnstructuredGrid with cell normals of fwData::Mesh. More... | |
static FWVTKIO_API void | updateGridPointTexCoords (vtkSmartPointer< vtkUnstructuredGrid > gridDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkUnstructuredGrid with point texCoords of fwData::Mesh. More... | |
static FWVTKIO_API void | updateGridCellTexCoords (vtkSmartPointer< vtkUnstructuredGrid > gridDst, const ::fwData::Mesh::csptr &meshSrc) |
Update a vtkUnstructuredGrid with cell texCoords of fwData::Mesh. More... | |
static FWVTKIO_API double | computeVolume (const ::fwData::Mesh::csptr &mesh) |
Compute the volume of the mesh using MassProperties vtk class. More... | |
Helper to manage vtkPolyData and fwData::Mesh.
Definition at line 26 of file io/fwVtkIO/include/fwVtkIO/helper/Mesh.hpp.
|
static |
Compute the volume of the mesh using MassProperties vtk class.
[in] | mesh | current mesh |
Definition at line 835 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References OSLM_DEBUG, and toVTKMesh().
|
static |
Convert a vtkUnstructuredGrid to a ::fwData::Mesh::sptr.
[in] | grid | vtkUnstructuredGrid. |
[out] | mesh | ::fwData::Mesh::sptr. |
Definition at line 214 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Mesh::insertNextCell(), fwDataTools::helper::Mesh::insertNextPoint(), fwDataTools::helper::Mesh::setCellColor(), fwDataTools::helper::Mesh::setCellNormal(), fwDataTools::helper::Mesh::setCellTexCoord(), fwDataTools::helper::Mesh::setPointColor(), fwDataTools::helper::Mesh::setPointNormal(), fwDataTools::helper::Mesh::setPointTexCoord(), SLM_ASSERT, and fwDataTools::helper::Mesh::updateLock().
Referenced by fwVtkIO::SeriesDBReader::~SeriesDBReader().
|
static |
Convert a vtkPolyData to a ::fwData::Mesh::sptr.
[in] | _polyData | vtkPolyData. |
[out] | _mesh | ::fwData::Mesh::sptr. |
Definition at line 35 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Mesh::insertNextCell(), fwDataTools::helper::Mesh::insertNextPoint(), fwDataTools::helper::Mesh::setCellColor(), fwDataTools::helper::Mesh::setCellNormal(), fwDataTools::helper::Mesh::setCellTexCoord(), fwDataTools::helper::Mesh::setPointColor(), fwDataTools::helper::Mesh::setPointNormal(), fwDataTools::helper::Mesh::setPointTexCoord(), SLM_ASSERT, and fwDataTools::helper::Mesh::updateLock().
Referenced by fwVtkIO::MeshReader::read(), opVTKMesh::SVTKMesher::updating(), opVTKMesh::action::SMeshCreation::updating(), and fwVtkIO::SeriesDBReader::~SeriesDBReader().
|
static |
Convert a ::fwData::Mesh::csptr to a vtkUnstructuredGrid.
[in] | mesh | ::fwData::Mesh::csptr. |
[out] | grid | vtkUnstructuredGrid. |
Definition at line 480 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::MeshGetter::getCellData(), fwDataTools::helper::MeshGetter::getCellDataOffsets(), fwDataTools::helper::MeshGetter::getCellTypes(), updateGridCellColor(), updateGridCellNormals(), updateGridCellTexCoords(), updateGridPointColor(), updateGridPointNormals(), updateGridPoints(), and updateGridPointTexCoords().
|
static |
Convert a ::fwData::Mesh::csptr to a vtkPolyData.
[in] | _mesh | ::fwData::Mesh::csptr. |
[out] | _polyData | vtkPolyData. |
Definition at line 393 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::MeshGetter::getCellData(), fwDataTools::helper::MeshGetter::getCellDataOffsets(), fwDataTools::helper::MeshGetter::getCellTypes(), updatePolyDataCellColor(), updatePolyDataCellNormals(), updatePolyDataCellTexCoords(), updatePolyDataPointColor(), updatePolyDataPointNormals(), updatePolyDataPoints(), and updatePolyDataPointTexCoords().
Referenced by computeVolume(), vtkSimpleMesh::SRenderer::notifyCamPositionUpdated(), visuVTKAdaptor::SMeshesBoxWidget::updateMeshMapFromComposite(), visuVTKAdaptor::SMesh::updateOptionsMode(), vtkCompositeMesh::RendererService::updating(), visuVTKAdaptor::SMeshNormals::updating(), vtkSimpleMesh::SRenderer::updating(), fwVtkIO::MeshWriter::write(), and fwVtkIO::ModelSeriesObjWriter::~ModelSeriesObjWriter().
|
static |
Update a vtkUnstructuredGrid with cell color of fwData::Mesh.
[out] | gridDataDst | vtkUnstructuredGrid |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkUnstructuredGrid
Definition at line 993 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKGrid().
|
static |
Update a vtkUnstructuredGrid with cell normals of fwData::Mesh.
[out] | gridDataDst | vtkUnstructuredGrid |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkUnstructuredGrid
Definition at line 1037 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKGrid().
|
static |
Update a vtkUnstructuredGrid with cell texCoords of fwData::Mesh.
[out] | gridDataDst | vtkUnstructuredGrid |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkUnstructuredGrid
Definition at line 1124 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKGrid().
|
static |
Update a vtkUnstructuredGrid with point color of fwData::Mesh.
[out] | gridDataDst | vtkUnstructuredGrid |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkUnstructuredGrid
Definition at line 950 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKGrid().
|
static |
Update a vtkUnstructuredGrid with point normals of fwData::Mesh.
[out] | gridDataDst | vtkUnstructuredGrid |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkUnstructuredGrid
Definition at line 881 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKGrid().
|
static |
Update a vtkUnstructuredGrid with ::fwData::Mesh::sptr points.
[out] | gridDataDst | vtkUnstructuredGrid |
[in] | meshSrc | ::fwData::Mesh::sptr |
Warning : be careful with updatePoints : this may change the number of vertex of the vtkUnstructuredGrid, cells will not be updated. Returns the updated vtkUnstructuredGrid
Definition at line 924 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::MeshGetter::getPoints(), and SLM_ASSERT.
Referenced by toVTKGrid().
|
static |
Update a vtkUnstructuredGrid with point texCoords of fwData::Mesh.
[out] | gridDataDst | vtkUnstructuredGrid |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkUnstructuredGrid
Definition at line 1081 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKGrid().
|
static |
Update a vtkPolyData with cell color of fwData::Mesh.
[out] | polyDataDst | vtkPolyData |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkPolyPata
Definition at line 620 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKMesh(), and visuVTKAdaptor::SMesh::updateCellColors().
|
static |
Update a vtkPolyData with cell normals of fwData::Mesh.
[out] | polyDataDst | vtkPolyData |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkPolyPata
Definition at line 707 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKMesh(), visuVTKAdaptor::SMeshNormals::updateCellNormals(), visuVTKAdaptor::SMesh::updateCellNormals(), and vtkSimpleMesh::SRenderer::updating().
|
static |
Update a vtkPolyData with cell texCoords of fwData::Mesh.
[out] | polyDataDst | vtkPolyData |
[in] | meshSrc | ::fwData::Mesh::sptr |
Definition at line 792 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKMesh(), and visuVTKAdaptor::SMesh::updateCellTexCoords().
|
static |
Update a vtkPolyData with point color of fwData::Mesh.
[out] | polyDataDst | vtkPolyData |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkPolyPata
Definition at line 578 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKMesh(), visuVTKAdaptor::SMesh::updatePointColors(), and vtkSimpleMesh::SRenderer::updating().
|
static |
Update a vtkPolyData with point normals of fwData::Mesh.
[out] | polyDataDst | vtkPolyData |
[in] | meshSrc | ::fwData::Mesh::sptr |
Returns the updated vtkPolyPata
Definition at line 665 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKMesh(), visuVTKAdaptor::SMeshNormals::updatePointNormals(), visuVTKAdaptor::SMesh::updatePointNormals(), visuVTKAdaptor::SMeshNormals::updateVertex(), and vtkSimpleMesh::SRenderer::updating().
|
static |
Update a vtkPolyData with ::fwData::Mesh::sptr points.
[out] | polyDataDst | vtkPolyData |
[in] | meshSrc | ::fwData::Mesh::sptr |
Warning : be careful with updatePoints : this may change the number of vertex of the polydata, cells will not be updated. Returns the updated vtkPolyPata
Definition at line 551 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::MeshGetter::getPoints(), and SLM_ASSERT.
Referenced by toVTKMesh(), visuVTKAdaptor::SMeshNormals::updateVertex(), visuVTKAdaptor::SMesh::updateVertex(), and vtkSimpleMesh::SRenderer::updating().
|
static |
Update a vtkPolyData with point texCoords of fwData::Mesh.
[out] | polyDataDst | vtkPolyData |
[in] | meshSrc | ::fwData::Mesh::sptr |
Definition at line 750 of file io/fwVtkIO/src/fwVtkIO/helper/Mesh.cpp.
References fwDataTools::helper::Array::begin(), and SLM_ASSERT.
Referenced by toVTKMesh(), and visuVTKAdaptor::SMesh::updatePointTexCoords().