VMTK
vtkvmtkCenterlineUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkCenterlineUtilities.h,v $
5 Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  This software is distributed WITHOUT ANY WARRANTY; without even
15  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  PURPOSE. See the above copyright notices for more information.
17 
18 =========================================================================*/
28 #ifndef __vtkvmtkCenterlineUtilities_h
29 #define __vtkvmtkCenterlineUtilities_h
30 
31 #include "vtkObject.h"
32 //#include "vtkvmtkComputationalGeometryWin32Header.h"
33 #include "vtkvmtkWin32Header.h"
34 
35 class vtkPolyData;
36 class vtkPoints;
37 class vtkIdList;
38 
39 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkCenterlineUtilities : public vtkObject
40 {
41 public:
42  vtkTypeMacro(vtkvmtkCenterlineUtilities,vtkObject);
43  static vtkvmtkCenterlineUtilities* New();
44 
45  static vtkIdType GetMaxGroupId(vtkPolyData* centerlines, const char* groupIdsArrayName);
46 
47  static void GetGroupsIdList(vtkPolyData* centerlines, const char* groupIdsArrayName, vtkIdList* groupIds);
48 
49  static void GetGroupsIdList(vtkPolyData* centerlines, const char* groupIdsArrayName, const char* blankingArrayName, int blanked, vtkIdList* groupIds);
50 
51  static void GetNonBlankedGroupsIdList(vtkPolyData* centerlines, const char* groupIdsArrayName, const char* blankingArrayName, vtkIdList* groupIds);
52 
53  static void GetBlankedGroupsIdList(vtkPolyData* centerlines, const char* groupIdsArrayName, const char* blankingArrayName, vtkIdList* groupIds);
54 
55  static void GetGroupCellIds(vtkPolyData* centerlines, const char* groupIdsArrayName, vtkIdType groupId, vtkIdList* groupCellIds);
56 
57  static void GetGroupUniqueCellIds(vtkPolyData* centerlines, const char* groupIdsArrayName, vtkIdType groupId, vtkIdList* groupCellIds);
58 
59  static void GetCenterlineCellIds(vtkPolyData* centerlines, const char* centerlineIdsArrayName, vtkIdType centerlineId, vtkIdList* centerlineCellIds);
60 
61  static void GetCenterlineCellIds(vtkPolyData* centerlines, const char* centerlineIdsArrayName, const char* tractIdsArrayName, vtkIdType centerlineId, vtkIdList* centerlineCellIds);
62 
63  static int IsGroupBlanked(vtkPolyData* centerlines, const char* groupIdsArrayName, const char* blankingArrayName, vtkIdType groupId);
64 
65  static int IsCellBlanked(vtkPolyData* centerlines, const char* blankingArrayName, vtkIdType cellId);
66 
67  static void FindAdjacentCenterlineGroupIds(vtkPolyData* centerlines, const char* groupIdsArrayName, const char* centerlineIdsArrayName, const char* tractIdsArrayName, vtkIdType groupId, vtkIdList* upStreamGroupIds, vtkIdList* downStreamGroupIds);
68 
69  static void InterpolatePoint(vtkPolyData* centerlines, int cellId, int subId, double pcoord, double interpolatedPoint[3]);
70 
71  static void InterpolateTuple(vtkPolyData* centerlines, const char* arrayName, int cellId, int subId, double pcoord, double* interpolatedTuple);
72 
73  static void InterpolateTuple1(vtkPolyData* centerlines, const char* arrayName, int cellId, int subId, double pcoord, double& interpolatedTuple1)
74  {
75  InterpolateTuple(centerlines,arrayName,cellId,subId,pcoord,&interpolatedTuple1);
76  }
77 
78  static void InterpolateTuple3(vtkPolyData* centerlines, const char* arrayName, int cellId, int subId, double pcoord, double interpolatedTuple3[3])
79  {
80  InterpolateTuple(centerlines,arrayName,cellId,subId,pcoord,interpolatedTuple3);
81  }
82 
83  static void FindMergingPoints(vtkPolyData* centerlines, vtkPoints* mergingPoints, double tolerance);
84 
85 protected:
88 
89 private:
90  vtkvmtkCenterlineUtilities(const vtkvmtkCenterlineUtilities&); // Not implemented.
91  void operator=(const vtkvmtkCenterlineUtilities&); // Not implemented.
92 };
93 
94 #endif
static void InterpolateTuple1(vtkPolyData *centerlines, const char *arrayName, int cellId, int subId, double pcoord, double &interpolatedTuple1)
static void InterpolateTuple3(vtkPolyData *centerlines, const char *arrayName, int cellId, int subId, double pcoord, double interpolatedTuple3[3])
Collection of functions which are used when working with split and grouped centerlines.