20 #ifndef __vtkCurveGenerator_h 21 #define __vtkCurveGenerator_h 24 #include <vtkParametricFunction.h> 25 #include <vtkPointLocator.h> 26 #include <vtkPolyData.h> 27 #include <vtkPolyDataAlgorithm.h> 28 #include <vtkSetGet.h> 29 #include <vtkSmartPointer.h> 37 #include "vtkSlicerMarkupsModuleMRMLExport.h" 46 void PrintSelf(ostream& os, vtkIndent indent)
override;
50 vtkSetMacro(CurveIsClosed,
bool);
51 vtkGetMacro(CurveIsClosed,
bool);
52 vtkBooleanMacro(CurveIsClosed,
bool);
55 void SetCurveIsLoop(
bool loop) { this->SetCurveIsClosed(loop); }
66 CURVE_TYPE_LINEAR_SPLINE = 0,
73 vtkGetMacro(CurveType,
int);
74 vtkSetMacro(CurveType,
int);
75 static const char* GetCurveTypeAsString(
int id);
76 static int GetCurveTypeFromString(
const char* name);
83 virtual bool IsInterpolatingCurve();
86 vtkSetMacro(NumberOfPointsPerInterpolatingSegment,
int);
87 vtkGetMacro(NumberOfPointsPerInterpolatingSegment,
int);
90 vtkGetMacro(KochanekBias,
double);
91 vtkSetMacro(KochanekBias,
double);
94 vtkGetMacro(KochanekContinuity,
double);
95 vtkSetMacro(KochanekContinuity,
double);
98 vtkGetMacro(KochanekTension,
double);
99 vtkSetMacro(KochanekTension,
double);
102 vtkGetMacro(KochanekEndsCopyNearestDerivatives,
bool);
103 vtkSetMacro(KochanekEndsCopyNearestDerivatives,
bool);
106 vtkGetMacro(PolynomialOrder,
int);
107 vtkSetMacro(PolynomialOrder,
int);
122 SORTING_METHOD_INDEX = 0,
126 vtkGetMacro(PolynomialPointSortingMethod,
int);
127 vtkSetMacro(PolynomialPointSortingMethod,
int);
128 static const char* GetPolynomialPointSortingMethodAsString(
int id);
129 static int GetPolynomialPointSortingMethodFromString(
const char* name);
140 POLYNOMIAL_FIT_METHOD_GLOBAL_LEAST_SQUARES = 0,
142 POLYNOMIAL_FIT_METHOD_LAST
144 vtkGetMacro(PolynomialFitMethod,
double);
145 vtkSetMacro(PolynomialFitMethod,
double);
146 static const char* GetPolynomialFitMethodAsString(
int id);
147 static int GetPolynomialFitMethodFromString(
const char* name);
152 vtkGetMacro(PolynomialSampleWidth,
double);
153 vtkSetMacro(PolynomialSampleWidth,
double);
159 POLYNOMIAL_WEIGHT_FUNCTION_RECTANGULAR = 0,
163 POLYNOMIAL_WEIGHT_FUNCTION_LAST
165 vtkGetMacro(PolynomialWeightFunction,
double);
166 vtkSetMacro(PolynomialWeightFunction,
double);
167 static const char* GetPolynomialWeightFunctionAsString(
int id);
168 static int GetPolynomialWeightFunctionFromString(
const char* name);
175 int GetSurfaceCostFunctionType();
176 void SetSurfaceCostFunctionType(
int surfaceCostFunctionType);
180 vtkIdType GetControlPointIdFromInterpolatedPointId(vtkIdType interpolatedPointId);
183 vtkIdList* GetSurfacePointIds();
186 double GetOutputCurveLength();
192 void SetInputPoints(vtkPoints* points);
195 vtkPoints* GetOutputPoints();
202 static void SortByIndex(vtkPoints* inputPoints, vtkDoubleArray* outputParameters);
214 static void SortByMinimumSpanningTreePosition(vtkPoints* inputPoints, vtkDoubleArray* outputParameters);
242 void SetParametricFunctionToSpline(vtkPoints* inputPoints, vtkSpline* xSpline, vtkSpline* ySpline, vtkSpline* zSpline);
243 void SetParametricFunctionToLinearSpline(vtkPoints* inputPoints);
244 void SetParametricFunctionToCardinalSpline(vtkPoints* inputPoints);
245 void SetParametricFunctionToKochanekSpline(vtkPoints* inputPoints);
246 void SetParametricFunctionToPolynomial(vtkPoints* inputPoints);
247 int GeneratePoints(vtkPoints* inputPoints, vtkPolyData* inputSurface, vtkPolyData* outputPolyData);
248 int GeneratePointsFromFunction(vtkPoints* inputPoints, vtkPoints* outputPoints, vtkDoubleArray* outputPedigreeIdArray);
249 int GeneratePointsFromSurface(vtkPoints* inputPoints, vtkPolyData* inputSurface, vtkPoints* outputPoints, vtkDoubleArray* outputPedigreeIdArray);
250 int GenerateLines(vtkPolyData* polyData);
252 int FillInputPortInformation(
int port, vtkInformation* info)
override;
253 int RequestData(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
override;
void SetPolynomialWeightFunctionToCosine()
Filter that generates curves between points of an input polydata.
Filter that generates curves between points of an input polydata.
void SetPolynomialWeightFunctionToGaussian()
void SetCurveTypeToShortestDistanceOnSurface()
void SetCurveTypeToPolynomial()
int NumberOfPointsPerInterpolatingSegment
void SetPolynomialPointSortingMethodToIndex()
int PolynomialPointSortingMethod
std::vector< vtkIdType > InterpolatedPointIdsForControlPoints
vtkSmartPointer< vtkPointLocator > SurfacePointLocator
void SetPolynomialFitMethodToMovingLeastSquares()
void SetPolynomialWeightFunctionToTriangular()
void SetPolynomialFitMethodToGlobalLeastSquares()
vtkSmartPointer< vtkDoubleArray > InputParameters
double PolynomialSampleWidth
bool KochanekEndsCopyNearestDerivatives
void SetCurveTypeToKochanekSpline()
vtkSmartPointer< vtkParametricFunction > ParametricFunction
int PolynomialWeightFunction
void SetPolynomialPointSortingMethodToMinimumSpanningTreePosition()
void SetPolynomialWeightFunctionToRectangular()
double KochanekContinuity
void SetCurveTypeToCardinalSpline()
vtkParametricFunction * GetParametricFunction()
The internal instance of the current parametric function use of the curve for other computations...
void SetCurveTypeToLinearSpline()
vtkSmartPointer< vtkSlicerDijkstraGraphGeodesicPath > SurfacePathFilter