TTK
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ttkSignedDistanceField Class Reference

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

#include <ttkSignedDistanceField.h>

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

Public Types

typedef ttkAlgorithm Superclass
 
- Public Types inherited from ttkAlgorithm
typedef vtkAlgorithm Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
virtual void SetExpandBox (bool)
 
virtual bool GetExpandBox ()
 
virtual void SetBackend (int)
 
virtual int GetBackend ()
 
virtual void SetFastMarchingOrder (int)
 
virtual int GetFastMarchingOrder ()
 
vtkImageData * GetOutput ()
 
virtual void SetSamplingDimensions (int, int, int)
 
virtual void SetSamplingDimensions (int[3])
 
virtual int * GetSamplingDimensions ()
 
virtual void GetSamplingDimensions (int &, int &, int &)
 
virtual void GetSamplingDimensions (int[3])
 
- Public Member Functions inherited from ttkAlgorithm
void UpdateThreadNumber ()
 
void SetThreadNumber (int threadNumber)
 
void SetUseAllCores (bool useAllCores)
 
void SetDebugLevel (int debugLevel)
 
void SetCompactTriangulationCacheSize (float cacheSize)
 
vtkDataArray * GetOptionalArray (const bool &enforceArrayIndex, const int &arrayIndex, const std::string &arrayName, vtkDataSet *const inputData, const int &inputPort=0)
 
vtkDataArray * GetOrderArray (vtkDataSet *const inputData, const int scalarArrayIdx, ttk::Triangulation *triangulation, const bool getGlobalOrder=false, const int orderArrayIdx=0, const bool enforceOrderArrayIdx=false)
 
vtkDataArray * checkForGlobalAndComputeOrderArray (vtkDataSet *const inputData, vtkDataArray *scalarArray, const int scalarArrayIdx, const bool getGlobalOrder, vtkDataArray *orderArray, ttk::Triangulation *triangulation, const bool enforceOrderArrayIdx)
 
vtkDataArray * ComputeOrderArray (vtkDataSet *const inputData, vtkDataArray *scalarArray, const int scalarArrayIdx, const bool getGlobalOrder, vtkDataArray *oldOrderArray, ttk::Triangulation *triangulation)
 
ttk::SimplexIdGetIdentifierArrayPtr (const bool &enforceArrayIndex, const int &arrayIndex, const std::string &arrayName, vtkDataSet *const inputData, std::vector< ttk::SimplexId > &spareStorage, const int inputPort=0, const bool printErr=true)
 
ttk::TriangulationGetTriangulation (vtkDataSet *dataSet)
 
int ProcessRequest (vtkInformation *request, vtkInformationVector **inputVectors, vtkInformationVector *outputVector) override
 
vtkDataSet * GetOutput ()
 
vtkDataSet * GetOutput (int)
 
void SetInputData (vtkDataSet *)
 
void SetInputData (int, vtkDataSet *)
 
void AddInputData (vtkDataSet *)
 
void AddInputData (int, vtkDataSet *)
 
template<typename inputType >
int checkEmptyMPIInput (inputType *input)
 This method tests whether the input is a nullptr. If the computation is being done on multiple processes, it is possible that the domain of one process or more is empty, but not others, therefore in that particular case the rest of the filter will not be computed but an error message will not be sent.
 
- 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)
 

Static Public Member Functions

static ttkSignedDistanceFieldNew ()
 
static int IsTypeOf (const char *type)
 
static ttkSignedDistanceFieldSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from ttkAlgorithm
static ttkAlgorithmNew ()
 
static int IsTypeOf (const char *type)
 
static ttkAlgorithmSafeDownCast (vtkObject *o)
 
static std::string GetOrderArrayName (vtkDataArray *const array)
 
static vtkInformationIntegerKey * SAME_DATA_TYPE_AS_INPUT_PORT ()
 

Protected Member Functions

 ttkSignedDistanceField ()
 
vtkTypeBool ProcessRequest (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
 
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
 
int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
 
int FillInputPortInformation (int, vtkInformation *) override
 
int FillOutputPortInformation (int, vtkInformation *) override
 
void computeOutputInformation (vtkInformationVector **inputVector)
 
- Protected Member Functions inherited from ttkAlgorithm
 ttkAlgorithm ()
 
 ~ttkAlgorithm () override
 
void MPIGhostPipelinePreconditioning (vtkDataSet *input)
 
void MPIPipelinePreconditioning (vtkDataSet *input, std::vector< int > &neighbors, std::map< int, int > &neighToId, ttk::Triangulation *triangulation=nullptr)
 
bool checkGlobalIdValidity (ttk::LongSimplexId *globalIds, ttk::SimplexId simplexNumber, unsigned char *ghost, int *rankArray)
 
int GenerateGlobalIds (vtkDataSet *input, std::unordered_map< ttk::SimplexId, ttk::SimplexId > &vertGtoL, std::vector< int > &neighborRanks, std::map< int, int > &neighborsToId)
 
void MPITriangulationPreconditioning (ttk::Triangulation *triangulation, vtkDataSet *input)
 
virtual int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVectors, vtkInformationVector *outputVector)
 
