VTK  9.6.1
vtkSplineFilter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
27
28#ifndef vtkSplineFilter_h
29#define vtkSplineFilter_h
30
31#include "vtkFiltersGeneralModule.h" // For export macro
33
34#define VTK_SUBDIVIDE_SPECIFIED 0
35#define VTK_SUBDIVIDE_LENGTH 1
36
37#define VTK_TCOORDS_OFF 0
38#define VTK_TCOORDS_FROM_NORMALIZED_LENGTH 1
39#define VTK_TCOORDS_FROM_LENGTH 2
40#define VTK_TCOORDS_FROM_SCALARS 3
41
42VTK_ABI_NAMESPACE_BEGIN
43class vtkCellArray;
44class vtkCellData;
45class vtkFloatArray;
46class vtkPointData;
47class vtkPoints;
48class vtkSpline;
49
50class VTKFILTERSGENERAL_EXPORT vtkSplineFilter : public vtkPolyDataAlgorithm
51{
52public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
61
63
67 vtkSetClampMacro(MaximumNumberOfSubdivisions, int, 1, VTK_INT_MAX);
68 vtkGetMacro(MaximumNumberOfSubdivisions, int);
70
72
76 vtkGetMacro(Subdivide, int);
79 const char* GetSubdivideAsString();
81
83
88 vtkSetClampMacro(NumberOfSubdivisions, int, 1, VTK_INT_MAX);
89 vtkGetMacro(NumberOfSubdivisions, int);
91
93
98 vtkSetClampMacro(Length, double, 0.0000001, VTK_DOUBLE_MAX);
99 vtkGetMacro(Length, double);
101
103
106 virtual void SetSpline(vtkSpline*);
107 vtkGetObjectMacro(Spline, vtkSpline);
109
111
119 vtkGetMacro(GenerateTCoords, int);
129
131
137 vtkSetClampMacro(TextureLength, double, 0.000001, VTK_INT_MAX);
138 vtkGetMacro(TextureLength, double);
140
142
148 vtkSetMacro(OutputPointsPrecision, int);
149 vtkGetMacro(OutputPointsPrecision, int);
151
152protected:
155
156 // Usual data generation method
158
162 double Length;
168 double TextureLength; // this length is mapped to [0,1) texture space
170
171 // helper methods
172 int GeneratePoints(vtkIdType offset, vtkIdType npts, const vtkIdType* pts, vtkPoints* inPts,
173 vtkPoints* newPts, vtkPointData* pd, vtkPointData* outPD, int genTCoords,
174 vtkFloatArray* newTCoords);
175
176 void GenerateLine(vtkIdType offset, vtkIdType numGenPts, vtkIdType inCellId, vtkCellData* cd,
177 vtkCellData* outCD, vtkCellArray* newLines);
178
179 // helper members
181
182private:
183 vtkSplineFilter(const vtkSplineFilter&) = delete;
184 void operator=(const vtkSplineFilter&) = delete;
185};
186
187VTK_ABI_NAMESPACE_END
188#endif
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:32
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:30
void SetGenerateTCoordsToNormalizedLength()
Control whether and how texture coordinates are produced.
void SetGenerateTCoordsToOff()
Control whether and how texture coordinates are produced.
void SetGenerateTCoordsToUseScalars()
Control whether and how texture coordinates are produced.
vtkSpline * XSpline
virtual void SetSubdivide(int)
Specify how the number of subdivisions is determined.
vtkSpline * ZSpline
static vtkSplineFilter * New()
Construct the class with no limit on the number of subdivisions and using an instance of vtkCardinalS...
void SetSubdivideToLength()
Specify how the number of subdivisions is determined.
~vtkSplineFilter() override
int GeneratePoints(vtkIdType offset, vtkIdType npts, const vtkIdType *pts, vtkPoints *inPts, vtkPoints *newPts, vtkPointData *pd, vtkPointData *outPD, int genTCoords, vtkFloatArray *newTCoords)
void GenerateLine(vtkIdType offset, vtkIdType numGenPts, vtkIdType inCellId, vtkCellData *cd, vtkCellData *outCD, vtkCellArray *newLines)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSpline * YSpline
virtual void SetSpline(vtkSpline *)
Specify an instance of vtkSpline to use to perform the interpolation.
vtkFloatArray * TCoordMap
const char * GetSubdivideAsString()
Specify how the number of subdivisions is determined.
const char * GetGenerateTCoordsAsString()
Control whether and how texture coordinates are produced.
void SetSubdivideToSpecified()
Specify how the number of subdivisions is determined.
void SetGenerateTCoordsToUseLength()
Control whether and how texture coordinates are produced.
virtual void SetGenerateTCoords(int)
Control whether and how texture coordinates are produced.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
spline abstract class for interpolating splines
Definition vtkSpline.h:52
#define VTK_TCOORDS_FROM_SCALARS
#define VTK_TCOORDS_FROM_LENGTH
#define VTK_SUBDIVIDE_LENGTH
#define VTK_TCOORDS_FROM_NORMALIZED_LENGTH
#define VTK_TCOORDS_OFF
#define VTK_SUBDIVIDE_SPECIFIED
int vtkIdType
Definition vtkType.h:368
#define VTK_DOUBLE_MAX
Definition vtkType.h:207
#define VTK_INT_MAX
Definition vtkType.h:197