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

You need to specify the ctfun with a range of 0 to 255, the default ctfun is ranged over 1024.

const ctfun = vtkColorTransferFunction.newInstance();
ctfun.addRGBPoint(0, 0, 0, 0);
ctfun.addRGBPoint(255, 1.0, 1.0, 1.0);
actor.getProperty().setRGBTransferFunction(0, ctfun);

Hello Ken,

Thank you so much for your help. Let me try this.

Best Regards
Saptarshi

Thank you so much Ken, it worked!