Skip to content

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 ​

js
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.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIViewFinderSourceInitialValuesNo(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.

ArgumentTypeRequiredDescription
initialValuesIViewFinderSourceInitialValuesNofor pre-setting some of its content

requestData ​

Expose methods

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setCenter ​

Set the center of the view finder.

ArgumentTypeRequiredDescription
centerVector3Yes

setCenter ​

Set the center of the view finder.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

setCenterFrom ​

Set the center of the view finder.

ArgumentTypeRequiredDescription
centerVector3Yes

setOrientation ​

Set the orientation for the view finder.

ArgumentTypeRequiredDescription
orientationVector3Yes

setOrientation ​

Set the orientation for the view finder.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

setOrientationFrom ​

Set the orientation for the view finder.

ArgumentTypeRequiredDescription
orientationVector3Yes

setRadius ​

Set the distance from the center at which each bar starts.

ArgumentTypeRequiredDescription
radiusNumberYes

setSpacing ​

Set the length of each bar.

ArgumentTypeRequiredDescription
spacingNumberYes

setWidth ​

Set the ratio between the radius and the half-thickness of each bar.

ArgumentTypeRequiredDescription
widthNumberYes