TTK
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ttkMorseSmaleComplex Class Reference

TTK VTK-filter that wraps the morseSmaleComplex processing package. More...

#include <ttkMorseSmaleComplex.h>

Inheritance diagram for ttkMorseSmaleComplex:
ttkAlgorithm ttk::MorseSmaleComplex ttk::Debug ttk::Debug ttk::BaseClass ttk::BaseClass

Public Member Functions

 vtkTypeMacro (ttkMorseSmaleComplex, ttkAlgorithm)
 
 vtkSetMacro (ForceInputOffsetScalarField, bool)
 
 vtkGetMacro (ForceInputOffsetScalarField, bool)
 
 vtkSetMacro (IterationThreshold, int)
 
 vtkGetMacro (IterationThreshold, int)
 
 vtkSetMacro (ComputeCriticalPoints, bool)
 
 vtkGetMacro (ComputeCriticalPoints, bool)
 
 vtkSetMacro (ComputeAscendingSeparatrices1, bool)
 
 vtkGetMacro (ComputeAscendingSeparatrices1, bool)
 
 vtkSetMacro (ComputeDescendingSeparatrices1, bool)
 
 vtkGetMacro (ComputeDescendingSeparatrices1, bool)
 
 vtkSetMacro (ComputeSaddleConnectors, bool)
 
 vtkGetMacro (ComputeSaddleConnectors, bool)
 
 vtkSetMacro (ComputeAscendingSeparatrices2, bool)
 
 vtkGetMacro (ComputeAscendingSeparatrices2, bool)
 
 vtkSetMacro (ComputeDescendingSeparatrices2, bool)
 
 vtkGetMacro (ComputeDescendingSeparatrices2, bool)
 
 vtkSetMacro (ComputeAscendingSegmentation, bool)
 
 vtkGetMacro (ComputeAscendingSegmentation, bool)
 
 vtkSetMacro (ComputeDescendingSegmentation, bool)
 
 vtkGetMacro (ComputeDescendingSegmentation, bool)
 
 vtkSetMacro (ComputeFinalSegmentation, bool)
 
 vtkGetMacro (ComputeFinalSegmentation, bool)
 
 vtkSetMacro (ReturnSaddleConnectors, int)
 
 vtkGetMacro (ReturnSaddleConnectors, int)
 
 vtkSetMacro (SaddleConnectorsPersistenceThreshold, double)
 
 vtkGetMacro (SaddleConnectorsPersistenceThreshold, double)
 
- Public Member Functions inherited from ttkAlgorithm
 vtkTypeMacro (ttkAlgorithm, vtkAlgorithm)
 
void UpdateThreadNumber ()
 
void SetThreadNumber (int threadNumber)
 
void SetUseAllCores (bool useAllCores)
 
void SetDebugLevel (int debugLevel)
 
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, const int orderArrayIdx=0, const bool enforceOrderArrayIdx=false)
 
ttk::SimplexIdGetIdentifierArrayPtr (const bool &enforceArrayIndex, const int &arrayIndex, const std::string &arrayName, vtkDataSet *const inputData, std::vector< ttk::SimplexId > &spareStorage, const int inputPort=0)
 
ttk::TriangulationGetTriangulation (vtkDataSet *object)
 
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 *)
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
virtual ~Debug ()
 
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
 

Static Public Member Functions

static ttkMorseSmaleComplexNew ()
 
- Static Public Member Functions inherited from ttkAlgorithm
static ttkAlgorithmNew ()
 
static std::string GetOrderArrayName (vtkDataArray *const array)
 
static vtkInformationIntegerKey * SAME_DATA_TYPE_AS_INPUT_PORT ()
 

Protected Member Functions

template<typename scalarType , typename triangulationType >
int dispatch (vtkDataArray *const inputScalars, vtkPolyData *const outputCriticalPoints, vtkPolyData *const outputSeparatrices1, vtkPolyData *const outputSeparatrices2, const triangulationType &triangulation)
 
 ttkMorseSmaleComplex ()
 
int FillInputPortInformation (int port, vtkInformation *info) override
 
int FillOutputPortInformation (int port, vtkInformation *info) override
 
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
- Protected Member Functions inherited from ttkAlgorithm
 ttkAlgorithm ()
 
virtual ~ttkAlgorithm ()
 
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))
 
