32 #ifndef __vtkvmtkPolyDataPotentialFit_h 33 #define __vtkvmtkPolyDataPotentialFit_h 35 #include "vtkPolyDataAlgorithm.h" 36 #include "vtkvmtkWin32Header.h" 46 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
50 virtual void SetPotentialImage(vtkImageData *);
51 vtkGetObjectMacro(PotentialImage, vtkImageData);
53 virtual void SetInflationImage(vtkImageData *);
54 vtkGetObjectMacro(InflationImage, vtkImageData);
56 vtkSetMacro(InflationThreshold,
double);
57 vtkGetMacro(InflationThreshold,
double);
59 vtkSetMacro(NumberOfIterations,
int);
60 vtkGetMacro(NumberOfIterations,
int);
62 vtkSetMacro(NumberOfStiffnessSubIterations,
int);
63 vtkGetMacro(NumberOfStiffnessSubIterations,
int);
65 vtkSetMacro(NumberOfInflationSubIterations,
int);
66 vtkGetMacro(NumberOfInflationSubIterations,
int);
68 vtkSetMacro(Relaxation,
double);
69 vtkGetMacro(Relaxation,
double);
71 vtkSetMacro(PotentialWeight,
double);
72 vtkGetMacro(PotentialWeight,
double);
74 vtkSetMacro(StiffnessWeight,
double);
75 vtkGetMacro(StiffnessWeight,
double);
77 vtkSetMacro(InflationWeight,
double);
78 vtkGetMacro(InflationWeight,
double);
80 vtkSetMacro(Convergence,
double);
81 vtkGetMacro(Convergence,
double);
83 vtkSetMacro(MaxTimeStep,
double);
84 vtkGetMacro(MaxTimeStep,
double);
86 vtkSetMacro(TimeStep,
double);
87 vtkGetMacro(TimeStep,
double);
89 vtkSetMacro(AdaptiveTimeStep,
int);
90 vtkGetMacro(AdaptiveTimeStep,
int);
91 vtkBooleanMacro(AdaptiveTimeStep,
int);
93 vtkSetMacro(FlipNormals,
int);
94 vtkGetMacro(FlipNormals,
int);
95 vtkBooleanMacro(FlipNormals,
int);
97 vtkSetMacro(UsePotentialInInflation,
int);
98 vtkGetMacro(UsePotentialInInflation,
int);
99 vtkBooleanMacro(UsePotentialInInflation,
int);
101 vtkSetMacro(Dimensionality,
int);
102 vtkGetMacro(Dimensionality,
int);
108 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
110 void EvaluateForce(
double point[3],
double force[3],
bool normalize =
true);
111 double EvaluatePotential(
double point[3]);
112 double EvaluateInflation(
double point[3]);
113 void ComputeDisplacements(
bool potential,
bool stiffness,
bool inflation);
114 void ComputePotentialDisplacement(vtkIdType pointId,
double potentialDisplacement[3]);
115 void ComputeStiffnessDisplacement(vtkIdType pointId,
double stiffnessDisplacement[3]);
116 void ComputeInflationDisplacement(vtkIdType pointId,
double inflationDisplacement[3]);
117 void ComputeTimeStep();
118 void ApplyDisplacements();
120 int TestConvergence();
122 static double ComputeMinSpacing(
double spacing[3]);
124 static bool IsInExtent(vtkIdType extent[6],
int ijk[3], vtkIdType border)
126 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;
131 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;
Create an explicitly deformable model which evolves a surface to gradient magnitudes of an input imag...
int NumberOfStiffnessSubIterations
vtkvmtkNeighborhoods * Neighborhoods
vtkDoubleArray * Displacements
static bool IsCellInExtent(int extent[6], int ijk[3], vtkIdType border)
vtkImageData * InflationImage
static bool IsInExtent(vtkIdType extent[6], int ijk[3], vtkIdType border)
double MinPotentialSpacing
vtkImageData * PotentialImage
vtkImageData * PotentialGradientImage
double MaxDisplacementNorm
int UsePotentialInInflation
double InflationThreshold
Create an empty, polydata, polydata manifold, polydata manifold extended, or unstructured grid neighb...
int NumberOfInflationSubIterations