ViewFinderSource
Introduction
vtkViewFinderSource creates a view finder: four pairs of bars laid out along the axes of a plane, leaving the center free so that the crosshair marks a position without hiding it. The bars start at radius from the center, are spacing long, and their thickness is derived from radius / width.
Usage
import vtkViewFinderSource from '@kitware/vtk.js/Filters/Sources/ViewFinderSource';
const viewFinder = vtkViewFinderSource.newInstance({ radius: 1, spacing: 2 });
const polydata = viewFinder.getOutputData();Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkViewFinderSource 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 | IViewFinderSourceInitialValues | No | (default: {}) |
getCenter
Get the center of the view finder.
getCenterByReference
Get the center of the view finder.
getOrientation
Get the orientation vector of the view finder.
getOrientationByReference
Get the orientation vector of the view finder.
getRadius
Get the distance from the center at which each bar starts.
getSpacing
Get the length of each bar.
getWidth
Get the ratio between the radius and the half-thickness of each bar. A larger value produces thinner bars.
newInstance
Method used to create a new instance of vtkViewFinderSource.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IViewFinderSourceInitialValues | No | for pre-setting some of its content |
requestData
Expose methods
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setCenter
Set the center of the view finder.
| Argument | Type | Required | Description |
|---|---|---|---|
center | Vector3 | Yes |
setCenter
Set the center of the view finder.
| 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 view finder.
| Argument | Type | Required | Description |
|---|---|---|---|
center | Vector3 | Yes |
setOrientation
Set the orientation for the view finder.
| Argument | Type | Required | Description |
|---|---|---|---|
orientation | Vector3 | Yes |
setOrientation
Set the orientation for the view finder.
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
setOrientationFrom
Set the orientation for the view finder.
| Argument | Type | Required | Description |
|---|---|---|---|
orientation | Vector3 | Yes |
setRadius
Set the distance from the center at which each bar starts.
| Argument | Type | Required | Description |
|---|---|---|---|
radius | Number | Yes |
setSpacing
Set the length of each bar.
| Argument | Type | Required | Description |
|---|---|---|---|
spacing | Number | Yes |
setWidth
Set the ratio between the radius and the half-thickness of each bar.
| Argument | Type | Required | Description |
|---|---|---|---|
width | Number | Yes |