VMTK
vtkvmtkPolyDataFlowExtensionsFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkPolyDataFlowExtensionsFilter.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 __vtkvmtkPolyDataFlowExtensionsFilter_h
31 #define __vtkvmtkPolyDataFlowExtensionsFilter_h
32 
33 #include "vtkPolyDataAlgorithm.h"
34 #include "vtkPolyData.h"
35 #include "vtkIdList.h"
36 #include "vtkvmtkWin32Header.h"
37 
38 class VTK_VMTK_COMPUTATIONAL_GEOMETRY_EXPORT vtkvmtkPolyDataFlowExtensionsFilter : public vtkPolyDataAlgorithm
39 {
40  public:
41  vtkTypeMacro(vtkvmtkPolyDataFlowExtensionsFilter,vtkPolyDataAlgorithm);
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43 
45 
46  vtkSetObjectMacro(Centerlines,vtkPolyData);
47  vtkGetObjectMacro(Centerlines,vtkPolyData);
48 
49  vtkSetMacro(ExtensionRatio,double);
50  vtkGetMacro(ExtensionRatio,double);
51 
52  vtkSetMacro(ExtensionLength,double);
53  vtkGetMacro(ExtensionLength,double);
54 
55  vtkSetMacro(ExtensionRadius,double);
56  vtkGetMacro(ExtensionRadius,double);
57 
58  vtkSetMacro(TransitionRatio,double);
59  vtkGetMacro(TransitionRatio,double);
60 
61  vtkSetMacro(Sigma,double);
62  vtkGetMacro(Sigma,double);
63 
64  vtkSetMacro(CenterlineNormalEstimationDistanceRatio,double);
65  vtkGetMacro(CenterlineNormalEstimationDistanceRatio,double);
66 
67  vtkSetMacro(AdaptiveExtensionLength,int);
68  vtkGetMacro(AdaptiveExtensionLength,int);
69  vtkBooleanMacro(AdaptiveExtensionLength,int);
70 
71  vtkSetMacro(AdaptiveExtensionRadius,int);
72  vtkGetMacro(AdaptiveExtensionRadius,int);
73  vtkBooleanMacro(AdaptiveExtensionRadius,int);
74 
75  vtkSetMacro(NumberOfBoundaryPoints,int);
76  vtkGetMacro(NumberOfBoundaryPoints,int);
77 
78  vtkSetMacro(AdaptiveNumberOfBoundaryPoints,int);
79  vtkGetMacro(AdaptiveNumberOfBoundaryPoints,int);
80  vtkBooleanMacro(AdaptiveNumberOfBoundaryPoints,int);
81 
82  vtkSetObjectMacro(BoundaryIds,vtkIdList);
83  vtkGetObjectMacro(BoundaryIds,vtkIdList);
84 
85  vtkSetMacro(ExtensionMode,int);
86  vtkGetMacro(ExtensionMode,int);
88  { this->SetExtensionMode(USE_NORMAL_TO_BOUNDARY); }
90  { this->SetExtensionMode(USE_CENTERLINE_DIRECTION); }
91 
92  vtkSetMacro(InterpolationMode,int);
93  vtkGetMacro(InterpolationMode,int);
95  { this->SetInterpolationMode(USE_LINEAR_INTERPOLATION); }
97  { this->SetInterpolationMode(USE_THIN_PLATE_SPLINE_INTERPOLATION); }
98 
99 //BTX
100  enum {
101  USE_NORMAL_TO_BOUNDARY = 0,
102  USE_CENTERLINE_DIRECTION
103  };
104 
105  enum {
106  USE_LINEAR_INTERPOLATION = 0,
107  USE_THIN_PLATE_SPLINE_INTERPOLATION
108  };
109 //ETX
110 
111  protected:
114 
115  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
116 
117  vtkPolyData* Centerlines;
118 
122 
124  double Sigma;
125 
127 
130 
133 
136 
137  vtkIdList* BoundaryIds;
138 
139  private:
141  void operator=(const vtkvmtkPolyDataFlowExtensionsFilter&); // Not implemented.
142 };
143 
144 #endif
remove the end caps of a surface at flow inlets/outlets and append a cylinder with matching radius th...