Utility functions for looking up branch reference system points by group id.
More...
#include <vtkvmtkReferenceSystemUtilities.h>
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.
◆ Superclass
◆ vtkvmtkReferenceSystemUtilities()
| vtkvmtkReferenceSystemUtilities::vtkvmtkReferenceSystemUtilities |
( |
| ) |
|
|
inlineprotected |
◆ ~vtkvmtkReferenceSystemUtilities()
| vtkvmtkReferenceSystemUtilities::~vtkvmtkReferenceSystemUtilities |
( |
| ) |
|
|
inlineprotected |
◆ IsTypeOf()
| int vtkvmtkReferenceSystemUtilities::IsTypeOf |
( |
const char * | type | ) |
|
|
static |
◆ IsA()
| virtual int vtkvmtkReferenceSystemUtilities::IsA |
( |
const char * | type | ) |
|
|
virtual |
◆ SafeDownCast()
◆ NewInstanceInternal()
| virtual vtkObjectBase * vtkvmtkReferenceSystemUtilities::NewInstanceInternal |
( |
| ) |
const |
|
protectedvirtual |
◆ NewInstance()
◆ New()
◆ 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: