How to convert a CFD .VTI File into a Signed Distance Function Format

I am currently trying to use Pytorch to train CFD images and wanted the input images for my network to be in a Signed Distance Function (SDF) format : Signed distance function - Wikipedia . I have managed to convert the .VTI file from the CFD into a NumPy array, but the array is of the size 36,603 x 3 and so is not a feasible image to enter. However, I wish to convert this array into a size of 256 x 256 and then create an SDF mapped image. Any help would be really valuable