vtk.js example

I have attached VolumeMapper.html file. I am trying to execute on browser but i got the error
GET http://localhost:8080/webapp/anyfilename.vti/index.json 404 (Not Found)

I referred https://kitware.github.io/vtk-js/examples/VolumeMapper.html link. I want to display 3D volume data on browser. Also i have ‘anyfilename.vti’ file which contain numeric data.

I am new in JavaScript. I have few quetions. Please help me and give me the suggetions

  1. Why index.json file is required and what it is exactly?
  2. Why its showing inside the anyfilename.vti file ?

VolumeMapper.html (2.4 KB)

In that example the httpDataSetReader is used which is a specific format for vtk.js.
The root path is not a file, like you may think, but a directory that should contain a description of its content defined inside a index.json file.

To read the native vti file format, you need to use the vtkXMLImageDataReader.
That reader is even used in that example.

I changed httpDataSetReader to vtkXMLImageDataReader and it works .
Thank you

1 Like