ImageHelper
Methods
canvasToImageData
Takes a canvas and converts it to a vtkImageData.
Optionally supply a bounding box to get a particular subset of the canvas.
| Argument | Type | Required | Description |
|---|---|---|---|
canvas | HTMLCanvasElement | Yes | The HTML canvas to convert. |
boundingBox | Array[Number] | No | A bounding box array. |
imageToImageData
Converts an Image object to a vtkImageData.
| Argument | Type | Required | Description |
|---|---|---|---|
image | HTMLImageElement | Yes | The HTML image to convert. |
transform | ITransform | No | The transform object to apply to the image. |