TTK
Loading...
Searching...
No Matches
ttkContourTreeAlignment Class Reference

TTK VTK-filter that computes an alignment for a multiblock of contourtrees. More...

#include <ttkContourTreeAlignment.h>

Inheritance diagram for ttkContourTreeAlignment:
ttkAlgorithm ttk::ContourTreeAlignment 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 SetRandomSeed (int)
virtual int GetRandomSeed ()
virtual void SetMatchTime (bool)
virtual bool GetMatchTime ()
virtual void SetArcMatchMode (int)
virtual int GetArcMatchMode ()
virtual void SetAlignmenttreeType (int)
virtual int GetAlignmenttreeType ()
virtual void SetWeightCombinatorialMatch (float)
virtual float GetWeightCombinatorialMatch ()
virtual void SetWeightArcMatch (float)
virtual float GetWeightArcMatch ()
virtual void SetWeightScalarValueMatch (float)
virtual float GetWeightScalarValueMatch ()
virtual void SetExportJSON (bool)
virtual bool GetExportJSON ()
virtual void SetExportPath (const std::string &)
virtual std::string GetExportPath ()
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 ttkContourTreeAlignmentNew ()
static int IsTypeOf (const char *type)
static ttkContourTreeAlignmentSafeDownCast (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

int FillInputPortInformation (int port, vtkInformation *info) override
int FillOutputPortInformation (int port, vtkInformation *info) override
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 ttkContourTreeAlignment ()
 ~ttkContourTreeAlignment () override=default
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::ContourTreeAlignment
float alignTreeBinary (const std::shared_ptr< ttk::cta::BinaryTree > &t1, const std::shared_ptr< ttk::cta::BinaryTree > &t2, std::vector< std::vector< float > > &memT, std::vector< std::vector< float > > &memF)
float alignForestBinary (const std::shared_ptr< ttk::cta::BinaryTree > &t1, const std::shared_ptr< ttk::cta::BinaryTree > &t2, std::vector< std::vector< float > > &memT, std::vector< std::vector< float > > &memF)
std::shared_ptr< ttk::cta::AlignmentTreetraceAlignmentTree (const std::shared_ptr< ttk::cta::BinaryTree > &t1, const std::shared_ptr< ttk::cta::BinaryTree > &t2, std::vector< std::vector< float > > &memT, std::vector< std::vector< float > > &memF)
std::vector< std::shared_ptr< ttk::cta::AlignmentTree > > traceAlignmentForest (const std::shared_ptr< ttk::cta::BinaryTree > &t1, const std::shared_ptr< ttk::cta::BinaryTree > &t2, std::vector< std::vector< float > > &memT, std::vector< std::vector< float > > &memF)
std::shared_ptr< ttk::cta::AlignmentTreetraceNullAlignment (const std::shared_ptr< ttk::cta::BinaryTree > &t, bool first)
float editCost (const std::shared_ptr< ttk::cta::BinaryTree > &t1, const std::shared_ptr< ttk::cta::BinaryTree > &t2)
bool isBinary (const std::shared_ptr< ttk::cta::Tree > &t)
std::shared_ptr< ttk::cta::BinaryTreerootAtNode (const std::shared_ptr< ttk::cta::AlignmentNode > &root)
std::shared_ptr< ttk::cta::BinaryTreecomputeRootedTree (const std::shared_ptr< ttk::cta::AlignmentNode > &node, const std::shared_ptr< ttk::cta::AlignmentEdge > &parent, int &id)
std::shared_ptr< ttk::cta::BinaryTreecomputeRootedDualTree (const std::shared_ptr< ttk::cta::AlignmentEdge > &arc, bool parent1, int &id)
void computeNewAlignmenttree (const std::shared_ptr< ttk::cta::AlignmentTree > &res)
std::pair< float, std::vector< std::shared_ptr< ttk::cta::AlignmentNode > > > pathToMax (const std::shared_ptr< ttk::cta::AlignmentNode > &root, const std::shared_ptr< ttk::cta::AlignmentNode > &parent)
std::pair< float, std::vector< std::shared_ptr< ttk::cta::AlignmentNode > > > pathToMin (const std::shared_ptr< ttk::cta::AlignmentNode > &root, const std::shared_ptr< ttk::cta::AlignmentNode > &parent)
 ContourTreeAlignment ()
 Constructor of the Alignment Object.
 ~ContourTreeAlignment () override
 Destructor of the Alignment Object.
void setArcMatchMode (int mode)
void setWeightCombinatorialMatch (float weight)
void setWeightArcMatch (float weight)
void setWeightScalarValueMatch (float weight)
void setAlignmenttreeType (int type)
template<class scalarType>
int execute (const std::vector< void * > &scalarsVP, const std::vector< int * > &regionSizes, const std::vector< int * > &segmentationIds, const std::vector< long long * > &topologies, const std::vector< size_t > &nVertices, const std::vector< size_t > &nEdges, const std::vector< int * > &segmentations, const std::vector< size_t > &segsizes, std::vector< float > &outputVertices, std::vector< long long > &outputFrequencies, std::vector< long long > &outputVertexIds, std::vector< long long > &outputBranchIds, std::vector< long long > &outputSegmentationIds, std::vector< long long > &outputArcIds, std::vector< int > &outputEdges, int seed)
bool alignTree (const std::shared_ptr< ContourTree > &t)
bool initialize (const std::shared_ptr< ContourTree > &t)
bool alignTree_consistentRoot (const std::shared_ptr< ContourTree > &t)
bool initialize_consistentRoot (const std::shared_ptr< ContourTree > &t, int rootIdx)
std::vector< std::pair< std::vector< std::shared_ptr< ttk::cta::CTNode > >, std::vector< std::shared_ptr< ttk::cta::CTEdge > > > > getGraphs ()
std::vector< std::shared_ptr< ContourTree > > getContourTrees ()
std::pair< std::vector< std::shared_ptr< ttk::cta::AlignmentNode > >, std::vector< std::shared_ptr< ttk::cta::AlignmentEdge > > > getAlignmentGraph ()
std::shared_ptr< ttk::cta::BinaryTreegetAlignmentGraphRooted ()
int getAlignmentRootIdx ()
std::pair< float, std::shared_ptr< ttk::cta::AlignmentTree > > getAlignmentBinary (const std::shared_ptr< ttk::cta::BinaryTree > &t1, const std::shared_ptr< ttk::cta::BinaryTree > &t2)
void computeBranches ()

Additional Inherited Members

Protected Types inherited from ttk::ContourTreeAlignment
using ContourTree = cta::ContourTree
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::ContourTreeAlignment
ttk::cta::Type_Alignmenttree alignmenttreeType = ttk::cta::averageValues
ttk::cta::Mode_ArcMatch arcMatchMode = ttk::cta::persistence
float weightArcMatch = 1
float weightCombinatorialMatch = 0
float weightScalarValueMatch = 0
std::vector< std::shared_ptr< ttk::cta::AlignmentNode > > nodes
std::vector< std::shared_ptr< ttk::cta::AlignmentEdge > > arcs
std::vector< std::shared_ptr< ContourTree > > contourtrees
std::vector< size_t > permutation
std::shared_ptr< ttk::cta::AlignmentNodealignmentRoot
int alignmentRootIdx
float alignmentVal
Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW

Detailed Description

TTK VTK-filter that computes an alignment for a multiblock of contourtrees.

Author
Florian Wetzels (f_wet.nosp@m.zels.nosp@m.13@cs.nosp@m..uni.nosp@m.-kl.d.nosp@m.e), Jonas Lukasczyk (jl@jl.nosp@m.uk.d.nosp@m.e)
Date
28.01.2020

This filter takes a multiblock of unstructured grids, where each block represents a contour tree, and computed the alignment of these contour trees. For each tree, a point array for the scalar values, a cell array for the region sizes of arcs and a cell array for the segmentation ids of arcs are required. Contour trees computed by the FTMTree module fulfill these requirements and are the recommended way to use this filter.

Parameters
InputvtkMultiBlockDataSet representing the contour trees to align
OutputvtkUnstructuredGrid representing the alignment tree

The input data array for the scalar values 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 input data array for the region sizes needs to 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)R
connection0 (FIXED: first connection)
fieldAssociation1 (FIXED: cell data)
arrayName(DYNAMIC: string identifier of the input array)

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

