OHIF / react-vtkjs-viewport

VTK.js image viewport component in React
https://react-vtkjs-viewport.netlify.com/
MIT License
142 stars 81 forks source link

failed to load headsq.vti and its .gz data file into browser #134

Open gzt036 opened 3 years ago

gzt036 commented 3 years ago

the http request to load headsq.vti always results in a 'download completed' dialog box, i tried with IE, chrome and firefox and the behaviour is the same. does this happen to you as well? just run the example in the development mode.

gzt036 commented 3 years ago

the problem is with vtk.js\Sources\IO\Core\DataAccessHelper\HttpDataAccessHelper.js Line 122

  // Make request
  xhr.open('GET', url, true);
  xhr.responseType =
    options.compression || array.dataType !== 'string'
      ? 'arraybuffer'
      : 'text';
  xhr.send();

xhr.responseType is set to 'arraybuffer', which is correct, the url to load is 1839938295fe4f0839c9df8d9fa67137.gz in public/headsq/data directory , after xhr.send(), instead of returning a 200 response, it opens a diaglog and returns a 204 response.