TTK
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ttk::SignedDistanceField Class Reference

This filter computes a signed distance field given a surface in input. More...

#include <SignedDistanceField.h>

Inheritance diagram for ttk::SignedDistanceField:
ttk::Debug ttk::BaseClass ttkSignedDistanceField

Public Member Functions

 SignedDistanceField ()
 
template<typename triangulationType , typename triangulationType2 >
int execute (float *const outputScalars, triangulationType *const triangulation, triangulationType2 *const boundingTriangulation, int *const edgeCrossing, int *const isInterior) const
 
int preconditionTriangulation (AbstractTriangulation *triangulation) const
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Protected Types

enum class  VertexMarchingType { FAR , NARROW , FROZEN }
 

Protected Member Functions

template<typename triangulationType >
void findOutsideVertices (const SimplexId vertexId, triangulationType *const boundingTriangulation, const std::vector< bool > &vertexIntersection, int *const isInterior) const
 
int getNeighbor (unsigned int vertexId, unsigned int dim, int dir) const
 
template<typename dataType >
void fastMarching (std::vector< bool > &vertexIntersection, dataType *const distances, int *const isInterior) const
 
template<typename dataType >
void fastMarchingIterativeNode (std::vector< VertexMarchingType > &vertexType, dataType *const distances, int *const isInterior) const
 
template<typename dataType >
void fastMarchingIterativeBand (std::vector< VertexMarchingType > &vertexType, dataType *const distances, int *const isInterior) const
 
template<typename dataType >
dataType fastMarchingUpdatePoint (unsigned int vertexId, dataType *const distances, int *const isInterior, std::vector< VertexMarchingType > &vertexType) const
 
template<typename dataType >
dataType fastMarchingUpdatePointOrderTwo (unsigned int vertexId, dataType *const distances, int *const isInterior, std::vector< VertexMarchingType > &vertexType) const
 
template<typename dataType >
dataType fastMarchingUpdatePointOrderOne (unsigned int vertexId, dataType *const distances, int *const isInterior, std::vector< VertexMarchingType > &vertexType) const
 
template<typename dataType >
bool fastMarchingSolveQuadratic (unsigned int vertexId, dataType a, dataType b, dataType c, int *const isInterior, dataType &out) const
 
- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 

Protected Attributes

unsigned int xResolution_ {1}
 
unsigned int yResolution_ {1}
 
unsigned int zResolution_ {1}
 
std::array< double, 3 > spacing_ {1.0, 1.0, 1.0}
 
std::array< double, 3 > invSpacingSquared_ {1.0, 1.0, 1.0}
 
bool expandBox_ = true
 
int backend_ = 0
 
int fastMarchingOrder_ = 1
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

This filter computes a signed distance field given a surface in input.

Author
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Mohamed Amine Kissi moham.nosp@m.ed.k.nosp@m.issi@.nosp@m.lip6.nosp@m..fr
Mathieu Pont mathi.nosp@m.eu.p.nosp@m.ont@l.nosp@m.ip6..nosp@m.fr
Date
August 2023

It implements three backends (accelerated with a BVH data structure):

J.A. Sethian. A Fast Marching Level Set Method for Monotonically Advancing Fronts, Proc. Natl. Acad. Sci., 93, 4, pp.1591–1595, 1996

Online examples:

Definition at line 52 of file SignedDistanceField.h.

Member Enumeration Documentation

◆ VertexMarchingType

Enumerator
FAR 
NARROW 
FROZEN 

Definition at line 94 of file SignedDistanceField.h.

Constructor & Destructor Documentation

◆ SignedDistanceField()

ttk::SignedDistanceField::SignedDistanceField ( )

Definition at line 3 of file SignedDistanceField.cpp.

Member Function Documentation

◆ execute()

template<typename triangulationType , typename triangulationType2 >
int ttk::SignedDistanceField::execute ( float *const  outputScalars,
triangulationType *const  triangulation,
triangulationType2 *const  boundingTriangulation,
int *const  edgeCrossing,
int *const  isInterior 
) const

Definition at line 508 of file SignedDistanceField.h.

◆ fastMarching()

template<typename dataType >
void ttk::SignedDistanceField::fastMarching ( std::vector< bool > &  vertexIntersection,
dataType *const  distances,
int *const  isInterior 
) const
protected