Parameters
idx2 (FIXED: the third array the algorithm requires)
port0 (FIXED: first port)
connection0 (FIXED: first connection)
fieldAssociation1 (FIXED: cell data)
arrayName(DYNAMIC: string identifier of the input array)

Related publication:
'Fuzzy contour trees: Alignment and joint layout of multiple contour trees' Anna Pia Lohfink, Florian Wetzels, Jonas Lukasczyk, Gunther H. Weber, and Christoph Garth. Comput. Graph. Forum, 39(3):343-355, 2020.

See also
ttk::ContourTreeAlignment

Online examples:

Definition at line 67 of file ttkContourTreeAlignment.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ ttkContourTreeAlignment()

ttkContourTreeAlignment::ttkContourTreeAlignment ( )
protected

◆ ~ttkContourTreeAlignment()

ttkContourTreeAlignment::~ttkContourTreeAlignment ( )
overrideprotecteddefault

Member Function Documentation

◆ FillInputPortInformation()

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

Definition at line 28 of file ttkContourTreeAlignment.cpp.

◆ FillOutputPortInformation()

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

Definition at line 38 of file ttkContourTreeAlignment.cpp.

◆ GetAlignmenttreeType()

virtual int ttkContourTreeAlignment::GetAlignmenttreeType ( )
virtual

