TTK
|
TTK processing package for the computation of Morse-Smale segmentations using Path Compression. More...
#include <PathCompression.h>
Classes | |
struct | OutputSegmentation |
Pointers to pre-allocated segmentation point data arrays. More... | |
Public Member Functions | |
PathCompression () | |
void | preconditionTriangulation (AbstractTriangulation *const data) |
template<typename triangulationType > | |
int | execute (OutputSegmentation &outSegmentation, const SimplexId *const orderArray, const triangulationType &triangulation) |
Main function for computing the Morse-Smale complex. | |
template<typename triangulationType > | |
int | computePathCompression (SimplexId *const ascSegmentation, SimplexId *const dscSegmentation, const SimplexId *const orderArray, const triangulationType &triangulation) const |
Compute the ascending and descending segmentation in one run. | |
template<typename triangulationType > | |
int | computePathCompressionSingle (SimplexId *const segmentation, const bool computeAscending, const SimplexId *const orderArray, const triangulationType &triangulation) const |
Compute the ascending or descending segmentation. | |
void | setComputeSegmentation (const bool doAscending, const bool doDescending, const bool doMorseSmale) |
template<typename triangulationType > | |
int | computeMSHash (SimplexId *const morseSmaleSegmentation, const SimplexId *const ascSegmentation, const SimplexId *const dscSegmentation, const triangulationType &triangulation) const |
Computes a MS segmentation hash. | |
![]() | |
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) |
![]() | |
BaseClass () | |
virtual | ~BaseClass ()=default |
int | getThreadNumber () const |
virtual int | setThreadNumber (const int threadNumber) |
Protected Attributes | |
bool | ComputeAscendingSegmentation {true} |
bool | ComputeDescendingSegmentation {true} |
bool | ComputeMSSegmentationHash {true} |
![]() | |
int | debugLevel_ |
std::string | debugMsgPrefix_ |
std::string | debugMsgNamePrefix_ |
![]() | |
bool | lastObject_ |
int | threadNumber_ |
Wrapper * | wrapper_ |
Additional Inherited Members | |
![]() | |
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 COMMON_EXPORTS debug::LineMode | lastLineMode = ttk::debug::LineMode::NEW |
TTK processing package for the computation of Morse-Smale segmentations using Path Compression.
Given an input order field, this class computes its ascending and descending segmentation by assigning every vertex to its minimum or maximum in gradient or inverse gradient direction. For convienience a hash (no hash collision detection) of both segmentations can be created to represent the Morse-Smale segmentation.
Related publication
"Parallel Computation of Piecewise Linear Morse-Smale Segmentations"
Robin G. C. Maack, Jonas Lukasczyk, Julien Tierny, Hans Hagen, Ross Maciejewski, Christoph Garth
IEEE Transactions on Visualization and Computer Graphics
Online examples:
Definition at line 65 of file PathCompression.h.
ttk::PathCompression::PathCompression | ( | ) |
Definition at line 3 of file PathCompression.cpp.
int ttk::PathCompression::computeMSHash | ( | SimplexId *const | morseSmaleSegmentation, |
const SimplexId *const | ascSegmentation, | ||
const SimplexId *const | dscSegmentation, | ||
const triangulationType & | triangulation | ||
) | const |
Computes a MS segmentation hash.
Computes a hash from the ascending and descending segmentation as keys. The function does not check for hash conflicts.
triangulationType | type of triangulation |
[out] | morseSmaleSegmentation | |
[out] | ascSegmentation | ascending segmentation |
[out] | dscSegmentation | descending segmentation |
[in] | triangulation | triangulation |
Definition at line 414 of file PathCompression.h.
int ttk::PathCompression::computePathCompression | ( | SimplexId *const | ascSegmentation, |
SimplexId *const | dscSegmentation, | ||
const SimplexId *const | orderArray, | ||
const triangulationType & | triangulation | ||
) | const |
Compute the ascending and descending segmentation in one run.
This function computes the ascending and descending segmentation on the order field. First, the ascending and descending segmentation is set to the largest and smallest neighbor of each vertex. Then, using path compression, the vertices are assigned to their minimum/maximum in positive/negative gradient direction.
triangulationType | type of triangulation |
[out] | ascSegmentation | ascending segmentation |
[out] | dscSegmentation | descending segmentation |
[in] | orderArray | order array |
[in] | triangulation | triangulation |
Definition at line 228 of file PathCompression.h.
int ttk::PathCompression::computePathCompressionSingle | ( | SimplexId *const | segmentation, |
const bool | computeAscending, | ||
const SimplexId *const | orderArray, | ||
const triangulationType & | triangulation | ||
) | const |
Compute the ascending or descending segmentation.
This function computes the ascending or descending segmentation on the order field. First, the ascending or descending segmentation is set to the largest or smallest neighbor of each vertex. Then, using path compression, the vertices are assigned to their minimum/maximum in positive/negative gradient direction.
triangulationType | type of triangulation |
[out] | segmentation | segmentation |
[in] | computeAscending | compute the ascending or descending segmentation |
[in] | orderArray | order array |
[in] | triangulation | triangulation |
Definition at line 321 of file PathCompression.h.
|
inline |
Main function for computing the Morse-Smale complex.
triangulationType | type of triangulation |
[out] | outSegmentation | segmentations as a struct |
[in] | orderArray | order field |
[in] | triangulation | triangulation |
Definition at line 190 of file PathCompression.h.
|
inline |
Compute necessary triangulation information
Definition at line 79 of file PathCompression.h.
|
inline |
Enable/Disable computation of the geometrical embedding of the manifolds of the critical points.
Definition at line 151 of file PathCompression.h.
|
protected |
Definition at line 179 of file PathCompression.h.
|
protected |
Definition at line 182 of file PathCompression.h.
|
protected |
Definition at line 185 of file PathCompression.h.