#include <MarchingCubeUtility.h>
Public Member Functions | |
| MarchingCubeUtility () | |
| ~MarchingCubeUtility () | |
| void | setDataResolution (const type::Vec3i &resolution) |
| void | setDataVoxelSize (const type::Vec3 &voxelSize) |
| void | setStep (const unsigned int step) |
| void | setConvolutionSize (const unsigned int convolutionSize) |
| void | setBoundingBoxFromRealCoords (const type::Vec3 &min, const type::Vec3 &max) |
| Set the bounding box from real coords to apply mCube locally. More... | |
| void | setROI (const type::Vec3i &min, const type::Vec3i &max) |
| Set the bounding box (in the data space) to apply mCube locally. More... | |
| void | setBoundingBox (const type::Vec6i &roi) |
| Set the bounding box (in the data space) to apply mCube locally. More... | |
| void | setBoundingBox (const type::Vec3i &min, const type::Vec3i &max) |
| Set the bounding box (in the data space) to apply mCube locally. More... | |
| void | run (unsigned char *data, const float isolevel, sofa::type::vector< PointID > &triangles, sofa::type::vector< type::Vec3 > &vertices, type::vector< type::vector< unsigned int > > *triangleIndexInRegularGrid=nullptr) const |
| void | run (unsigned char *_data, const sofa::type::vector< type::Vec3i > &seeds, const float isolevel, sofa::type::vector< PointID > &mesh, sofa::type::vector< type::Vec3 > &vertices, std::map< type::Vec3, PointID > &map_vertices, type::vector< type::vector< unsigned int > > *triangleIndexInRegularGrid, bool propagate) const |
| void | run (unsigned char *data, const vector< type::Vec3i > &seeds, const float isolevel, sofa::type::vector< PointID > &triangles, sofa::type::vector< type::Vec3 > &vertices, type::vector< type::vector< unsigned int > > *triangleIndexInRegularGrid=nullptr, bool propagate=true) const |
| void | run (unsigned char *data, const float isolevel, sofa::helper::io::Mesh &m) const |
| void | findSeeds (vector< type::Vec3i > &seeds, const float isoValue, unsigned char *_data) |
| given a set of data, find seeds to run quickly. More... | |
| void | findSeedsFromRealCoords (vector< type::Vec3i > &mCubeCoords, const vector< type::Vec3 > &realCoords) const |
| Given coords in the scene, find seeds coords. More... | |
| void | setVerticesIndexOffset (unsigned int verticesIndexOffset) |
| Set the offset to add to each new vertex index in the triangles array. More... | |
| void | setVerticesTranslation (type::Vec3 verticesTranslation) |
| Set the translation to add to each new vertex in the triangles array. More... | |
| sofa::helper::MarchingCubeUtility::MarchingCubeUtility | ( | ) |
|
inline |
| void sofa::helper::MarchingCubeUtility::findSeeds | ( | vector< type::Vec3i > & | seeds, |
| const float | isoValue, | ||
| unsigned char * | _data | ||
| ) |
given a set of data, find seeds to run quickly.
| void sofa::helper::MarchingCubeUtility::findSeedsFromRealCoords | ( | vector< type::Vec3i > & | mCubeCoords, |
| const vector< type::Vec3 > & | realCoords | ||
| ) | const |
Given coords in the scene, find seeds coords.
| void sofa::helper::MarchingCubeUtility::run | ( | unsigned char * | _data, |
| const sofa::type::vector< type::Vec3i > & | seeds, | ||
| const float | isolevel, | ||
| sofa::type::vector< PointID > & | mesh, | ||
| sofa::type::vector< type::Vec3 > & | vertices, | ||
| std::map< type::Vec3, PointID > & | map_vertices, | ||
| type::vector< type::vector< unsigned int > > * | triangleIndexInRegularGrid, | ||
| bool | propagate | ||
| ) | const |
Same as the previous function but the surfaces are constructed by propagating from seeds. Faster than previous but it need the precomputation of the seeds.
| void sofa::helper::MarchingCubeUtility::run | ( | unsigned char * | data, |
| const float | isolevel, | ||
| sofa::helper::io::Mesh & | m | ||
| ) | const |
given a set of data (size of the data and size of the marching cube beeing defined previously), we construct a Sofa mesh.
| void sofa::helper::MarchingCubeUtility::run | ( | unsigned char * | data, |
| const float | isolevel, | ||
| sofa::type::vector< PointID > & | triangles, | ||
| sofa::type::vector< type::Vec3 > & | vertices, | ||
| type::vector< type::vector< unsigned int > > * | triangleIndexInRegularGrid = nullptr |
||
| ) | const |
given a set of data (size of the data and size of the marching cube beeing defined previously), we construct the surface. mesh is a vector containing the triangles defined as a sequence of three indices map_indices gives the correspondence between an indice and a 3d position in space
| void sofa::helper::MarchingCubeUtility::run | ( | unsigned char * | data, |
| const vector< type::Vec3i > & | seeds, | ||
| const float | isolevel, | ||
| sofa::type::vector< PointID > & | triangles, | ||
| sofa::type::vector< type::Vec3 > & | vertices, | ||
| type::vector< type::vector< unsigned int > > * | triangleIndexInRegularGrid = nullptr, |
||
| bool | propagate = true |
||
| ) | const |
Same as the previous function but the surfaces are constructed by propagating from seeds. Faster than previous but it need the precomputation of the seeds.
|
inline |
Set the bounding box (in the data space) to apply mCube locally.
|
inline |
Set the bounding box (in the data space) to apply mCube locally.
|
inline |
Set the bounding box from real coords to apply mCube locally.
|
inline |
|
inline |
|
inline |
|
inline |
Set the bounding box (in the data space) to apply mCube locally.
Set the offset to add to each new vertex index in the triangles array.
| void sofa::helper::MarchingCubeUtility::setVerticesTranslation | ( | type::Vec3 | verticesTranslation | ) |
Set the translation to add to each new vertex in the triangles array.