I am trying to resample freesurfer thickness maps in cortesian coordinates to 2d flat map of spherical coordinates of elevation and azimut as follows from scheme: