I have a 3D image that I'm trying to transform, with a known coordinate mapping. I'm trying to use map_coordinates but the scipy documentation only talks about mapping to a 1D vector leaving me rather confused.
The transformation is vectorized so I can give it a meshgrid of x y z indices and it produces a 3 x nx x ny x nz array, where the first index goes over the xyz components of the vector field and the others correspond directly to the meshgrid input dimensions
Now I just need to map the array elements of an output array to the corresponding pixels in the initial image. I want to use map_coordinates but the format of the coordinates argument is not clear to me.
Can anyone give me an example of how I would create the coordinates array in this case?