TTK
|
#include <ttkMacros.h>
#include <ttkPersistenceDiagramUtils.h>
#include <ttkUtils.h>
#include <vtkCellData.h>
#include <vtkDoubleArray.h>
#include <vtkFloatArray.h>
#include <vtkPointData.h>
#include <vtkThreshold.h>
#include <vtkTransform.h>
#include <vtkTransformFilter.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
#include <vtkVersionMacros.h>
Go to the source code of this file.
Functions | |
int | VTUToDiagram (ttk::DiagramType &diagram, vtkUnstructuredGrid *vtu, const ttk::Debug &dbg) |
Converts a Persistence Diagram in the VTK Unstructured Grid format (as generated by the ttkPersistenceDiagram module) to the ttk::DiagramType format. | |
int | DiagramToVTU (vtkUnstructuredGrid *vtu, const ttk::DiagramType &diagram, vtkDataArray *const inputScalars, const ttk::Debug &dbg, const int dim, const bool embedInDomain) |
Converts a Persistence Diagram in the ttk::DiagramType format to the VTK Unstructured Grid format (as generated by the ttkPersistenceDiagram module). | |
int | ProjectDiagramInsideDomain (vtkUnstructuredGrid *const inputDiagram, vtkUnstructuredGrid *const outputDiagram, const ttk::Debug &dbg) |
Generate the spatial embedding of a given Persistence Diagram. | |
template<typename dataType > | |
void | getCoords (vtkPoints *points, const dataType *const births, const dataType *const perss, vtkIdType nPoints, const int nThreads) |
int | ProjectDiagramIn2D (vtkUnstructuredGrid *const inputDiagram, vtkUnstructuredGrid *const outputDiagram, const ttk::Debug &dbg) |
Generate the 2D embedding of a given Persistence Diagram. | |
int | TranslateDiagram (vtkUnstructuredGrid *const diagram, const std::array< double, 3 > &trans) |
Translate a diagram to a new position. | |
int | ResetDiagramPosition (vtkUnstructuredGrid *const diagram, const ttk::Debug &dbg) |
Translate back a canonical diagram into its original position. | |
int DiagramToVTU | ( | vtkUnstructuredGrid * | vtu, |
const ttk::DiagramType & | diagram, | ||
vtkDataArray *const | inputScalars, | ||
const ttk::Debug & | dbg, | ||
const int | dim, | ||
const bool | embedInDomain | ||
) |
Converts a Persistence Diagram in the ttk::DiagramType format to the VTK Unstructured Grid format (as generated by the ttkPersistenceDiagram module).
[out] | vtu | Output VTK Unstructured Grid |
[in] | diagram | Vector of persistence pairs |
[in] | inputScalars | vtkDataArray pointer to input scalar field |
[in] | dbg | Reference to a ttk::Debug instance (for error messages) |
[in] | dim | Data-set dimensionality (to convert pair dimension to pair type) |
[in] | embedInDomain | Switch between the canonical and the embedded representation |
Definition at line 156 of file ttkPersistenceDiagramUtils.cpp.
void getCoords | ( | vtkPoints * | points, |
const dataType *const | births, | ||
const dataType *const | perss, | ||
vtkIdType | nPoints, | ||
const int | nThreads | ||
) |
Definition at line 348 of file ttkPersistenceDiagramUtils.cpp.
int ProjectDiagramIn2D | ( | vtkUnstructuredGrid *const | inputDiagram, |
vtkUnstructuredGrid *const | outputDiagram, | ||
const ttk::Debug & | dbg | ||
) |
Generate the 2D embedding of a given Persistence Diagram.
Use the cellData arrays Birth
and Death
to project the Diagram
[in] | inputDiagram | Input diagram in its spatial embedding form |
[out] | outputDiagram | Projected diagram in its canonical form |
[in] | dbg | Debug instance (for logging and access to threadNumber_) |
Definition at line 375 of file ttkPersistenceDiagramUtils.cpp.
int ProjectDiagramInsideDomain | ( | vtkUnstructuredGrid *const | inputDiagram, |
vtkUnstructuredGrid *const | outputDiagram, | ||
const ttk::Debug & | dbg | ||
) |
Generate the spatial embedding of a given Persistence Diagram.
Use the pointData array Coordinates
to project the Diagram
[in] | inputDiagram | Input diagram in its canonical form |
[out] | outputDiagram | Projected diagram inside the input domain |
[in] | dbg | Debug instance (for logging and access to threadNumber_) |
Definition at line 302 of file ttkPersistenceDiagramUtils.cpp.
int ResetDiagramPosition | ( | vtkUnstructuredGrid *const | diagram, |
const ttk::Debug & | dbg | ||
) |
Translate back a canonical diagram into its original position.
Use the cellData array Birth
as original coordinates
[in,out] | diagram | Input diagram in its spatial embedding form |
[in] | dbg | Debug instance (for logging and access to threadNumber_) |
Definition at line 467 of file ttkPersistenceDiagramUtils.cpp.
int TranslateDiagram | ( | vtkUnstructuredGrid *const | diagram, |
const std::array< double, 3 > & | trans | ||
) |
Translate a diagram to a new position.
[in,out] | diagram | Input diagram in its spatial embedding form |
[in] | trans | Translation vector |
Definition at line 448 of file ttkPersistenceDiagramUtils.cpp.
int VTUToDiagram | ( | ttk::DiagramType & | diagram, |
vtkUnstructuredGrid * | vtu, | ||
const ttk::Debug & | dbg | ||
) |
Converts a Persistence Diagram in the VTK Unstructured Grid format (as generated by the ttkPersistenceDiagram module) to the ttk::DiagramType format.
[out] | diagram | Vector to be filled with persistence pairs |
[in] | vtu | Input VTK Unstructured Grid |
[in] | dbg | Reference to a ttk::Debug instance (for error messages) |
Definition at line 16 of file ttkPersistenceDiagramUtils.cpp.