TubeFilter
Introduction
vtkTubeFilter - A filter that generates tubes around lines
vtkTubeFilter is a filter that generates a tube around each input line. The tubes are made up of triangle strips and rotate around the tube with the rotation of the line normals. (If no normals are present, they are computed automatically.) The radius of the tube can be set to vary with scalar or vector value. If the radius varies with scalar value the radius is linearly adjusted. If the radius varies with vector value, a mass flux preserving variation is used. The number of sides for the tube also can be specified. You can also specify which of the sides are visible. This is useful for generating interesting striping effects. Other options include the ability to cap the tube and generate texture coordinates. Texture coordinates can be used with an associated texture map to create interesting effects such as marking the tube with stripes corresponding to length or time.
This filter is typically used to create thick or dramatic lines. Another common use is to combine this filter with vtkStreamTracer to generate streamtubes.
!!! warning The number of tube sides must be greater than 3.
!!! warning The input line must not have duplicate points, or normals at points that are parallel to the incoming/outgoing line segments. If a line does not meet this criteria, then that line is not tubed.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkTubeFilter characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | ITubeFilterInitialValues | No | (default: {}) |
getCapping
Get whether the capping is enabled or not.
getDefaultNormal
Get the default normal value.
getGenerateTCoords
Get generateTCoords value.
getNumberOfSides
Get the number of sides for the tube.
getOffset
Get offset value.
getOnRatio
Get onRatio value.
getOutputPointsPrecision
Get the desired precision for the output types.
getRadius
Get the minimum tube radius.
getRadiusFactor
Get the maximum tube radius in terms of a multiple of the minimum radius.
getSidesShareVertices
Get sidesShareVertices value.
getTextureLength
Get textureLength value.
getUseDefaultNormal
Get useDefaultNormal value.
getVaryRadius
Get variation of tube radius with scalar or vector values.
newInstance
Method used to create a new instance of vtkTubeFilter
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | ITubeFilterInitialValues | No | for pre-setting some of its content |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setCapping
Enable / disable capping the ends of the tube with polygons.
| Argument | Type | Required | Description |
|---|---|---|---|
capping | Boolean | Yes |
setDefaultNormal
Set the default normal to use if no normals are supplied. Requires that useDefaultNormal is set.
| Argument | Type | Required | Description |
|---|---|---|---|
defaultNormal | Yes |
setGenerateTCoords
Control whether and how texture coordinates are produced. This is useful for stripping the tube with length textures, etc. If you use scalars to create the texture, the scalars are assumed to be monotonically increasing (or decreasing).
| Argument | Type | Required | Description |
|---|---|---|---|
generateTCoords | GenerateTCoords | Yes |
setNumberOfSides
Set the number of sides for the tube. At a minimum, number of sides is 3.
| Argument | Type | Required | Description |
|---|---|---|---|
numberOfSides | Number | Yes |
setOffset
Control the stripping of tubes. The offset sets the first tube side that is visible. Offset is generally used with onRatio to create nifty stripping effects.
| Argument | Type | Required | Description |
|---|---|---|---|
offset | Number | Yes |
setOnRatio
Control the stripping of tubes. If OnRatio is greater than 1, then every nth tube side is turned on, beginning with the offset side.
| Argument | Type | Required | Description |
|---|---|---|---|
onRatio | Number | Yes |
setOutputPointsPrecision
Set the desired precision for the output types.
| Argument | Type | Required | Description |
|---|---|---|---|
outputPointsPrecision | DesiredOutputPrecision | Yes |
setRadius
Set the minimum tube radius (minimum because the tube radius may vary).
| Argument | Type | Required | Description |
|---|---|---|---|
radius | Number | Yes |
setRadiusFactor
Set the maximum tube radius in terms of a multiple of the minimum radius.
| Argument | Type | Required | Description |
|---|---|---|---|
radiusFactor | Number | Yes |
setSidesShareVertices
Control whether the tube sides should share vertices. This creates independent strips, with constant normals so the tube is always faceted in appearance.
| Argument | Type | Required | Description |
|---|---|---|---|
sidesShareVertices | Boolean | Yes |
setTextureLength
Control the conversion of units during texture coordinates calculation. The texture length indicates what length (whether calculated from scalars or length) is mapped to [0, 1) texture space.
| Argument | Type | Required | Description |
|---|---|---|---|
textureLength | Number | Yes |
setUseDefaultNormal
Control whether to use the defaultNormal.
| Argument | Type | Required | Description |
|---|---|---|---|
useDefaultNormal | Boolean | Yes |
setVaryRadius
Enable or disable variation of tube radius with scalar or vector values.
| Argument | Type | Required | Description |
|---|---|---|---|
varyRadius | VaryRadius | Yes |