VMTK
vtkvmtkCenterlineBranchGeometry.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkCenterlineBranchGeometry.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 =========================================================================*/
30 #ifndef __vtkvmtkCenterlineBranchGeometry_h
31 #define __vtkvmtkCenterlineBranchGeometry_h
32 
33 #include "vtkPolyDataAlgorithm.h"
34 //#include "vtkvmtkComputationalGeometryWin32Header.h"
35 #include "vtkvmtkWin32Header.h"
36 #include "vtkPolyData.h"
37 
38 class vtkPoints;
39 class vtkDoubleArray;
40 class vtkIntArray;
41 
42 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkCenterlineBranchGeometry : public vtkPolyDataAlgorithm
43 {
44  public:
45  vtkTypeMacro(vtkvmtkCenterlineBranchGeometry,vtkPolyDataAlgorithm);
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 
48  static vtkvmtkCenterlineBranchGeometry* New();
49 
50  vtkSetStringMacro(RadiusArrayName);
51  vtkGetStringMacro(RadiusArrayName);
52 
53  vtkSetStringMacro(GroupIdsArrayName);
54  vtkGetStringMacro(GroupIdsArrayName);
55 
56  vtkSetStringMacro(BlankingArrayName);
57  vtkGetStringMacro(BlankingArrayName);
58 
59  vtkSetStringMacro(LengthArrayName);
60  vtkGetStringMacro(LengthArrayName);
61 
62  vtkSetStringMacro(CurvatureArrayName);
63  vtkGetStringMacro(CurvatureArrayName);
64 
65  vtkSetStringMacro(TorsionArrayName);
66  vtkGetStringMacro(TorsionArrayName);
67 
68  vtkSetStringMacro(TortuosityArrayName);
69  vtkGetStringMacro(TortuosityArrayName);
70 
71  vtkSetMacro(MinSubsamplingSpacing,double);
72  vtkGetMacro(MinSubsamplingSpacing,double);
73 
74  vtkSetMacro(SmoothingFactor,double);
75  vtkGetMacro(SmoothingFactor,double);
76 
77  vtkSetMacro(NumberOfSmoothingIterations,int);
78  vtkGetMacro(NumberOfSmoothingIterations,int);
79 
80  vtkSetMacro(LineSmoothing,int);
81  vtkGetMacro(LineSmoothing,int);
82  vtkBooleanMacro(LineSmoothing,int);
83 
84  vtkSetMacro(LineSubsampling,int);
85  vtkGetMacro(LineSubsampling,int);
86  vtkBooleanMacro(LineSubsampling,int);
87 
88  vtkSetMacro(SphereSubsampling,int);
89  vtkGetMacro(SphereSubsampling,int);
90  vtkBooleanMacro(SphereSubsampling,int);
91 
92  protected:
95 
96  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
97 
98  double ComputeGroupLength(vtkPolyData* input, int branchGroupId);
99  double ComputeGroupCurvature(vtkPolyData* input, int branchGroupId);
100  double ComputeGroupTorsion(vtkPolyData* input, int branchGroupId);
101  double ComputeGroupTortuosity(vtkPolyData* input, int branchGroupId, double groupLength);
102 
103  static void SubsampleLine(vtkPoints* linePoints, vtkPoints* subsampledLinePoints, double minSpacing = 0.01);
104  void SphereSubsampleLine(vtkPolyData* input, vtkIdType cellId, vtkPoints* subsampledLinePoints);
105 
109 
114 
118 
122 
123  private:
125  void operator=(const vtkvmtkCenterlineBranchGeometry&); // Not implemented.
126 };
127 
128 #endif
Computes the length, curvature, torsion, and tortuosity each for branch within a split centerline...