# vtk.js example

**URL:** https://discourse.vtk.org/t/vtk-js-example/2462
**Category:** Web
**Created:** [January 20, 2020, 10:13am UTC](https://discourse.vtk.org/t/vtk-js-example/2462 "2020-01-20T10:13:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![snehal](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@snehal](https://discourse.vtk.org/u/snehal)
#### Post date: [January 20, 2020, 10:13am UTC](https://discourse.vtk.org/t/vtk-js-example/2462/1 "2020-01-20T10:13:13Z")

</div>

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](http://localhost:8080/webapp/anyfilename.vti/index.json) 404 (Not Found)

I referred [https://kitware.github.io/vtk-js/examples/VolumeMapper.html](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](https://discourse.vtk.org/uploads/short-url/pbFAs1oYPS8e2SgZXqVSknJmunA.html) (2.4 KB)

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [January 20, 2020, 12:11pm UTC](https://discourse.vtk.org/t/vtk-js-example/2462/2 "2020-01-20T12:11:43Z")

</div>

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`](https://github.com/Kitware/vtk-js/tree/master/Sources/IO/XML/XMLImageDataReader).  
That reader is even used in that [example](https://kitware.github.io/vtk-js/examples/VolumeViewer.html).

---

<div class="post-metadata">

### Author: ![snehal](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@snehal](https://discourse.vtk.org/u/snehal)
#### Post date: [January 22, 2020, 8:23am UTC](https://discourse.vtk.org/t/vtk-js-example/2462/3 "2020-01-22T08:23:14Z")

</div>

I changed httpDataSetReader to vtkXMLImageDataReader and it works .  
Thank you
