I have searched the vtk.js API and examples and I am unable to find out how to load a vtkTexture from a JPEG image retrieved from a URL. Similar to vtkJPEGReader in standard VTK. Any help would be appreciated.
Donny_Zimmerman (Donny Zimmerman) #1
Sebastien_Jourdain (Sebastien Jourdain) #2
const img = new Image(); img.src = 'http://url/to/your/image.jpg'; const texture = vtkTexture.newInstance(); texture.setImage(img);
Donny_Zimmerman (Donny Zimmerman) #3
Thanks Sebastien! That was much simpler than I thought! I am really excited about using VTK.js and will try to help contribute to the examples when I can.