VMTK
vtkvmtkPolyDataBranchSections.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkPolyDataBranchSections.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 =========================================================================*/
39 #ifndef __vtkvmtkPolyDataBranchSections_h
40 #define __vtkvmtkPolyDataBranchSections_h
41 
42 #include "vtkPolyDataAlgorithm.h"
43 //#include "vtkvmtkComputationalGeometryWin32Header.h"
44 #include "vtkvmtkWin32Header.h"
45 #include "vtkPolyData.h"
46 
47 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkPolyDataBranchSections : public vtkPolyDataAlgorithm
48 {
49  public:
50  vtkTypeMacro(vtkvmtkPolyDataBranchSections,vtkPolyDataAlgorithm);
51  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 
53  static vtkvmtkPolyDataBranchSections* New();
54 
55  vtkSetStringMacro(GroupIdsArrayName);
56  vtkGetStringMacro(GroupIdsArrayName);
57 
58  vtkSetObjectMacro(Centerlines,vtkPolyData);
59  vtkGetObjectMacro(Centerlines,vtkPolyData);
60 
61  vtkSetStringMacro(CenterlineRadiusArrayName);
62  vtkGetStringMacro(CenterlineRadiusArrayName);
63 
64  vtkSetStringMacro(CenterlineGroupIdsArrayName);
65  vtkGetStringMacro(CenterlineGroupIdsArrayName);
66 
67  vtkSetStringMacro(CenterlineIdsArrayName);
68  vtkGetStringMacro(CenterlineIdsArrayName);
69 
70  vtkSetStringMacro(CenterlineTractIdsArrayName);
71  vtkGetStringMacro(CenterlineTractIdsArrayName);
72 
73  vtkSetStringMacro(BlankingArrayName);
74  vtkGetStringMacro(BlankingArrayName);
75 
76  vtkSetStringMacro(BranchSectionAreaArrayName);
77  vtkGetStringMacro(BranchSectionAreaArrayName);
78 
79  vtkSetStringMacro(BranchSectionMinSizeArrayName);
80  vtkGetStringMacro(BranchSectionMinSizeArrayName);
81 
82  vtkSetStringMacro(BranchSectionMaxSizeArrayName);
83  vtkGetStringMacro(BranchSectionMaxSizeArrayName);
84 
85  vtkSetStringMacro(BranchSectionShapeArrayName);
86  vtkGetStringMacro(BranchSectionShapeArrayName);
87 
88  vtkSetStringMacro(BranchSectionGroupIdsArrayName);
89  vtkGetStringMacro(BranchSectionGroupIdsArrayName);
90 
91  vtkSetStringMacro(BranchSectionClosedArrayName);
92  vtkGetStringMacro(BranchSectionClosedArrayName);
93 
94  vtkSetStringMacro(BranchSectionDistanceSpheresArrayName);
95  vtkGetStringMacro(BranchSectionDistanceSpheresArrayName);
96 
97  vtkSetMacro(NumberOfDistanceSpheres,int);
98  vtkGetMacro(NumberOfDistanceSpheres,int);
99 
100  vtkSetMacro(ReverseDirection,int);
101  vtkGetMacro(ReverseDirection,int);
102  vtkBooleanMacro(ReverseDirection,int);
103 
104  static double ComputeBranchSectionArea(vtkPolyData* branchSection);
105  static double ComputeBranchSectionShape(vtkPolyData* branchSection, double center[3], double sizeRange[2]);
106 
107  static void ExtractCylinderSection(vtkPolyData* cylinder, double origin[3], double normal[3], vtkPolyData* section, bool & closed);
108 
109  protected:
112 
113  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
114 
115  void ComputeBranchSections(vtkPolyData* input, int groupId, vtkPolyData* output);
116 
117  vtkPolyData* Centerlines;
118 
125 
133 
136 
137  private:
139  void operator=(const vtkvmtkPolyDataBranchSections&); // Not implemented.
140 };
141 
142 #endif
Extract a vessel (cross) section n-spheres distance from from the start point of a branch...