◆ GetArcMatchMode()

virtual int ttkContourTreeAlignment::GetArcMatchMode ( )
virtual

◆ GetClassName()

virtual const char * ttkContourTreeAlignment::GetClassName ( )
virtual

Reimplemented from ttkAlgorithm.

◆ GetExportJSON()

virtual bool ttkContourTreeAlignment::GetExportJSON ( )
virtual

◆ GetExportPath()

virtual std::string ttkContourTreeAlignment::GetExportPath ( )
virtual

◆ GetMatchTime()

virtual bool ttkContourTreeAlignment::GetMatchTime ( )
virtual

◆ GetRandomSeed()

virtual int ttkContourTreeAlignment::GetRandomSeed ( )
virtual

◆ GetWeightArcMatch()

virtual float ttkContourTreeAlignment::GetWeightArcMatch ( )
virtual

◆ GetWeightCombinatorialMatch()

virtual float ttkContourTreeAlignment::GetWeightCombinatorialMatch ( )
virtual

◆ GetWeightScalarValueMatch()

virtual float ttkContourTreeAlignment::GetWeightScalarValueMatch ( )
virtual

◆ IsA()

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

Reimplemented from ttkAlgorithm.

◆ IsTypeOf()

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

◆ New()

ttkContourTreeAlignment * ttkContourTreeAlignment::New ( )
static

◆ RequestData()

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

Definition at line 47 of file ttkContourTreeAlignment.cpp.

◆ SafeDownCast()

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

◆ SetAlignmenttreeType()

virtual void ttkContourTreeAlignment::SetAlignmenttreeType ( int )
virtual

◆ SetArcMatchMode()

virtual void ttkContourTreeAlignment::SetArcMatchMode ( int )
virtual

◆ SetExportJSON()

virtual void ttkContourTreeAlignment::SetExportJSON ( bool )
virtual

◆ SetExportPath()

virtual void ttkContourTreeAlignment::SetExportPath ( const std::string & )
virtual

◆ SetMatchTime()

virtual void ttkContourTreeAlignment::SetMatchTime ( bool )
virtual

◆ SetRandomSeed()

virtual void ttkContourTreeAlignment::SetRandomSeed ( int )
virtual

◆ SetWeightArcMatch()

virtual void ttkContourTreeAlignment::SetWeightArcMatch ( float )
virtual

◆ SetWeightCombinatorialMatch()

virtual void ttkContourTreeAlignment::SetWeightCombinatorialMatch ( float )
virtual

◆ SetWeightScalarValueMatch()

virtual void ttkContourTreeAlignment::SetWeightScalarValueMatch ( float )
virtual

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