ImageMarchingSquares
Introduction
vtkImageMarchingSquares - generate isolines from one slice of a vtkImageData
vtkImageMarchingSquares is a filter that takes a vtkImageData as input and generates, using the marching squares case table, a vtkPolyData containing one polyline per contour value on the selected slice.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkImageMarchingSquares 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 | IImageMarchingSquaresInitialValues | No | (default: {}) |
getContourValues
Get the list of contour values.
getMergePoints
Get whether points shared by neighboring pixels are merged.
getPixelPoints
Cache the world coordinates of the four corners of the pixel whose origin is ijk.
| Argument | Type | Required | Description |
|---|---|---|---|
ijk | Vector3 | Yes | origin of the pixel |
kernelX | Number | Yes | index of the X element |
kernelY | Number | Yes | index of the Y element |
indexToWorld | IndexToWorld | Yes |
getPixelScalars
Cache the point ids and the scalar values of the four corners of the pixel whose origin is ijk.
| Argument | Type | Required | Description |
|---|---|---|---|
ijk | Vector3 | Yes | origin of the pixel |
dims | Vector3 | Yes | dimensions of the image |
scalars | TypedArray or Array[Number] | Yes | |
increments | Vector3 | Yes | IJK slice increments |
kernelX | Number | Yes | index of the X element |
kernelY | Number | Yes | index of the Y element |
getSlice
Get the index of the slice the contours are extracted from.
getSlicingMode
Get the index of the axis along which the image is sliced.
newInstance
Method used to create a new instance of vtkImageMarchingSquares
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IImageMarchingSquaresInitialValues | No | for pre-setting some of its content |
produceLines
Append the line segments contributed by one pixel to points and lines.
| Argument | Type | Required | Description |
|---|---|---|---|
cVal | Number | Yes | contour value |
ijk | Vector3 | Yes | origin of the pixel |
dims | Vector3 | Yes | dimensions of the image |
scalars | TypedArray or Array[Number] | Yes | |
points | Array[Number] | Yes | |
lines | Array[Number] | Yes | |
increments | Vector3 | Yes | IJK slice increments |
kernelX | Number | Yes | index of the X element |
kernelY | Number | Yes | index of the Y element |
indexToWorld | IndexToWorld | Yes |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setContourValues
Set the list of contour values.
| Argument | Type | Required | Description |
|---|---|---|---|
cValues | Array[Number] | Yes |
setMergePoints
Set whether points shared by neighboring pixels are merged.
| Argument | Type | Required | Description |
|---|---|---|---|
mergePoints | Boolean | Yes |
setSlice
Set the index of the slice the contours are extracted from.
| Argument | Type | Required | Description |
|---|---|---|---|
slice | Number | Yes |
setSlicingMode
Set the index of the axis along which the image is sliced (0: I, 1: J, 2: K).
| Argument | Type | Required | Description |
|---|---|---|---|
slicingMode | Number | Yes |