VMTK
Loading...
Searching...
No Matches
vtkvmtkActiveTubeFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3Program: VMTK
4
5 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
6 See LICENSE file for details.
7
8 Portions of this code are covered under the VTK copyright.
9 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
10 for details.
11
12 Portions of this code are covered under the ITK copyright.
13 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm
14 for details.
15
16 This software is distributed WITHOUT ANY WARRANTY; without even
17 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 PURPOSE. See the above copyright notices for more information.
19
20=========================================================================*/
43
44#ifndef __vtkvmtkActiveTubeFilter_h
45#define __vtkvmtkActiveTubeFilter_h
46
47#include "vtkPolyDataAlgorithm.h"
48#include "vtkvmtkWin32Header.h"
49
50class vtkImageData;
51class vtkDoubleArray;
52
53class VTK_VMTK_SEGMENTATION_EXPORT vtkvmtkActiveTubeFilter : public vtkPolyDataAlgorithm
54{
55 public:
56 vtkTypeMacro(vtkvmtkActiveTubeFilter,vtkPolyDataAlgorithm);
57 void PrintSelf(std::ostream& os, vtkIndent indent) override;
58
60
62
67 virtual void SetPotentialImage(vtkImageData *);
68 vtkGetObjectMacro(PotentialImage, vtkImageData);
70
72
77 vtkSetStringMacro(RadiusArrayName);
78 vtkGetStringMacro(RadiusArrayName);
80
82
87 vtkSetMacro(NumberOfIterations,int);
88 vtkGetMacro(NumberOfIterations,int);
90
92
96 vtkSetMacro(PotentialWeight,double);
97 vtkGetMacro(PotentialWeight,double);
99
101
105 vtkSetMacro(StiffnessWeight,double);
106 vtkGetMacro(StiffnessWeight,double);
108
110
115 vtkSetMacro(Convergence,double);
116 vtkGetMacro(Convergence,double);
118
120
125 vtkSetMacro(CFLCoefficient,double);
126 vtkGetMacro(CFLCoefficient,double);
128
130
134 vtkSetMacro(MinimumRadius,double);
135 vtkGetMacro(MinimumRadius,double);
137
139
143 vtkSetMacro(FixedEndpointCoordinates,int);
144 vtkGetMacro(FixedEndpointCoordinates,int);
145 vtkBooleanMacro(FixedEndpointCoordinates,int);
147
149
153 vtkSetMacro(FixedEndpointRadius,int);
154 vtkGetMacro(FixedEndpointRadius,int);
155 vtkBooleanMacro(FixedEndpointRadius,int);
157
159
167
169
175 vtkBooleanMacro(SplineResamplingWhileIterating,int);
177
179
184 vtkSetMacro(NegativeNormWarnings,int);
185 vtkGetMacro(NegativeNormWarnings,int);
186 vtkBooleanMacro(NegativeNormWarnings,int);
188
189 protected:
192
193 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
194
195 void EvaluateForce(double point[3], double force[3], bool normalize);
196 double EvaluatePotential(double point[3]);
197
198 static bool IsInExtent(vtkIdType extent[6], int ijk[3], vtkIdType border)
199 {
200 return (ijk[0]>=extent[0]+border && ijk[0]<=extent[1]-border) && (ijk[1]>=extent[2]+border && ijk[1]<=extent[3]-border) && (ijk[2]>=extent[4]+border && ijk[2]<=extent[5]-border) ? true : false;
201 }
202
203 static bool IsCellInExtent(int extent[6], int ijk[3], vtkIdType border)
204 {
205 return (ijk[0]>=extent[0]+border && ijk[0]<extent[1]-border) && (ijk[1]>=extent[2]+border && ijk[1]<extent[3]-border) && (ijk[2]>=extent[4]+border && ijk[2]<extent[5]-border) ? true : false;
206 }
207
208 void EvolveCellSpline(vtkPolyData* lines, vtkIdType cellId);
209
211
212 vtkImageData *PotentialImage;
214
217
220
223
225
227
230
232
234
235private:
236 vtkvmtkActiveTubeFilter(const vtkvmtkActiveTubeFilter&); // Not implemented.
237 void operator=(const vtkvmtkActiveTubeFilter&); // Not implemented.
238};
239
240#endif
static bool IsInExtent(vtkIdType extent[6], int ijk[3], vtkIdType border)
static vtkvmtkActiveTubeFilter * New()
static bool IsCellInExtent(int extent[6], int ijk[3], vtkIdType border)
void PrintSelf(std::ostream &os, vtkIndent indent) override
virtual void SetPotentialImage(vtkImageData *)
double EvaluatePotential(double point[3])
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void EvaluateForce(double point[3], double force[3], bool normalize)