Brain segmentation on .VTK head surface

Yes exactly, I forgot to edit it, thank you so much,
I don’t know how to solve the problems of Extent (you can see in the CodeSandBox),
my volume and polydata have not the same Bounds values

GetScalarPointer: Pixel 113.70,159.73,-5.47 is not in memory. Current extent = 0,181,0,255,0,255

I tried to do something like this :
image.setExtent(polydata.getBounds())
but it seems that is not the right solution.