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

TTK VTK-filter that computes fiber surfaces. More...

#include <ttkFiberSurface.h>

Inheritance diagram for ttkFiberSurface:
ttkAlgorithm ttk::FiberSurface ttk::Debug ttk::Debug ttk::BaseClass ttk::BaseClass

Public Member Functions

 vtkTypeMacro (ttkFiberSurface, ttkAlgorithm)
 
 vtkGetMacro (RangeCoordinates, bool)
 
 vtkSetMacro (RangeCoordinates, bool)
 
 vtkGetMacro (EdgeParameterization, bool)
 
 vtkSetMacro (EdgeParameterization, bool)
 
 vtkGetMacro (EdgeIds, bool)
 
 vtkSetMacro (EdgeIds, bool)
 
 vtkGetMacro (TetIds, bool)
 
 vtkSetMacro (TetIds, bool)
 
 vtkGetMacro (CaseIds, bool)
 
 vtkSetMacro (CaseIds, bool)
 
 vtkGetMacro (PointMerge, bool)
 
 vtkSetMacro (PointMerge, bool)
 
 vtkGetMacro (RangeOctree, bool)
 
 vtkSetMacro (RangeOctree, bool)
 
 vtkGetMacro (PointMergeDistanceThreshold, double)
 
 vtkSetMacro (PointMergeDistanceThreshold, 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 ()
 
virtual int setDebugLevel (const int &debugLevel)
 
virtual int setWrapper (const Wrapper *wrapper)
 
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 ttkFiberSurfaceNew ()
 
- 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

 ttkFiberSurface ()
 
int FillInputPortInformation (int port, vtkInformation *info) override
 
int FillOutputPortInformation (int port, vtkInformation *info) override
 
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
template<typename VTK_T1 , typename VTK_T2 >
int dispatch (ttk::Triangulation *const triangulation)
 
- 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::FiberSurface
template<class dataTypeU , class dataTypeV , typename triangulationType >
int computeBaseTriangle (const SimplexId &tetId, const SimplexId &localEdgeId0, const double &t0, const double &u0, const double &v0, const SimplexId &localEdgeId1, const double &t1, const double &u1, const double &v1, const SimplexId &localEdgeId2, const double &t2, const double &u2, const double &v2, std::vector< std::vector< double >> &basePoints, std::vector< std::pair< double, double >> &basePointProections, std::vector< double > &basePointParameterization, std::vector< std::pair< SimplexId, SimplexId >> &baseEdges, const triangulationType *const triangulation) const
 
template<class dataTypeU , class dataTYpeV , typename triangulationType >
int computeCase0 (const SimplexId &polygonEdgeId, const SimplexId &tetId, const SimplexId &localEdgeId0, const double &t0, const double &u0, const double &v0, const SimplexId &localEdgeId1, const double &t1, const double &u1, const double &v1, const SimplexId &localEdgeId2, const double &t2, const double &u2, const double &v2, const triangulationType *const triangulation) const
 
template<class dataTypeU , class dataTYpeV , typename triangulationType >
int computeCase1 (const SimplexId &polygonEdgeId, const SimplexId &tetId, const SimplexId &localEdgeId0, const double &t0, const double &u0, const double &v0, const SimplexId &localEdgeId1, const double &t1, const double &u1, const double &v1, const SimplexId &localEdgeId2, const double &t2, const double &u2, const double &v2, const triangulationType *const triangulation) const
 
template<class dataTypeU , class dataTYpeV , typename triangulationType >
int computeCase2 (const SimplexId &polygonEdgeId, const SimplexId &tetId, const SimplexId &localEdgeId0, const double &t0, const double &u0, const double &v0, const SimplexId &localEdgeId1, const double &t1, const double &u1, const double &v1, const SimplexId &localEdgeId2, const double &t2, const double &u2, const double &v2, const triangulationType *const triangulation) const
 
template<class dataTypeU , class dataTYpeV , typename triangulationType >
int computeCase3 (const SimplexId &polygonEdgeId, const SimplexId &tetId, const SimplexId &localEdgeId0, const double &t0, const double &u0, const double &v0, const SimplexId &localEdgeId1, const double &t1, const double &u1, const double &v1, const SimplexId &localEdgeId2, const double &t2, const double &u2, const double &v2, const triangulationType *const triangulation) const
 
template<class dataTypeU , class dataTYpeV , typename triangulationType >
int computeCase4 (const SimplexId &polygonEdgeId, const SimplexId &tetId, const SimplexId &localEdgeId0, const double &t0, const double &u0, const double &v0, const SimplexId &localEdgeId1, const double &t1, const double &u1, const double &v1, const SimplexId &localEdgeId2, const double &t2, const double &u2, const double &v2, const triangulationType *const triangulation) const
 
int computeTriangleFiber (const SimplexId &tetId, const SimplexId &triangleId, const std::pair< double, double > &intersection, const std::vector< std::vector< IntersectionTriangle >> &tetIntersections, std::vector< double > &pA, std::vector< double > &pB, SimplexId &pivotVertexId, bool &edgeFiber) const
 
int computeTriangleIntersection (const SimplexId &tetId, const SimplexId &triangleId0, const SimplexId &triangleId1, const SimplexId &polygonEdgeId0, const SimplexId &polygonEdgeId1, const std::pair< double, double > &intersection, SimplexId &newVertexNumber, SimplexId &newTriangleNumber, std::vector< std::vector< IntersectionTriangle >> &tetIntersections, std::vector< std::vector< Vertex >> &tetNewVertices) const
 
int computeTriangleIntersection (const SimplexId &tetId, const SimplexId &triangleId, const SimplexId &polygonEdgeId, const std::pair< double, double > &intersection, const std::vector< double > &pA, const std::vector< double > &pB, const SimplexId &pivotVertexId, SimplexId &newVertexNumber, SimplexId &newTriangleNumber, std::vector< std::vector< IntersectionTriangle >> &tetIntersections, std::vector< std::vector< Vertex >> &tetNewVertices) const
 
int createNewIntersectionTriangle (const SimplexId &tetId, const SimplexId &triangleId, const SimplexId &vertexId0, const SimplexId &vertexId1, const SimplexId &vertexId2, const std::vector< std::vector< Vertex >> &tetNewVertices, SimplexId &newTriangleNumber, std::vector< std::vector< IntersectionTriangle >> &tetIntersections, const std::pair< double, double > *intersection=NULL) const
 
int flipEdges () const
 
int flipEdges (std::vector< std::pair< SimplexId, SimplexId >> &triangles) const
 
int getNumberOfCommonVertices (const SimplexId &tetId, const SimplexId &triangleId0, const SimplexId &triangleId1, const std::vector< std::vector< IntersectionTriangle >> &tetIntersections) const
 
int getTriangleRangeExtremities (const SimplexId &tetId, const SimplexId &triangleId, const std::vector< std::vector< IntersectionTriangle >> &tetIntersections, std::pair< double, double > &extremity0, std::pair< double, double > &extremity1) const
 
bool hasDuplicatedVertices (const double *p0, const double *p1, const double *p2) const
 
int interpolateBasePoints (const std::vector< double > &p0, const std::pair< double, double > &uv0, const double &t0, const std::vector< double > &p1, const std::pair< double, double > &uv1, const double &t1, const double &t, Vertex &v) const
 
bool isEdgeAngleCollapsible (const SimplexId &source, const SimplexId &destination, const SimplexId &pivotVertexId, const std::vector< std::pair< SimplexId, SimplexId >> &starNeighbors) const
 
bool isEdgeFlippable (const SimplexId &edgeVertexId0, const SimplexId &edgeVertexId1, const SimplexId &otherVertexId0, const SimplexId &otherVertexId1) const
 
bool isIntersectionTriangleColinear (const SimplexId &tetId, const SimplexId &triangleId, const std::vector< std::vector< IntersectionTriangle >> &tetIntersections, const std::vector< std::vector< Vertex >> &tetNewVertices, const SimplexId &vertexId0, const SimplexId &vertexId1, const SimplexId &vertexId2) const
 
int mergeEdges (const double &distanceThreshold) const
 
int mergeVertices (const double &distanceThreshold) const
 
template<class dataTypeU , class dataTypeV >
int remeshIntersections () const
 
int snapToBasePoint (const std::vector< std::vector< double >> &basePoints, const std::vector< std::pair< double, double >> &uv, const std::vector< double > &t, Vertex &v) const
 
int snapVertexBarycentrics () const
 
int snapVertexBarycentrics (const SimplexId &tetId, const std::vector< std::pair< SimplexId, SimplexId >> &triangles) const
 
 FiberSurface ()
 
template<class dataTypeU , class dataTypeV , typename triangulationType >
int computeContour (const std::pair< double, double > &rangePoint0, const std::pair< double, double > &rangePoint1, const std::vector< SimplexId > &seedTetList, const triangulationType *const triangulation, const SimplexId &polygonEdgeId=0) const
 
template<class dataTypeU , class dataTypeV >
int computeContour (const std::vector< std::pair< std::pair< double, double >, std::pair< double, double >>> &edgeList, const std::vector< SimplexId > &seedTetList, const std::vector< SimplexId > *edgeIdList=NULL) const
 
template<class dataTypeU , class dataTypeV , typename triangulationType >
int computeSurface (const std::pair< double, double > &rangePoint0, const std::pair< double, double > &rangePoint1, const triangulationType *const triangulation, const SimplexId &polygonEdgeId=0) const
 
template<class dataTypeU , class dataTypeV , typename triangulationType >
int computeSurface (const triangulationType *const triangulation)
 
template<class dataTypeU , class dataTypeV >
int finalize (const bool &mergeDuplicatedVertices=false, const bool &removeSmallEdges=false, const bool &edgeFlips=false, const bool &intersectionRemesh=false)
 
template<class dataTypeU , class dataTypeV , typename triangulationType >
int processTetrahedron (const SimplexId &tetId, const std::pair< double, double > &rangePoint0, const std::pair< double, double > &rangePoint1, const triangulationType *const triangulation, const SimplexId &polygonEdgeId=0) const
 
int setGlobalVertexList (std::vector< Vertex > *globalList)
 
int setInputField (const void *uField, const void *vField)
 
int setPointMerging (const bool &onOff)
 
int setPointMergingThreshold (const double &threshold)
 
int setPointNumber (const SimplexId &number)
 
int setPointSet (const float *pointSet)
 
int setPolygon (const std::vector< std::pair< std::pair< double, double >, std::pair< double, double >>> *polygon)
 
int setPolygonEdgeNumber (const SimplexId &polygonEdgeNumber)
 
int setTetList (const SimplexId *tetList)
 
int setTetNeighbors (const std::vector< std::vector< SimplexId >> *tetNeighbors)
 
int setTetNumber (const SimplexId &tetNumber)
 
int setTriangleList (const SimplexId &polygonEdgeId, std::vector< Triangle > *triangleList)
 
void preconditionTriangulation (AbstractTriangulation *triangulation)
 
int setVertexList (const SimplexId &polygonEdgeId, std::vector< Vertex > *vertexList)
 

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::FiberSurface
bool pointSnapping_ {false}
 
SimplexId pointNumber_ {}
 
SimplexId tetNumber_ {}
 
SimplexId polygonEdgeNumber_ {}
 
const void * uField_ {}
 
const void * vField_ {}
 
const float * pointSet_ {}
 
const SimplexIdtetList_ {}
 
const std::vector< std::vector< SimplexId > > * tetNeighbors_ {}
 
std::array< SimplexId, 12 > edgeImplicitEncoding_
 
double edgeCollapseThreshold_ {Geometry::powIntTen(-FLT_DIG + 2)}
 
double pointSnappingThreshold_ {Geometry::powIntTen(-FLT_DIG + 1)}
 
const std::vector< std::pair< std::pair< double, double >, std::pair< double, double > > > * polygon_ {}
 
std::vector< Vertex > * globalVertexList_ {}
 
std::vector< std::vector< Vertex > * > polygonEdgeVertexLists_ {}
 
std::vector< std::vector< Triangle > * > polygonEdgeTriangleLists_ {}
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

TTK VTK-filter that computes fiber surfaces.

Author
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
Date
October 2015.

Fiber surfaces are defined as the pre-images of curves drawn in the range of bivariate volumetric functions, typically on top of the continuous scatterplot. Fiber surfaces generalize the segmentation features of isosurfaces to bivariate data. This filter implements an exact, parallel and fast algorithm for fiber surface computation on (explicit or implicit) tetrahedral meshes.

The input bivariate data must be provided as two independent scalar fields attached as point data to the input geometry. The input range polygon must be provided as a vtkUnstructuredGrid with the actual 2D locations of the vertices also provided as two independent scalar fields attached as point data to the geometry. See vtkRangePolygon to create such an input polygon from sparse user inputs.

Parameters
Input0Input bivariate volumetric data, either regular grid or triangulation (vtkDataSet)
Input1Input range polygon (vtkUnstructuredGrid)
OutputOutput fiber surface (vtkPolyData)

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.

Related publication
"Fast and Exact Fiber Surface Extraction for Tetrahedral Meshes"
Pavol Klacansky, Julien Tierny, Hamish Carr, Zhao Geng
IEEE Transactions on Visualization and Computer Graphics, 2016.

See also
ttk::FiberSurface
vtkRangePolygon

Definition at line 50 of file ttkFiberSurface.h.

Constructor & Destructor Documentation

◆ ttkFiberSurface()

ttkFiberSurface::ttkFiberSurface ( )
protected

Definition at line 17 of file ttkFiberSurface.cpp.

Member Function Documentation

◆ dispatch()

template<typename VTK_T1 , typename VTK_T2 >
int ttkFiberSurface::dispatch ( ttk::Triangulation *const  triangulation)
protected

Definition at line 42 of file ttkFiberSurface.cpp.

◆ FillInputPortInformation()

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

Definition at line 22 of file ttkFiberSurface.cpp.

◆ FillOutputPortInformation()

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

Definition at line 33 of file ttkFiberSurface.cpp.

◆ New()

static ttkFiberSurface* ttkFiberSurface::New ( )
static

◆ RequestData()

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

Definition at line 58 of file ttkFiberSurface.cpp.

◆ vtkGetMacro() [1/8]

ttkFiberSurface::vtkGetMacro ( CaseIds  ,
bool   
)

◆ vtkGetMacro() [2/8]

ttkFiberSurface::vtkGetMacro ( EdgeIds  ,
bool   
)

◆ vtkGetMacro() [3/8]

ttkFiberSurface::vtkGetMacro ( EdgeParameterization  ,
bool   
)

◆ vtkGetMacro() [4/8]

ttkFiberSurface::vtkGetMacro ( PointMerge  ,
bool   
)

◆ vtkGetMacro() [5/8]

ttkFiberSurface::vtkGetMacro ( PointMergeDistanceThreshold  ,
double   
)

◆ vtkGetMacro() [6/8]

ttkFiberSurface::vtkGetMacro ( RangeCoordinates  ,
bool   
)

◆ vtkGetMacro() [7/8]

ttkFiberSurface::vtkGetMacro ( RangeOctree  ,
bool   
)

◆ vtkGetMacro() [8/8]

ttkFiberSurface::vtkGetMacro ( TetIds  ,
bool   
)

◆ vtkSetMacro() [1/8]

ttkFiberSurface::vtkSetMacro ( CaseIds  ,
bool   
)

◆ vtkSetMacro() [2/8]

ttkFiberSurface::vtkSetMacro ( EdgeIds  ,
bool   
)

◆ vtkSetMacro() [3/8]

ttkFiberSurface::vtkSetMacro ( EdgeParameterization  ,
bool   
)

◆ vtkSetMacro() [4/8]

ttkFiberSurface::vtkSetMacro ( PointMerge  ,
bool   
)

◆ vtkSetMacro() [5/8]

ttkFiberSurface::vtkSetMacro ( PointMergeDistanceThreshold  ,
double   
)

◆ vtkSetMacro() [6/8]

ttkFiberSurface::vtkSetMacro ( RangeCoordinates  ,
bool   
)

◆ vtkSetMacro() [7/8]

ttkFiberSurface::vtkSetMacro ( RangeOctree  ,
bool   
)

◆ vtkSetMacro() [8/8]

ttkFiberSurface::vtkSetMacro ( TetIds  ,
bool   
)

◆ vtkTypeMacro()

ttkFiberSurface::vtkTypeMacro ( ttkFiberSurface  ,
ttkAlgorithm   
)

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