iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | List of all members
imstk::LocalMarchingCubes Class Reference

This filter extracts a contour SurfaceMesh from an image given an isovalue. Users should prefer imstkFlyingEdges over this unless sparse/local processing is needed. More...

#include <imstkLocalMarchingCubes.h>

Inheritance diagram for imstk::LocalMarchingCubes:
Inheritance graph
[legend]
Collaboration diagram for imstk::LocalMarchingCubes:
Collaboration graph
[legend]

Public Member Functions

std::shared_ptr< SurfaceMeshgetOutputMesh (const int i) const
 
void setInputImage (std::shared_ptr< ImageData > inputImage)
 
void setIsoValue (double isovalue)
 Value where the boundary lies.
 
void setAllModified (bool val)
 Set all voxels as modified (used initially)
 
void setModified (const Vec3i &coord)
 Set a voxel that was modified in the image (the neighboring dual voxels will be updated on the next request)
 
void clearModified ()
 Clear all pending modifications.
 
void setNumberOfChunks (const Vec3i &numChunks)
 Set the number of chunks. one minus the dimensions of image must be divisible by numChunks ((dimensionX - 1) / numChunks must have no remainder) If it doesn't the next divisor will be used, warning thrown.
 
const Vec3i & getNumberOfChunks () const
 
std::unordered_map< int, Vec3i > getModifiedChunks ()
 
- Public Member Functions inherited from imstk::GeometryAlgorithm
std::shared_ptr< GeometrygetInput (size_t port=0) const
 Returns input geometry given port, returns nullptr if doesn't exist.
 
std::shared_ptr< GeometrygetOutput (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.
 
- Protected Member Functions inherited from imstk::GeometryAlgorithm
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

- Protected Types inherited from imstk::GeometryAlgorithm
using GeometryCheck = std::function< bool(Geometry *)>
 
using TypeCheckContainer = std::unordered_map< size_t, GeometryCheck >
 
- Protected Attributes inherited from imstk::GeometryAlgorithm
TypeCheckContainer m_requiredTypeChecks
 
TypeCheckContainer m_optionalTypeChecks
 

Detailed Description

This filter extracts a contour SurfaceMesh from an image given an isovalue. Users should prefer imstkFlyingEdges over this unless sparse/local processing is needed.

One can provide this filter with a list of voxels that were modified in the image and it will locally update it such that little processing is done

It works in chunks, so a set of SurfaceMesh's are the output. One can provide the filter with the number of divisions on each axes to split up the image

Definition at line 33 of file imstkLocalMarchingCubes.h.


The documentation for this class was generated from the following files: