Is there a way to get access to ImageSlice data as they are rendered?

I have built a widget to create a histogram for selected area. It works similar to 3D Slicer Segment Editor Effect - Local Threshold, except for the fact that when the interpolation is on - the shape of “my version” of histogram is less smooth.
The main reason for this difference is that I am using data from vtkImageData and as I know from Kyle Sunderland in 3DSlicer “the values used in the histogram are drawn from the resampled image that is displayed in the slice view. The smoothing is just the result of the linear interpolation applied on the image”.
Is there a way I can do similar thing in VTK js? How can I get access to voxel (actually pixel) intensities after interpolation? I was checking the code of 3dslicer but seems to me that the interface in Python is different than vtk.js.

I’ve been looking at this as well. When the image is smoothed then it’s shown as a kind of a set of “iso-contours”. How can we get access to those intensities? Is there a filter that given a smoothed image and an ROI, e.g. a rectangle, returns all the smoothed intensities the ROI?