Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkSplineFilter Class Reference

`#include <vtkSplineFilter.h>`

Inheritance diagram for vtkSplineFilter:

[legend]
Collaboration diagram for vtkSplineFilter:

[legend]
List of all members.

## Detailed Description

generate uniformly subdivided polylines from a set of input polyline using a vtkSpline

Date:
  2002/11/03 22:51:56

Revision:
  1.5

vtkSplineFilter is a filter that generates an output polylines from an input set of polylines. The polylines are uniformly subdivided and produced with the help of a vtkSpline class that the user can specify (by default a vtkCardinalSpline is used). The number of subdivisions of the line can be controlled in several ways. The user can either specify the number of subdivisions or a length of each subdivision can be provided (and the class will figure out how many subdivisions is required over the whole polyline). The maximum number of subdivisions can also be set.

The output of this filter is a polyline per input polyline (or line). New points and texture coordinates are created. Point data is interpolated and cell data passed on. Any polylines with less than two points, or who have coincident points, are ignored.

See also:
  vtkRibbonFilter vtkTubeFilter

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (91%)
  - Cedilnik, Andy (6%)

CVS logs (CVSweb):
  - .`cxx` (`/Graphics/vtkSplineFilter.cxx)`
  - .`h` (`/Graphics/vtkSplineFilter.h)`

Tests:
  vtkSplineFilter (Tests)

Definition at line 74 of file vtkSplineFilter.h.

## Public Types

typedef vtkPolyDataToPolyDataFilter | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual void | SetMaximumNumberOfSubdivisions (int)
virtual int | GetMaximumNumberOfSubdivisions ()
virtual void | SetSubdivide (int)
virtual int | GetSubdivide ()
void | SetSubdivideToSpecified ()
void | SetSubdivideToLength ()
const char * | GetSubdivideAsString ()
virtual void | SetNumberOfSubdivisions (int)
virtual int | GetNumberOfSubdivisions ()
virtual void | SetLength (float)
virtual float | GetLength ()
virtual void | SetSpline (vtkSpline *)
virtual vtkSpline * | GetSpline ()
virtual void | SetGenerateTCoords (int)
virtual int | GetGenerateTCoords ()
void | SetGenerateTCoordsToOff ()
void | SetGenerateTCoordsToNormalizedLength ()
void | SetGenerateTCoordsToUseLength ()
void | SetGenerateTCoordsToUseScalars ()
const char * | GetGenerateTCoordsAsString ()
virtual void | SetTextureLength (float)
virtual float | GetTextureLength ()

## Static Public Methods

int | IsTypeOf (const char *type)
vtkSplineFilter * | SafeDownCast (vtkObject *o)
vtkSplineFilter * | New ()

## Protected Methods

| vtkSplineFilter ()
| ~vtkSplineFilter ()
void | Execute ()
int | GeneratePoints (vtkIdType offset, vtkIdType npts, 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)

## Protected Attributes

int | MaximumNumberOfSubdivisions
int | Subdivide
int | NumberOfSubdivisions
float | Length
vtkSpline * | Spline
vtkSpline * | XSpline
vtkSpline * | YSpline
vtkSpline * | ZSpline
int | GenerateTCoords
float | TextureLength
vtkFloatArray * | TCoordMap

## Member Typedef Documentation

typedef vtkPolyDataToPolyDataFilter vtkSplineFilter::Superclass

| Reimplemented from vtkPolyDataToPolyDataFilter. Definition at line 77 of file vtkSplineFilter.h.

## Constructor & Destructor Documentation

vtkSplineFilter::vtkSplineFilter | ( |  | ) | `[protected]`

vtkSplineFilter::~vtkSplineFilter | ( |  | ) | `[protected]`

## Member Function Documentation

virtual const char* vtkSplineFilter::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkPolyDataToPolyDataFilter.

int vtkSplineFilter::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkPolyDataToPolyDataFilter.

virtual int vtkSplineFilter::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkPolyDataToPolyDataFilter.

vtkSplineFilter* vtkSplineFilter::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkPolyDataToPolyDataFilter.

void vtkSplineFilter::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkPolyDataToPolyDataFilter.

vtkSplineFilter* vtkSplineFilter::New | ( |  | ) | `[static]`

| Construct the class with no limit on the number of subdivisions and using an instance of vtkCardinalSpline to perform interpolation. Reimplemented from vtkObject.

virtual void vtkSplineFilter::SetMaximumNumberOfSubdivisions | ( | int |  | ) | `[virtual]`

| Set the maximum number of subdivisions that are created for each polyline.

virtual int vtkSplineFilter::GetMaximumNumberOfSubdivisions | ( |  | ) | `[virtual]`

| Set the maximum number of subdivisions that are created for each polyline.

virtual void vtkSplineFilter::SetSubdivide | ( | int |  | ) | `[virtual]`

| Specify how the number of subdivisions is determined.

virtual int vtkSplineFilter::GetSubdivide | ( |  | ) | `[virtual]`

| Specify how the number of subdivisions is determined.

void vtkSplineFilter::SetSubdivideToSpecified | ( |  | ) | `[inline]`

| Specify how the number of subdivisions is determined. Definition at line 95 of file vtkSplineFilter.h. References VTK_SUBDIVIDE_SPECIFIED.

void vtkSplineFilter::SetSubdivideToLength | ( |  | ) | `[inline]`

| Specify how the number of subdivisions is determined. Definition at line 97 of file vtkSplineFilter.h. References VTK_SUBDIVIDE_LENGTH.

const char* vtkSplineFilter::GetSubdivideAsString | ( |  | ) |

| Specify how the number of subdivisions is determined.

virtual void vtkSplineFilter::SetNumberOfSubdivisions | ( | int |  | ) | `[virtual]`

| Set the number of subdivisions that are created for the polyline. This method only has effect if Subdivisions is set to SetSubdivisionsToSpecify().

virtual int vtkSplineFilter::GetNumberOfSubdivisions | ( |  | ) | `[virtual]`

| Set the number of subdivisions that are created for the polyline. This method only has effect if Subdivisions is set to SetSubdivisionsToSpecify().

virtual void vtkSplineFilter::SetLength | ( | float |  | ) | `[virtual]`

| Control the number of subdivisions that are created for the polyline based on an absolute length. The length of the spline is divided by this length to determine the number of subdivisions.

virtual float vtkSplineFilter::GetLength | ( |  | ) | `[virtual]`

| Control the number of subdivisions that are created for the polyline based on an absolute length. The length of the spline is divided by this length to determine the number of subdivisions.

virtual void vtkSplineFilter::SetSpline | ( | vtkSpline * |  | ) | `[virtual]`

| Specify an instance of vtkSpline to use to perform the interpolation.

virtual vtkSpline* vtkSplineFilter::GetSpline | ( |  | ) | `[virtual]`

| Specify an instance of vtkSpline to use to perform the interpolation.

virtual void vtkSplineFilter::SetGenerateTCoords | ( | int |  | ) | `[virtual]`

| Control whether and how texture coordinates are produced. This is useful for striping the output polyline. The texture coordinates can be generated in three ways: a normalized (0,1) generation; based on the length (divided by the texture length); and by using the input scalar values.

virtual int vtkSplineFilter::GetGenerateTCoords | ( |  | ) | `[virtual]`

| Control whether and how texture coordinates are produced. This is useful for striping the output polyline. The texture coordinates can be generated in three ways: a normalized (0,1) generation; based on the length (divided by the texture length); and by using the input scalar values.

void vtkSplineFilter::SetGenerateTCoordsToOff | ( |  | ) | `[inline]`

| Control whether and how texture coordinates are produced. This is useful for striping the output polyline. The texture coordinates can be generated in three ways: a normalized (0,1) generation; based on the length (divided by the texture length); and by using the input scalar values. Definition at line 133 of file vtkSplineFilter.h. References VTK_TCOORDS_OFF.

void vtkSplineFilter::SetGenerateTCoordsToNormalizedLength | ( |  | ) | `[inline]`

| Control whether and how texture coordinates are produced. This is useful for striping the output polyline. The texture coordinates can be generated in three ways: a normalized (0,1) generation; based on the length (divided by the texture length); and by using the input scalar values. Definition at line 135 of file vtkSplineFilter.h. References VTK_TCOORDS_FROM_NORMALIZED_LENGTH.

void vtkSplineFilter::SetGenerateTCoordsToUseLength | ( |  | ) | `[inline]`

| Control whether and how texture coordinates are produced. This is useful for striping the output polyline. The texture coordinates can be generated in three ways: a normalized (0,1) generation; based on the length (divided by the texture length); and by using the input scalar values. Definition at line 137 of file vtkSplineFilter.h. References VTK_TCOORDS_FROM_LENGTH.

void vtkSplineFilter::SetGenerateTCoordsToUseScalars | ( |  | ) | `[inline]`

| Control whether and how texture coordinates are produced. This is useful for striping the output polyline. The texture coordinates can be generated in three ways: a normalized (0,1) generation; based on the length (divided by the texture length); and by using the input scalar values. Definition at line 139 of file vtkSplineFilter.h. References VTK_TCOORDS_FROM_SCALARS.

const char* vtkSplineFilter::GetGenerateTCoordsAsString | ( |  | ) |

| Control whether and how texture coordinates are produced. This is useful for striping the output polyline. The texture coordinates can be generated in three ways: a normalized (0,1) generation; based on the length (divided by the texture length); and by using the input scalar values.

virtual void vtkSplineFilter::SetTextureLength | ( | float |  | ) | `[virtual]`

| Control the conversion of units during the texture coordinates calculation. The TextureLength indicates what length (whether calculated from scalars or length) is mapped to the [0,1) texture space.

virtual float vtkSplineFilter::GetTextureLength | ( |  | ) | `[virtual]`

| Control the conversion of units during the texture coordinates calculation. The TextureLength indicates what length (whether calculated from scalars or length) is mapped to the [0,1) texture space.

void vtkSplineFilter::Execute | ( |  | ) | `[protected, virtual]`

| This method is the old style execute method Reimplemented from vtkSource.

int vtkSplineFilter::GeneratePoints | ( | vtkIdType | offset,
|  | vtkIdType | npts,
|  | vtkIdType * | pts,
|  | vtkPoints * | inPts,
|  | vtkPoints * | newPts,
|  | vtkPointData * | pd,
|  | vtkPointData * | outPD,
|  | int | genTCoords,
|  | vtkFloatArray * | newTCoords
| ) | `[protected]`

void vtkSplineFilter::GenerateLine | ( | vtkIdType | offset,
|  | vtkIdType | numGenPts,
|  | vtkIdType | inCellId,
|  | vtkCellData * | cd,
|  | vtkCellData * | outCD,
|  | vtkCellArray * | newLines
| ) | `[protected]`

## Member Data Documentation

int vtkSplineFilter::MaximumNumberOfSubdivisions`[protected]`

| Definition at line 160 of file vtkSplineFilter.h.

int vtkSplineFilter::Subdivide`[protected]`

| Definition at line 161 of file vtkSplineFilter.h.

int vtkSplineFilter::NumberOfSubdivisions`[protected]`

| Definition at line 162 of file vtkSplineFilter.h.

float vtkSplineFilter::Length`[protected]`

| Definition at line 163 of file vtkSplineFilter.h.

vtkSpline* vtkSplineFilter::Spline`[protected]`

| Definition at line 164 of file vtkSplineFilter.h.

vtkSpline* vtkSplineFilter::XSpline`[protected]`

| Definition at line 165 of file vtkSplineFilter.h.

vtkSpline* vtkSplineFilter::YSpline`[protected]`

| Definition at line 166 of file vtkSplineFilter.h.

vtkSpline* vtkSplineFilter::ZSpline`[protected]`

| Definition at line 167 of file vtkSplineFilter.h.

int vtkSplineFilter::GenerateTCoords`[protected]`

| Definition at line 168 of file vtkSplineFilter.h.

float vtkSplineFilter::TextureLength`[protected]`

| Definition at line 169 of file vtkSplineFilter.h.

vtkFloatArray* vtkSplineFilter::TCoordMap`[protected]`

| Definition at line 181 of file vtkSplineFilter.h.

The documentation for this class was generated from the following file:

- Graphics/vtkSplineFilter.h