virtual int RequestInformation (vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
 
virtual int RequestUpdateTime (vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
 
virtual int RequestUpdateTimeDependentInformation (vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
 
virtual int RequestUpdateExtent (vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
 
virtual int RequestDataNotGenerated (vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
 
virtual int RequestData (vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
 
int FillInputPortInformation (int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
 
int FillOutputPortInformation (int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
 
- 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 Member Functions inherited from ttk::SignedDistanceField
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
 
 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
 

Protected Attributes

int SamplingDimensions [3]
 
bool ExpandBox = true
 
int Backend = 0
 
int FastMarchingOrder = 1
 
- Protected Attributes inherited from ttkAlgorithm
float CompactTriangulationCacheSize {0.2f}
 
- 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_
 
- Protected Attributes inherited from ttk::SignedDistanceField
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
 

Additional Inherited Members

- Protected Types inherited from ttk::SignedDistanceField
enum class  VertexMarchingType { FAR , NARROW , FROZEN }
 
- 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 48 of file ttkSignedDistanceField.h.

Member Typedef Documentation

◆ Superclass

Definition at line 53 of file ttkSignedDistanceField.h.

Constructor & Destructor Documentation

◆ ttkSignedDistanceField()

ttkSignedDistanceField::ttkSignedDistanceField ( )
protected

Definition at line 17 of file ttkSignedDistanceField.cpp.

Member Function Documentation

◆ computeOutputInformation()

void ttkSignedDistanceField::computeOutputInformation ( vtkInformationVector **  inputVector)
protected

Definition at line 105 of file ttkSignedDistanceField.cpp.

◆ FillInputPortInformation()

int ttkSignedDistanceField::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
overrideprotected

Definition at line 85 of file ttkSignedDistanceField.cpp.

◆ FillOutputPortInformation()

int ttkSignedDistanceField::FillOutputPortInformation ( int  port,
vtkInformation *  info 
)
overrideprotected

Definition at line 95 of file ttkSignedDistanceField.cpp.

◆ GetBackend()

virtual int ttkSignedDistanceField::GetBackend ( )
virtual

◆ GetClassName()

virtual const char * ttkSignedDistanceField::GetClassName ( )
virtual

Reimplemented from ttkAlgorithm.

◆ GetExpandBox()

virtual bool ttkSignedDistanceField::GetExpandBox ( )
virtual

◆ GetFastMarchingOrder()

virtual int ttkSignedDistanceField::GetFastMarchingOrder ( )
virtual

◆ GetOutput()

vtkImageData * ttkSignedDistanceField::GetOutput ( )

Get the output data for this algorithm.

Definition at line 23 of file ttkSignedDistanceField.cpp.

◆ GetSamplingDimensions() [1/3]

virtual int * ttkSignedDistanceField::GetSamplingDimensions ( )
virtual

◆ GetSamplingDimensions() [2/3]

virtual void ttkSignedDistanceField::GetSamplingDimensions ( int &  ,
int &  ,
int &   
)
virtual

◆ GetSamplingDimensions() [3/3]

virtual void ttkSignedDistanceField::GetSamplingDimensions ( int  [3])
virtual

◆ IsA()

virtual int ttkSignedDistanceField::IsA ( const char *  type)
virtual

Reimplemented from ttkAlgorithm.

◆ IsTypeOf()

static int ttkSignedDistanceField::IsTypeOf ( const char *  type)
static

◆ New()

static ttkSignedDistanceField * ttkSignedDistanceField::New ( )
static

◆ ProcessRequest()

vtkTypeBool ttkSignedDistanceField::ProcessRequest ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
overrideprotected

Definition at line 29 of file ttkSignedDistanceField.cpp.

◆ RequestData()

int ttkSignedDistanceField::RequestData ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
overrideprotected

Definition at line 144 of file ttkSignedDistanceField.cpp.

◆ RequestInformation()

int ttkSignedDistanceField::RequestInformation ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *  outputVector 
)
overrideprotected

Definition at line 51 of file ttkSignedDistanceField.cpp.

◆ RequestUpdateExtent()

int ttkSignedDistanceField::RequestUpdateExtent ( vtkInformation *  ,
vtkInformationVector **  inputVector,
vtkInformationVector *   
)
overrideprotected

Definition at line 67 of file ttkSignedDistanceField.cpp.

◆ SafeDownCast()

static ttkSignedDistanceField * ttkSignedDistanceField::SafeDownCast ( vtkObject *  o)
static

◆ SetBackend()

virtual void ttkSignedDistanceField::SetBackend ( int  )
virtual

◆ SetExpandBox()

virtual void ttkSignedDistanceField::SetExpandBox ( bool  )
virtual

◆ SetFastMarchingOrder()

virtual void ttkSignedDistanceField::SetFastMarchingOrder ( int  )
virtual

◆ SetSamplingDimensions() [1/2]

virtual void ttkSignedDistanceField::SetSamplingDimensions ( int  ,
int  ,
int   
)
virtual

Set/Get sampling dimension along each axis. Default will be [10,10,10]

◆ SetSamplingDimensions() [2/2]

virtual void ttkSignedDistanceField::SetSamplingDimensions ( int  [3])
virtual

Member Data Documentation

◆ Backend

int ttkSignedDistanceField::Backend = 0
protected

Definition at line 100 of file ttkSignedDistanceField.h.

◆ ExpandBox

bool ttkSignedDistanceField::ExpandBox = true
protected

Definition at line 99 of file ttkSignedDistanceField.h.

◆ FastMarchingOrder

int ttkSignedDistanceField::FastMarchingOrder = 1
protected

Definition at line 101 of file ttkSignedDistanceField.h.

◆ SamplingDimensions

int ttkSignedDistanceField::SamplingDimensions[3]
protected

Definition at line 98 of file ttkSignedDistanceField.h.


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