iMSTK
Interactive Medical Simulation Toolkit
|
This filter computes exact signed distance fields using octrees and pseudonormal computations. One might need to adjust the tolerance depending on dataset scale. The bounds for the image can be set in the filter, when none are set the bounding box of the mesh is used, the margin. When providing your own bounds a box larger than the original object might be necessary depending on shape. More...
#include <imstkSurfaceMeshDistanceTransform.h>
Public Member Functions | |
void | setInputMesh (std::shared_ptr< SurfaceMesh > surfMesh) |
Required input, port 0. | |
std::shared_ptr< ImageData > | getOutputImage () |
void | setupDistFunc () |
Vec3d | getNearestPoint (const Vec3d &pos) |
Get the nearest point. | |
imstkSetMacro (Dimensions, const Vec3i &) | |
Dimensions of distance transform to fill. | |
void | setDimensions (int dimX, int dimY, int dimZ) |
imstkGetMacro (Dimensions, const Vec3i &) | |
void | setBounds (const Vec3d &min, const Vec3d &max) |
Optionally one may specify bounds, if not specified bounds of the input SurfaceMesh is used. More... | |
void | setBounds (const Vec6d &) |
imstkGetMacro (Bounds, const Vec6d &) | |
imstkSetMacro (NarrowBanded, bool) | |
If on, will compute only a narrow banded transform. | |
imstkGetMacro (NarrowBanded, bool) | |
imstkSetMacro (DilateSize, int) | |
Width of the band. | |
imstkGetMacro (DilateSize, int) | |
imstkSetMacro (Tolerance, double) | |
imstkGetMacro (Tolerance, double) | |
![]() | |
std::shared_ptr< Geometry > | getInput (size_t port=0) const |
Returns input geometry given port, returns nullptr if doesn't exist. | |
std::shared_ptr< Geometry > | getOutput (size_t port=0) const |
Returns output geometry given port, returns nullptr if doesn't exist. | |
void | setInput (std::shared_ptr< Geometry > inputGeometry, size_t port=0) |
Set the input at the port. | |
void | update () |
Do the actual algorithm. | |
Protected Member Functions | |
void | requestUpdate () override |
Users can implement this for the logic to be run. | |
![]() | |
void | setOutput (std::shared_ptr< Geometry > inputGeometry, const size_t port=0) |
Set the output at the port. | |
template<typename T > | |
void | setRequiredInputType (const size_t port) |
Declares the type for the port with the given number, also defines that the give port is required for the filter to run correctly. | |
template<typename T > | |
void | setOptionalInputType (const size_t port) |
Declares the type for the port with the given number, the data for this port is optional and may be omitted. | |
virtual bool | areInputsValid () |
Check inputs are correct. More... | |
void | setNumInputPorts (const size_t numPorts) |
Get/Set the amount of input ports. | |
imstkGetMacro (NumInputPorts, size_t) | |
void | setNumOutputPorts (const size_t numPorts) |
Get/Set the amount of output ports. | |
imstkGetMacro (NumOutputPorts, size_t) | |
Additional Inherited Members | |
![]() | |
using | GeometryCheck = std::function< bool(Geometry *)> |
using | TypeCheckContainer = std::unordered_map< size_t, GeometryCheck > |
![]() | |
TypeCheckContainer | m_requiredTypeChecks |
TypeCheckContainer | m_optionalTypeChecks |
This filter computes exact signed distance fields using octrees and pseudonormal computations. One might need to adjust the tolerance depending on dataset scale. The bounds for the image can be set in the filter, when none are set the bounding box of the mesh is used, the margin. When providing your own bounds a box larger than the original object might be necessary depending on shape.
Definition at line 30 of file imstkSurfaceMeshDistanceTransform.h.
void imstk::SurfaceMeshDistanceTransform::setBounds | ( | const Vec3d & | min, |
const Vec3d & | max | ||
) |
Optionally one may specify bounds, if not specified bounds of the input SurfaceMesh is used.
note Vec6d is be of the format [minX, maxX, minY, maxY, minZ, maxZ]
Definition at line 231 of file imstkSurfaceMeshDistanceTransform.cpp.