virtual int FillInputPortInformation (int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
 
virtual 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::MorseSmaleComplex
 MorseSmaleComplex ()
 
 ~MorseSmaleComplex ()
 
int setIterationThreshold (const int iterationThreshold)
 
int setComputeAscendingSeparatrices1 (const bool state)
 
int setComputeDescendingSeparatrices1 (const bool state)
 
int setComputeSaddleConnectors (const bool state)
 
int setComputeAscendingSeparatrices2 (const bool state)
 
int setComputeDescendingSeparatrices2 (const bool state)
 
int setReturnSaddleConnectors (const bool state)
 
int setSaddleConnectorsPersistenceThreshold (const double threshold)
 
void preconditionTriangulation (AbstractTriangulation *const data)
 
int setDebugLevel (const int &debugLevel)
 
int setThreadNumber (const int threadNumber)
 
int setWrapper (const Wrapper *wrapper)
 
int setInputScalarField (void *const data)
 
int setInputOffsets (const SimplexId *const data)
 
int setOutputCriticalPoints (std::vector< std::array< float, 3 >> *const criticalPoints_points, std::vector< char > *const criticalPoints_points_cellDimensons, std::vector< SimplexId > *const criticalPoints_points_cellIds, std::vector< char > *const criticalPoints_points_isOnBoundary, std::vector< SimplexId > *const criticalPoints_points_PLVertexIdentifiers, std::vector< SimplexId > *const criticalPoints_points_manifoldSize)
 
int setOutputSeparatrices1 (SimplexId *const separatrices1_numberOfPoints, std::vector< float > *const separatrices1_points, std::vector< char > *const separatrices1_points_smoothingMask, std::vector< char > *const separatrices1_points_cellDimensions, std::vector< SimplexId > *const separatrices1_points_cellIds, SimplexId *const separatrices1_numberOfCells, std::vector< SimplexId > *const separatrices1_cells_connectivity, std::vector< SimplexId > *const separatrices1_cells_sourceIds, std::vector< SimplexId > *const separatrices1_cells_destinationIds, std::vector< SimplexId > *const separatrices1_cells_separatrixIds, std::vector< char > *const separatrices1_cells_separatrixTypes, std::vector< SimplexId > *const s1_separatrixFunctionMaximaId, std::vector< SimplexId > *const s1_separatrixFunctionMinimaId, std::vector< char > *const separatrices1_cells_isOnBoundary)
 
int setOutputSeparatrices2 (SimplexId *const separatrices2_numberOfPoints, std::vector< float > *const separatrices2_points, SimplexId *const separatrices2_numberOfCells, std::vector< SimplexId > *const separatrices2_cells_offsets, std::vector< SimplexId > *const separatrices2_cells_connectivity, std::vector< SimplexId > *const separatrices2_cells_sourceIds, std::vector< SimplexId > *const separatrices2_cells_separatrixIds, std::vector< char > *const separatrices2_cells_separatrixTypes, std::vector< SimplexId > *const s2_separatrixFunctionMaximaId, std::vector< SimplexId > *const s2_separatrixFunctionMinimaId, std::vector< char > *const separatrices2_cells_isOnBoundary)
 
int setOutputMorseComplexes (void *const ascendingManifold, void *const descendingManifold, void *const morseSmaleManifold)
 
template<typename dataType , typename triangulationType >
int execute (const triangulationType &triangulation)
 

Additional Inherited Members

- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 
- Protected Attributes inherited from ttk::MorseSmaleComplex
int dimensionality_ {}
 
AbstractMorseSmaleComplexabstractMorseSmaleComplex_ {}
 
MorseSmaleComplex2D morseSmaleComplex2D_ {}
 
MorseSmaleComplex3D morseSmaleComplex3D_ {}
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

TTK VTK-filter that wraps the morseSmaleComplex processing package.

Author
Guillaume Favelier guill.nosp@m.aume.nosp@m..fave.nosp@m.lier.nosp@m.@lip6.nosp@m..fr
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Date
February 2017.

TTK module for the computation of Morse-Smale complexes. Morse-Smale complexes are useful topological abstractions of scalar fields for data segmentation, feature extraction, etc.

Related publication
"Parallel Computation of 3D Morse-Smale Complexes"
Nithin Shivashankar, Vijay Natarajan
Proc. of EuroVis 2012.
Computer Graphics Forum, 2012.

Parameters
InputInput scalar field, defined as a point data scalar field attached to a geometry, either 2D or 3D, either regular grid or triangulation (vtkDataSet)
Output0Output critical points (vtkPolyData)
Output1Output 1-separatrices (vtkPolyData)
Output2Output 2-separatrices (vtkPolyData)
Output3Output data segmentation (vtkDataSet)

The input data array needs to be specified via the standard VTK call vtkAlgorithm::SetInputArrayToProcess() with the following parameters:

Parameters
idx0 (FIXED: the first array the algorithm requires)
port0 (FIXED: first port)
connection0 (FIXED: first connection)
fieldAssociation0 (FIXED: point data)
arrayName(DYNAMIC: string identifier of the input array)

The optional offset array can be specified via the standard VTK call vtkAlgorithm::SetInputArrayToProcess() with the following parameters:

Parameters
idx1 (FIXED: the second array the algorithm requires)
port0 (FIXED: first port)
connection0 (FIXED: first connection)
fieldAssociation0 (FIXED: point data)
arrayName(DYNAMIC: string identifier of the offset array)
Note
: To use this optional array, ForceInputOffsetScalarField needs to be enabled with the setter ‘setForceInputOffsetScalarField()’.

This filter can be used as any other VTK filter (for instance, by using the sequence of calls SetInputData(), Update(), GetOutput()).

See the related ParaView example state files for usage examples within a VTK pipeline.

See also
ttk::MorseSmaleComplex

Definition at line 65 of file ttkMorseSmaleComplex.h.

Constructor & Destructor Documentation

◆ ttkMorseSmaleComplex()

ttkMorseSmaleComplex::ttkMorseSmaleComplex ( )
protected

Definition at line 21 of file ttkMorseSmaleComplex.cpp.

Member Function Documentation

◆ dispatch()

template<typename scalarType , typename triangulationType >
int ttkMorseSmaleComplex::dispatch ( vtkDataArray *const  inputScalars,
vtkPolyData *const  outputCriticalPoints,
vtkPolyData *const  outputSeparatrices1,
vtkPolyData *const  outputSeparatrices2,
const triangulationType &  triangulation 
)
protected

Definition at line 54 of file ttkMorseSmaleComplex.cpp.

◆ FillInputPortInformation()

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

Definition at line 27 of file ttkMorseSmaleComplex.cpp.

◆ FillOutputPortInformation()

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

Definition at line 36 of file ttkMorseSmaleComplex.cpp.

◆ New()

static ttkMorseSmaleComplex* ttkMorseSmaleComplex::New ( )
static

◆ RequestData()

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

Definition at line 466 of file ttkMorseSmaleComplex.cpp.

◆ vtkGetMacro() [1/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeAscendingSegmentation  ,
bool   
)

◆ vtkGetMacro() [2/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeAscendingSeparatrices1  ,
bool   
)

◆ vtkGetMacro() [3/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeAscendingSeparatrices2  ,
bool   
)

◆ vtkGetMacro() [4/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeCriticalPoints  ,
bool   
)

◆ vtkGetMacro() [5/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeDescendingSegmentation  ,
bool   
)

◆ vtkGetMacro() [6/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeDescendingSeparatrices1  ,
bool   
)

◆ vtkGetMacro() [7/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeDescendingSeparatrices2  ,
bool   
)

◆ vtkGetMacro() [8/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeFinalSegmentation  ,
bool   
)

◆ vtkGetMacro() [9/13]

ttkMorseSmaleComplex::vtkGetMacro ( ComputeSaddleConnectors  ,
bool   
)

◆ vtkGetMacro() [10/13]

ttkMorseSmaleComplex::vtkGetMacro ( ForceInputOffsetScalarField  ,
bool   
)

◆ vtkGetMacro() [11/13]

ttkMorseSmaleComplex::vtkGetMacro ( IterationThreshold  ,
int   
)

◆ vtkGetMacro() [12/13]

ttkMorseSmaleComplex::vtkGetMacro ( ReturnSaddleConnectors  ,
int   
)

◆ vtkGetMacro() [13/13]

ttkMorseSmaleComplex::vtkGetMacro ( SaddleConnectorsPersistenceThreshold  ,
double   
)

◆ vtkSetMacro() [1/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeAscendingSegmentation  ,
bool   
)

◆ vtkSetMacro() [2/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeAscendingSeparatrices1  ,
bool   
)

◆ vtkSetMacro() [3/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeAscendingSeparatrices2  ,
bool   
)

◆ vtkSetMacro() [4/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeCriticalPoints  ,
bool   
)

◆ vtkSetMacro() [5/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeDescendingSegmentation  ,
bool   
)

◆ vtkSetMacro() [6/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeDescendingSeparatrices1  ,
bool   
)

◆ vtkSetMacro() [7/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeDescendingSeparatrices2  ,
bool   
)

◆ vtkSetMacro() [8/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeFinalSegmentation  ,
bool   
)

◆ vtkSetMacro() [9/13]

ttkMorseSmaleComplex::vtkSetMacro ( ComputeSaddleConnectors  ,
bool   
)

◆ vtkSetMacro() [10/13]

ttkMorseSmaleComplex::vtkSetMacro ( ForceInputOffsetScalarField  ,
bool   
)

◆ vtkSetMacro() [11/13]

ttkMorseSmaleComplex::vtkSetMacro ( IterationThreshold  ,
int   
)

◆ vtkSetMacro() [12/13]

ttkMorseSmaleComplex::vtkSetMacro ( ReturnSaddleConnectors  ,
int   
)

◆ vtkSetMacro() [13/13]

ttkMorseSmaleComplex::vtkSetMacro ( SaddleConnectorsPersistenceThreshold  ,
double   
)

◆ vtkTypeMacro()

ttkMorseSmaleComplex::vtkTypeMacro ( ttkMorseSmaleComplex  ,
ttkAlgorithm   
)

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