ConcentricCylinderSource
Introduction
vtkConcentricCylinderSource creates a set of concentric cylinders sharing the same axis. Each layer is defined by its radius and can carry its own cell field value, which is stored in the layer cell array of the output polydata. Layers can individually be hidden with a mask, and the faces shared by two visible layers can be skipped.
Usage
import vtkConcentricCylinderSource from '@kitware/vtk.js/Filters/Sources/ConcentricCylinderSource';
const cylinder = vtkConcentricCylinderSource.newInstance({
height: 2,
radius: [0.5, 1, 2],
cellFields: [0, 1, 2],
});
const polydata = cylinder.getOutputData();Methods
addRadius
Add a new layer with the given radius. When no cell field is provided, the index of the new layer is used.
| Argument | Type | Required | Description |
|---|---|---|---|
radius | Number | Yes | |
cellField | Number | No |
clearRadius
Remove every layer along with their cell fields.
extend
Method used to decorate a given object (publicAPI+model) with vtkConcentricCylinderSource 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 | IConcentricCylinderSourceInitialValues | No | (default: {}) |
getCellFields
Get the cell field value of each layer.
getCellFieldsByReference
Get the cell field value of each layer.
getCenter
Get the center of the cylinder.
getCenterByReference
Get the center of the cylinder.
getDirection
Get the orientation vector of the cylinder.
getDirectionByReference
Get the orientation vector of the cylinder.
getEndTheta
Get the angular sector ending angle in degrees.
getHeight
Get the height of the cylinder.
getMaskLayer
Get whether the given layer is hidden.
| Argument | Type | Required | Description |
|---|---|---|---|
index | Number | Yes |
getMaskLayer
Get the full hidden-layer mask, or null when no mask is set.
getNumberOfRadius
Get the number of layers.
getRadius
Get the radius of the given layer.
| Argument | Type | Required | Description |
|---|---|---|---|
index | Number | No | (default: 0) |
getResolution
Get the number of facets used to represent each cylinder.
getSkipInnerFaces
Get whether the faces shared by two visible layers are skipped.
getStartTheta
Get the angular sector starting angle in degrees.
newInstance
Method used to create a new instance of vtkConcentricCylinderSource.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IConcentricCylinderSourceInitialValues | No | for pre-setting some of its content |
removeMask
Clear the hidden-layer mask so that every layer is visible.
requestData
Expose methods
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setCellField
Set the cell field value of the given layer.
| Argument | Type | Required | Description |
|---|---|---|---|
index | Number | Yes | |
field | Number | Yes |
setCenter
Set the center of the cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
center | Vector3 | Yes |
setCenter
Set the center of the cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
setCenterFrom
Set the center of the cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
center | Vector3 | Yes |
setDirection
Set the direction for the cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
direction | Vector3 | Yes |
setDirection
Set the direction for the cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
setDirectionFrom
Set the direction for the cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
direction | Vector3 | Yes |
setEndTheta
Set the angular sector ending angle in degrees.
| Argument | Type | Required | Description |
|---|---|---|---|
endTheta | Number | Yes |
setHeight
Set the height of the cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
height | Number | Yes |
setMaskLayer
Hide or show the given layer.
| Argument | Type | Required | Description |
|---|---|---|---|
index | Number | Yes | |
hidden | Boolean | Yes |
setRadius
Set the radius of an already existing layer.
| Argument | Type | Required | Description |
|---|---|---|---|
index | Number | Yes | |
radius | Number | Yes |
setResolution
Set the number of facets used to represent each cylinder.
| Argument | Type | Required | Description |
|---|---|---|---|
resolution | Number | Yes |
setSkipInnerFaces
Turn on/off the generation of the faces that are shared by two consecutive visible layers.
| Argument | Type | Required | Description |
|---|---|---|---|
skipInnerFaces | Boolean | Yes |
setStartTheta
Set the angular sector starting angle in degrees.
| Argument | Type | Required | Description |
|---|---|---|---|
startTheta | Number | Yes |