how to read .vti files created from stack of 2d PNG Images and render it in vtk.js

The argument of parseAsArrayBuffer is supposed to be the ArrayBuffer to parse not a string with a file name. Maybe you are trying to provide a url for the browser to download and process? In that case you can call reader.setURL('/data/test2.vti').