RTAnalyticSource
Introduction
vtkRTAnalyticSource creates an image for regression testing. The image is filled with the sum of a gaussian centered on center and of a sinusoid whose amplitude and natural frequency are given per axis, plus a constant offset.
Usage
import vtkRTAnalyticSource from '@kitware/vtk.js/Filters/Sources/RTAnalyticSource';
const source = vtkRTAnalyticSource.newInstance({
wholeExtent: [0, 63, 0, 63, 0, 63],
});
const imageData = source.getOutputData();Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkRTAnalyticSource 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 | IRTAnalyticSourceInitialValues | No | (default: {}) |
getCenter
Get the center of the gaussian, expressed in voxel index.
getCenterByReference
Get the center of the gaussian, expressed in voxel index.
getDataDirection
Get the direction matrix of the output image.
getDataDirectionByReference
Get the direction matrix of the output image.
getFrequency
Get the natural frequency of the sinusoid along each axis.
getFrequencyByReference
Get the natural frequency of the sinusoid along each axis.
getMagnitude
Get the amplitude of the sinusoid along each axis.
getMagnitudeByReference
Get the amplitude of the sinusoid along each axis.
getMaximum
Get the maximum value of the gaussian.
getOffset
Get the constant value added to every voxel.
getStandardDeviation
Get the standard deviation of the gaussian.
getWholeExtent
Get the extent of the output image.
getWholeExtentByReference
Get the extent of the output image.
newInstance
Method used to create a new instance of vtkRTAnalyticSource.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IRTAnalyticSourceInitialValues | 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 gaussian, expressed in voxel index.
| Argument | Type | Required | Description |
|---|---|---|---|
center | Vector3 | Yes |
setCenter
Set the center of the gaussian, expressed in voxel index.
| 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 gaussian, expressed in voxel index.
| Argument | Type | Required | Description |
|---|---|---|---|
center | Vector3 | Yes |
setDataDirection
Set the direction matrix of the output image.
| Argument | Type | Required | Description |
|---|---|---|---|
e00 | Number | Yes | |
e01 | Number | Yes | |
e02 | Number | Yes | |
e10 | Number | Yes | |
e11 | Number | Yes | |
e12 | Number | Yes | |
e20 | Number | Yes | |
e21 | Number | Yes | |
e22 | Number | Yes |
setDataDirection
Set the direction matrix of the output image.
| Argument | Type | Required | Description |
|---|---|---|---|
dataDirection | Matrix3x3 | Yes |
setDataDirectionFrom
Set the direction matrix of the output image.
| Argument | Type | Required | Description |
|---|---|---|---|
dataDirection | Matrix3x3 | Yes |
setFrequency
Set the natural frequency of the sinusoid along each axis.
| Argument | Type | Required | Description |
|---|---|---|---|
frequency | Vector3 | Yes |
setFrequency
Set the natural frequency of the sinusoid along each axis.
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x frequency. |
y | Number | Yes | The y frequency. |
z | Number | Yes | The z frequency. |
setFrequencyFrom
Set the natural frequency of the sinusoid along each axis.
| Argument | Type | Required | Description |
|---|---|---|---|
frequency | Vector3 | Yes |
setMagnitude
Set the amplitude of the sinusoid along each axis.
| Argument | Type | Required | Description |
|---|---|---|---|
magnitude | Vector3 | Yes |
setMagnitude
Set the amplitude of the sinusoid along each axis.
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x magnitude. |
y | Number | Yes | The y magnitude. |
z | Number | Yes | The z magnitude. |
setMagnitudeFrom
Set the amplitude of the sinusoid along each axis.
| Argument | Type | Required | Description |
|---|---|---|---|
magnitude | Vector3 | Yes |
setMaximum
Set the maximum value of the gaussian.
| Argument | Type | Required | Description |
|---|---|---|---|
maximum | Number | Yes |
setOffset
Set the constant value added to every voxel.
| Argument | Type | Required | Description |
|---|---|---|---|
offset | Number | Yes |
setStandardDeviation
Set the standard deviation of the gaussian.
| Argument | Type | Required | Description |
|---|---|---|---|
standardDeviation | Number | Yes |
setWholeExtent
Set the extent of the output image.
| Argument | Type | Required | Description |
|---|---|---|---|
x1 | Number | Yes | |
x2 | Number | Yes | |
y1 | Number | Yes | |
y2 | Number | Yes | |
z1 | Number | Yes | |
z2 | Number | Yes |
setWholeExtent
Set the extent of the output image.
| Argument | Type | Required | Description |
|---|---|---|---|
wholeExtent | Extent | Yes |
setWholeExtentFrom
Set the extent of the output image.
| Argument | Type | Required | Description |
|---|---|---|---|
wholeExtent | Extent | Yes |