VMTK
Loading...
Searching...
No Matches
vtkvmtkReferenceSystemUtilities Class Reference

Utility functions for looking up branch reference system points by group id. More...

#include <vtkvmtkReferenceSystemUtilities.h>

Inheritance diagram for vtkvmtkReferenceSystemUtilities:
[legend]
Collaboration diagram for vtkvmtkReferenceSystemUtilities:
[legend]

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkReferenceSystemUtilities * NewInstance () const

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkvmtkReferenceSystemUtilities * SafeDownCast (vtkObjectBase *o)
static vtkvmtkReferenceSystemUtilities * New ()
static vtkIdType GetReferenceSystemPointId (vtkPolyData *referenceSystems, const char *groupIdsArrayName, vtkIdType groupId)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkReferenceSystemUtilities ()
 ~vtkvmtkReferenceSystemUtilities ()

Detailed Description

Utility functions for looking up branch reference system points by group id.

A reference systems poly data (as produced e.g. by vtkvmtkCenterlineBranchExtractor / vtkvmtkCenterlineBifurcationReferenceSystems) stores one point per branch group, tagged with the group's id in a point data array. This class provides a static helper to find the point id corresponding to a given group id, used by other filters (e.g. vtkvmtkPolyDataReferenceSystemBoundaryMetricFilter) that need to relate a branch to its reference system origin.

See also
vtkvmtkPolyDataReferenceSystemBoundaryMetricFilter, vtkvmtkCenterlineBifurcationReferenceSystems

Definition at line 42 of file vtkvmtkReferenceSystemUtilities.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkReferenceSystemUtilities()

vtkvmtkReferenceSystemUtilities::vtkvmtkReferenceSystemUtilities ( )
inlineprotected

Definition at line 55 of file vtkvmtkReferenceSystemUtilities.h.

55{};

◆ ~vtkvmtkReferenceSystemUtilities()

vtkvmtkReferenceSystemUtilities::~vtkvmtkReferenceSystemUtilities ( )
inlineprotected

Definition at line 56 of file vtkvmtkReferenceSystemUtilities.h.

56{};

Member Function Documentation

◆ IsTypeOf()

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

◆ IsA()

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

◆ SafeDownCast()

vtkvmtkReferenceSystemUtilities * vtkvmtkReferenceSystemUtilities::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkReferenceSystemUtilities::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkvmtkReferenceSystemUtilities * vtkvmtkReferenceSystemUtilities::NewInstance ( ) const

◆ New()

vtkvmtkReferenceSystemUtilities * vtkvmtkReferenceSystemUtilities::New ( )
static

◆ GetReferenceSystemPointId()

vtkIdType vtkvmtkReferenceSystemUtilities::GetReferenceSystemPointId ( vtkPolyData * referenceSystems,
const char * groupIdsArrayName,
vtkIdType groupId )
static

Return the id of the point of referenceSystems whose groupIdsArrayName point data value equals groupId, or -1 if no such point is found.

Definition at line 30 of file vtkvmtkReferenceSystemUtilities.cxx.

31{
32 vtkDataArray* groupIdsArray = referenceSystems->GetPointData()->GetArray(groupIdsArrayName);
33 int numberOfPoints = referenceSystems->GetNumberOfPoints();
34
35 vtkIdType pointId = -1;
36 for (int i=0; i<numberOfPoints; i++)
37 {
38 vtkIdType current_groupId = static_cast<int>(groupIdsArray->GetComponent(i,0));
39 if (current_groupId == groupId)
40 {
41 pointId = i;
42 break;
43 }
44 }
45 return pointId;
46}

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