Your code seems to be very different from the VTK.js example. Where is currentImage coming from ?
currentImage