How to write vti files for use in vtk.js

.vti are indeed XML files. The directory with a json file is a conversion from a vti file, but not a vti file. The XML file should be loaded with IO/XML/XMLImageDataReader while the directory structure with JSON should be loaded with IO/Core/HttpDataSetReader. Either of those could produce the same dataset. So pick the appropriate reader that match your data. The rest of the code should remain the same.