|
TTK
|
TTK discreteVectorField processing package. More...
#include <DiscreteVectorField.h>
Public Member Functions | |
| DiscreteVectorField () | |
| void | setReverseFullOrbit (bool data) |
| template<typename dataType, typename triangulationType> | |
| int | buildField (const triangulationType &triangulation) |
| template<typename dataType, typename triangulationType> | |
| bool | compare (const triangulationType &triangulation, SimplexId vertexA, SimplexId vertexB, float &weightValue) const |
| void | setInputVectorField (const void *const data, const size_t mTime) |
| template<typename dataType> | |
| vectorValue | getVectorValueAt (SimplexId &vertex) const |
| void | preconditionTriangulation (AbstractTriangulation *const data) |
| int | getDimensionality () const |
| int | getNumberOfDimensions () const |
| template<typename triangulationType> | |
| SimplexId | getNumberOfCells (const int dimension, const triangulationType &triangulation) const |
| template<typename dataType, typename triangulationType> | |
| bool | isBoundary (const Cell &cell, const triangulationType &triangulation) const |
| bool | isCellCritical (const int cellDim, const SimplexId cellId) const |
| bool | isCellCritical (const Cell &cell) const |
| template<typename triangulationType> | |
| SimplexId | getPairedCell (const Cell &cell, const triangulationType &triangulation, bool isReverse=false) const |
| template<typename dataType, typename triangulationType> | |
| int | getAscendingPath (const Cell &cell, std::vector< Cell > &vpath, const triangulationType &triangulation, const bool stopOnCycle) const |
| template<typename dataType, typename triangulationType> | |
| int | getAscendingPathRecursive (const Cell &cell, std::vector< Cell > &vpath, const triangulationType &triangulation, std::vector< char > &previousDescPaths, std::vector< char > &previousAscPaths) const |
| template<typename dataType, typename triangulationType> | |
| int | getDescendingPath (const Cell &cell, std::vector< Cell > &vpath, const triangulationType &triangulation, const bool stopOnCycle) const |
| template<typename dataType, typename triangulationType> | |
| int | getDescendingPathRecursive (const Cell &cell, std::vector< Cell > &vpath, const triangulationType &triangulation, std::vector< char > &previousDescPaths, std::vector< char > &previousAscPaths) const |
| template<typename triangulationType> | |
| bool | getDescendingPathThroughWall (const Cell &saddle2, const Cell &saddle1, const std::vector< bool > &isVisited, std::vector< Cell > *const vpath, const triangulationType &triangulation, const bool stopIfMultiConnected=false, const bool enableCycleDetector=false) const |
| template<typename triangulationType> | |
| void | getAscendingPathThroughWall (const Cell &saddle1, const Cell &saddle2, const std::vector< bool > &isVisited, std::vector< Cell > *const vpath, const triangulationType &triangulation) const |
| template<typename triangulationType> | |
| int | getDescendingWall (const Cell &cell, VisitedMask &mask, const triangulationType &triangulation, std::vector< Cell > *const wall=nullptr, std::vector< SimplexId > *const saddles=nullptr) const |
| template<typename triangulationType> | |
| int | getAscendingWall (const Cell &cell, VisitedMask &mask, const triangulationType &triangulation, std::vector< Cell > *const wall=nullptr, std::vector< SimplexId > *const saddles=nullptr) const |
| template<typename dataType, typename triangulationType> | |
| SimplexId | getCellGreaterVertex (const Cell c, const triangulationType &triangulation) const |
| template<typename dataType, typename triangulationType> | |
| SimplexId | getCellLowerVertex (const Cell c, const triangulationType &triangulation) const |
| template<typename dataType, typename triangulationType> | |
| int | setCriticalPoints (const std::array< std::vector< SimplexId >, 4 > &criticalCellsByDim, std::vector< std::array< float, 3 > > &points, std::vector< char > &cellDimensions, std::vector< SimplexId > &cellIds, std::vector< char > &isOnBoundary, std::vector< SimplexId > &PLVertexIdentifiers, const triangulationType &triangulation) const |
| template<typename dataType, typename triangulationType> | |
| int | setCriticalPoints (std::vector< std::array< float, 3 > > &points, std::vector< char > &cellDimensions, std::vector< SimplexId > &cellIds, std::vector< char > &isOnBoundary, std::vector< SimplexId > &PLVertexIdentifiers, const triangulationType &triangulation) const |
| template<typename triangulationType> | |
| int | getCriticalPoints (std::array< std::vector< SimplexId >, 4 > &criticalCellsByDim, const triangulationType &triangulation) const |
| int | setManifoldSize (const std::array< std::vector< SimplexId >, 4 > &criticalCellsByDim, const SimplexId *const ascendingManifold, const SimplexId *const descendingManifold, std::vector< SimplexId > &manifoldSize) const |
| template<typename triangulationType> | |
| int | setVectorGlyphs (std::vector< std::array< float, 3 > > &points, std::vector< char > &points_pairOrigins, std::vector< char > &cells_pairTypes, std::vector< SimplexId > &cellsIds, std::vector< char > &cellsDimensions, const triangulationType &triangulation) const |
| template<typename dataType, typename triangulationType> | |
| float | getPersistence (const std::vector< Cell > &vpath, const triangulationType &triangulation) const |
| template<typename triangulationType> | |
| int | reverseAscendingPath (const std::vector< Cell > &vpath, const triangulationType &triangulation) const |
| template<typename triangulationType> | |
| int | reverseDescendingPath (const std::vector< Cell > &vpath, const triangulationType &triangulation) const |
| template<typename triangulationType> | |
| int | reverseAlternatingPath (const std::vector< Cell > &vpath, const triangulationType &triangulation) const |
| template<typename triangulationType> | |
| int | reverseAscendingPathOnWall (const std::vector< Cell > &vpath, const triangulationType &triangulation) const |
| template<typename triangulationType> | |
| int | reverseDescendingPathOnWall (const std::vector< Cell > &vpath, const triangulationType &triangulation) const |
| template<typename dataType, typename triangulationType> | |
| ttk::SimplexId | getCellGreaterVertex (const Cell c, const triangulationType &triangulation) const |
| template<typename dataType, typename triangulationType> | |
| ttk::SimplexId | getCellLowerVertex (const Cell c, const triangulationType &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 Attributes | |
| int | dimensionality_ {-1} |
| SimplexId | numberOfVertices_ {} |
| bool | reverseFullOrbit {true} |
| std::array< std::vector< SimplexId >, 6 > | localVectors_ {} |
| std::pair< const void *, size_t > | inputVectorField_ {} |
| std::array< std::vector< SimplexId >, 6 > * | vectors_ {} |
Protected Attributes inherited from ttk::Debug | |
| int | debugLevel_ |
| std::string | debugMsgPrefix_ |
| std::string | debugMsgNamePrefix_ |
Protected Attributes inherited from ttk::BaseClass | |
| bool | lastObject_ |
| int | threadNumber_ |
| Wrapper * | wrapper_ |
Additional Inherited Members | |
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) |
Static Protected Attributes inherited from ttk::Debug | |
| static COMMON_EXPORTS debug::LineMode | lastLineMode = ttk::debug::LineMode::NEW |
TTK discreteVectorField processing package.
Compute and manage a discrete vector field of a function on a triangulation. TTK assumes that the input dataset is made of only one connected component.
DiscreteVectorField is a TTK processing package that handles discrete vector field (in the sense of Discrete Morse Theory). The implementation is largely based on Discrete Gradient filter.
Related publication
"Localized Evaluation for Constructing Discrete Vector Fields"
Tanner Finken, Julien Tierny, Joshua A. Levine
IEEE VIS 2024.
Online examples:
Definition at line 91 of file DiscreteVectorField.h.
|
inline |
Definition at line 94 of file DiscreteVectorField.h.
| int DiscreteVectorField::buildField | ( | const triangulationType & | triangulation | ) |
Compute the initial discrete vector field of the input vector function on the triangulation.
Definition at line 163 of file DiscreteVectorField_Template.h.
|
inline |
Compare the values for a given two vertex ids. Return true if a > b. (Meaning from a to b is downhill/ outward so add to OS)
Definition at line 333 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getAscendingPath | ( | const Cell & | cell, |
| std::vector< Cell > & | vpath, | ||
| const triangulationType & | triangulation, | ||
| const bool | stopOnCycle ) const |
Return the VPath coming from the given cell.
Definition at line 1265 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getAscendingPathRecursive | ( | const Cell & | cell, |
| std::vector< Cell > & | vpath, | ||
| const triangulationType & | triangulation, | ||
| std::vector< char > & | previousDescPaths, | ||
| std::vector< char > & | previousAscPaths ) const |
Return the VPath coming from the given cell for recursively going through cycles in 2D.
Definition at line 1444 of file DiscreteVectorField_Template.h.
| void DiscreteVectorField::getAscendingPathThroughWall | ( | const Cell & | saddle1, |
| const Cell & | saddle2, | ||
| const std::vector< bool > & | isVisited, | ||
| std::vector< Cell > *const | vpath, | ||
| const triangulationType & | triangulation ) const |
Return the VPath coming from the given 1-saddle restricted to the 2-separatrice of the 2-saddle.
Definition at line 1627 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getAscendingWall | ( | const Cell & | cell, |
| VisitedMask & | mask, | ||
| const triangulationType & | triangulation, | ||
| std::vector< Cell > *const | wall = nullptr, | ||
| std::vector< SimplexId > *const | saddles = nullptr ) const |
Return the 2-separatrice coming from the given 1-saddle.
Definition at line 1815 of file DiscreteVectorField_Template.h.
| SimplexId ttk::dcvf::DiscreteVectorField::getCellGreaterVertex | ( | const Cell | c, |
| const triangulationType & | triangulation ) const |
Get the vertex id of the most outward flow on the given cell. (This point might not exist for vector field on cells greater than 2 dimensions)
| ttk::SimplexId ttk::dcvf::DiscreteVectorField::getCellGreaterVertex | ( | const Cell | c, |
| const triangulationType & | triangulation ) const |
Definition at line 2122 of file DiscreteVectorField_Template.h.
| SimplexId ttk::dcvf::DiscreteVectorField::getCellLowerVertex | ( | const Cell | c, |
| const triangulationType & | triangulation ) const |
Get the vertex id of with the most inward flow on the given cell. (This point might not exist for vector field on cells greater than 2 dimensions)
| ttk::SimplexId ttk::dcvf::DiscreteVectorField::getCellLowerVertex | ( | const Cell | c, |
| const triangulationType & | triangulation ) const |
Definition at line 2204 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getCriticalPoints | ( | std::array< std::vector< SimplexId >, 4 > & | criticalCellsByDim, |
| const triangulationType & | triangulation ) const |
Get the output critical points as a STL vector of cells.
Definition at line 263 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getDescendingPath | ( | const Cell & | cell, |
| std::vector< Cell > & | vpath, | ||
| const triangulationType & | triangulation, | ||
| const bool | stopOnCycle ) const |
Return the VPath terminating at the given cell.
Definition at line 909 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getDescendingPathRecursive | ( | const Cell & | cell, |
| std::vector< Cell > & | vpath, | ||
| const triangulationType & | triangulation, | ||
| std::vector< char > & | previousDescPaths, | ||
| std::vector< char > & | previousAscPaths ) const |
Return the VPath terminating at the given cell for recursively going through cycles in 2D.
Definition at line 1031 of file DiscreteVectorField_Template.h.
| bool DiscreteVectorField::getDescendingPathThroughWall | ( | const Cell & | saddle2, |
| const Cell & | saddle1, | ||
| const std::vector< bool > & | isVisited, | ||
| std::vector< Cell > *const | vpath, | ||
| const triangulationType & | triangulation, | ||
| const bool | stopIfMultiConnected = false, | ||
| const bool | enableCycleDetector = false ) const |
Return the VPath terminating at the given 2-saddle restricted to the 2-separatrice of the 1-saddle.
Definition at line 1159 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getDescendingWall | ( | const Cell & | cell, |
| VisitedMask & | mask, | ||
| const triangulationType & | triangulation, | ||
| std::vector< Cell > *const | wall = nullptr, | ||
| std::vector< SimplexId > *const | saddles = nullptr ) const |
Return the 2-separatrice terminating at the given 2-saddle.
Definition at line 1752 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getDimensionality | ( | ) | const |
Get the dimensionality of the triangulation.
Definition at line 7 of file DiscreteVectorField.cpp.
| SimplexId DiscreteVectorField::getNumberOfCells | ( | const int | dimension, |
| const triangulationType & | triangulation ) const |
Get the number of cells of the given dimension.
Definition at line 304 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::getNumberOfDimensions | ( | ) | const |
Get the number of dimensions available for the cells in the triangulation (equal to dimensionality+1).
Definition at line 11 of file DiscreteVectorField.cpp.
| SimplexId DiscreteVectorField::getPairedCell | ( | const Cell & | cell, |
| const triangulationType & | triangulation, | ||
| bool | isReverse = false ) const |
Return the identifier of the cell paired to the cell given by the user in the discrete vector field.
Definition at line 815 of file DiscreteVectorField_Template.h.
| float DiscreteVectorField::getPersistence | ( | const std::vector< Cell > & | vpath, |
| const triangulationType & | triangulation ) const |
Compute the difference of function values of a pair of cells.
Definition at line 12 of file DiscreteVectorField_Template.h.
|
inline |
Get the vector values from inputVectorField_ (needs to be set first) of a particular vertex id
Definition at line 143 of file DiscreteVectorField.h.
| bool DiscreteVectorField::isBoundary | ( | const Cell & | cell, |
| const triangulationType & | triangulation ) const |
Return true if the given cell is at boundary, false otherwise.
Definition at line 798 of file DiscreteVectorField_Template.h.
| bool DiscreteVectorField::isCellCritical | ( | const Cell & | cell | ) | const |
Definition at line 138 of file DiscreteVectorField.cpp.
| bool DiscreteVectorField::isCellCritical | ( | const int | cellDim, |
| const SimplexId | cellId ) const |
Return true if the given cell is a critical point regarding the discrete vector field, false otherwise.
Definition at line 102 of file DiscreteVectorField.cpp.
|
inline |
Preprocess all the required connectivity requests on the triangulation.
Definition at line 164 of file DiscreteVectorField.h.
| int DiscreteVectorField::reverseAlternatingPath | ( | const std::vector< Cell > & | vpath, |
| const triangulationType & | triangulation ) const |
Reverse the given alternating(changes dimensions) VPath
Definition at line 2003 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::reverseAscendingPath | ( | const std::vector< Cell > & | vpath, |
| const triangulationType & | triangulation ) const |
Reverse the given ascending VPath.
Definition at line 1880 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::reverseAscendingPathOnWall | ( | const std::vector< Cell > & | vpath, |
| const triangulationType & | triangulation ) const |
Reverse the given ascending VPath restricted on a 2-separatrice.
Definition at line 2042 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::reverseDescendingPath | ( | const std::vector< Cell > & | vpath, |
| const triangulationType & | triangulation ) const |
Reverse the given descending VPath.
Definition at line 1959 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::reverseDescendingPathOnWall | ( | const std::vector< Cell > & | vpath, |
| const triangulationType & | triangulation ) const |
Reverse the given descending VPath restricted on a 2-separatrice.
Definition at line 2082 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::setCriticalPoints | ( | const std::array< std::vector< SimplexId >, 4 > & | criticalCellsByDim, |
| std::vector< std::array< float, 3 > > & | points, | ||
| std::vector< char > & | cellDimensions, | ||
| std::vector< SimplexId > & | cellIds, | ||
| std::vector< char > & | isOnBoundary, | ||
| std::vector< SimplexId > & | PLVertexIdentifiers, | ||
| const triangulationType & | triangulation ) const |
Build the geometric embedding of the given STL vector of cells. The output std::vectors are modified accordingly. This function needs the following internal pointers to be set: outputCriticalPoints_numberOfPoints_ outputCriticalPoints_points_ inputVectorField_
Definition at line 184 of file DiscreteVectorField_Template.h.
| int DiscreteVectorField::setCriticalPoints | ( | std::vector< std::array< float, 3 > > & | points, |
| std::vector< char > & | cellDimensions, | ||
| std::vector< SimplexId > & | cellIds, | ||
| std::vector< char > & | isOnBoundary, | ||
| std::vector< SimplexId > & | PLVertexIdentifiers, | ||
| const triangulationType & | triangulation ) const |
Detect the critical points and build their geometric embedding. The output std::vectors are modified accordingly.
Definition at line 245 of file DiscreteVectorField_Template.h.
|
inline |
Set the input vector function.
The first parameter is a pointer to the vector field buffer (often provided by ttkUtils::GetVoidPointer()), the second one is a timestamp representing the last modification time of the vector field (often provided by vtkObject::GetMTime()).
Definition at line 134 of file DiscreteVectorField.h.
| int DiscreteVectorField::setManifoldSize | ( | const std::array< std::vector< SimplexId >, 4 > & | criticalCellsByDim, |
| const SimplexId *const | ascendingManifold, | ||
| const SimplexId *const | descendingManifold, | ||
| std::vector< SimplexId > & | manifoldSize ) const |
Compute manifold size for critical extrema
Definition at line 142 of file DiscreteVectorField.cpp.
|
inline |
Give whether the simplification takes into account the entire orbit when returning shortcut V-paths.
Definition at line 105 of file DiscreteVectorField.h.
| int DiscreteVectorField::setVectorGlyphs | ( | std::vector< std::array< float, 3 > > & | points, |
| std::vector< char > & | points_pairOrigins, | ||
| std::vector< char > & | cells_pairTypes, | ||
| std::vector< SimplexId > & | cellsIds, | ||
| std::vector< char > & | cellsDimensions, | ||
| const triangulationType & | triangulation ) const |
Build the glyphs representing the discrete vector field.
Definition at line 2287 of file DiscreteVectorField_Template.h.
|
protected |
Definition at line 515 of file DiscreteVectorField.h.
|
protected |
Definition at line 522 of file DiscreteVectorField.h.
|
protected |
Definition at line 520 of file DiscreteVectorField.h.
|
protected |
Definition at line 516 of file DiscreteVectorField.h.
|
protected |
Definition at line 517 of file DiscreteVectorField.h.
|
protected |
Definition at line 525 of file DiscreteVectorField.h.