How to read .vtkjs files

Hey,

I need an example of how to read volumes with .vtkjs extension, I’m considering using it because .VTI file takes too long to charge from the server and to render,

Also I will be grateful if you guide me to how to reduce the volume charging and the rendering times using the VTI file or the DICOM files directly or any file extension that is faster

I’m assuming download and unpacking times? VTI files shouldn’t be terribly slow, but decompression could lock up the main thread for large files. @Sebastien_Jourdain would have to describe the .vtkjs file format. An alternative approach could be to use NRRD or other medical file format and use itk-wasm to load the images, which might be faster.

1 Like

I mean an even better format is passing the typed array buffer directly over the network using the gz transport compression. At that point it is up to you to rebuild the vtkImageData from it. The .vtkjs won’t buy you anything compare to .vti as you will still rely on JS/Gzip decompression.

1 Like

Thank you for your answers @Forrest and @Sebastien_Jourdain ,

Yes passing the typed array buffer directly over the network, I will consider this solution but what is exactly the role of itk-wasm? could it be used in the place of vtk.js to visualize MRI? if not What is its role in speeding up the donwnload/unpacking times?

  • itk provides readers and filters for images
  • vtk provides the rendering part

Since itk use webassembly for reading many data format and rely on web workers for doing the work, it provides more flexibility in term of data handling than vtkjs.

1 Like

Thank you for your answer