Skip to content

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.

ArgumentTypeRequiredDescription
canvasHTMLCanvasElementYesThe HTML canvas to convert.
boundingBoxArray[Number]NoA bounding box array.

imageToImageData ​

Converts an Image object to a vtkImageData.

ArgumentTypeRequiredDescription
imageHTMLImageElementYesThe HTML image to convert.
transformITransformNoThe transform object to apply to the image.