A method based on sub aperture stitching for measurement of a freeform wavefront is proposed and applied to wavefronts calculated from the slope data acquired using a Talbot wavefront sensor. The presented theory is tested experimentally on the example of a cubic wavefront generated by a phase plate. A comparison with a commercial Shack Hartmann Sensor is done.