Definition at line 151 of file SignedDistanceField.h.

◆ fastMarchingIterativeBand()

template<typename dataType >
void ttk::SignedDistanceField::fastMarchingIterativeBand ( std::vector< VertexMarchingType > &  vertexType,
dataType *const  distances,
int *const  isInterior 
) const
protected

Definition at line 294 of file SignedDistanceField.h.

◆ fastMarchingIterativeNode()

template<typename dataType >
void ttk::SignedDistanceField::fastMarchingIterativeNode ( std::vector< VertexMarchingType > &  vertexType,
dataType *const  distances,
int *const  isInterior 
) const
protected

Definition at line 190 of file SignedDistanceField.h.

◆ fastMarchingSolveQuadratic()

template<typename dataType >
bool ttk::SignedDistanceField::fastMarchingSolveQuadratic ( unsigned int  vertexId,
dataType  a,
dataType  b,
dataType  c,
int *const  isInterior,
dataType &  out 
) const
protected

Definition at line 443 of file SignedDistanceField.h.

◆ fastMarchingUpdatePoint()

template<typename dataType >
dataType ttk::SignedDistanceField::fastMarchingUpdatePoint ( unsigned int  vertexId,
dataType *const  distances,
int *const  isInterior,
std::vector< VertexMarchingType > &  vertexType 
) const
protected

Definition at line 337 of file SignedDistanceField.h.

◆ fastMarchingUpdatePointOrderOne()

template<typename dataType >
dataType ttk::SignedDistanceField::fastMarchingUpdatePointOrderOne ( unsigned int  vertexId,
dataType *const  distances,
int *const  isInterior,
std::vector< VertexMarchingType > &  vertexType 
) const
protected

Definition at line 406 of file SignedDistanceField.h.

◆ fastMarchingUpdatePointOrderTwo()

template<typename dataType >
dataType ttk::SignedDistanceField::fastMarchingUpdatePointOrderTwo ( unsigned int  vertexId,
dataType *const  distances,
int *const  isInterior,
std::vector< VertexMarchingType > &  vertexType 
) const
protected

Definition at line 353 of file SignedDistanceField.h.

◆ findOutsideVertices()

template<typename triangulationType >
void ttk::SignedDistanceField::findOutsideVertices ( const SimplexId  vertexId,
triangulationType *const  boundingTriangulation,
const std::vector< bool > &  vertexIntersection,
int *const  isInterior 
) const
protected

Definition at line 463 of file SignedDistanceField.h.

◆ getNeighbor()

int ttk::SignedDistanceField::getNeighbor ( unsigned int  vertexId,
unsigned int  dim,
int  dir 
) const
inlineprotected

Definition at line 80 of file SignedDistanceField.h.

◆ preconditionTriangulation()

int ttk::SignedDistanceField::preconditionTriangulation ( AbstractTriangulation triangulation) const
inline

Definition at line 64 of file SignedDistanceField.h.

Member Data Documentation

◆ backend_

int ttk::SignedDistanceField::backend_ = 0
protected

Definition at line 144 of file SignedDistanceField.h.

◆ expandBox_

bool ttk::SignedDistanceField::expandBox_ = true
protected

Definition at line 143 of file SignedDistanceField.h.

◆ fastMarchingOrder_

int ttk::SignedDistanceField::fastMarchingOrder_ = 1
protected

Definition at line 145 of file SignedDistanceField.h.

◆ invSpacingSquared_

std::array<double, 3> ttk::SignedDistanceField::invSpacingSquared_ {1.0, 1.0, 1.0}
protected

Definition at line 142 of file SignedDistanceField.h.

◆ spacing_

std::array<double, 3> ttk::SignedDistanceField::spacing_ {1.0, 1.0, 1.0}
protected

Definition at line 141 of file SignedDistanceField.h.

◆ xResolution_

unsigned int ttk::SignedDistanceField::xResolution_ {1}
protected

Definition at line 140 of file SignedDistanceField.h.

◆ yResolution_

unsigned int ttk::SignedDistanceField::yResolution_ {1}
protected

Definition at line 140 of file SignedDistanceField.h.

◆ zResolution_

unsigned int ttk::SignedDistanceField::zResolution_ {1}
protected

Definition at line 140 of file SignedDistanceField.h.


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