Using grating based X-ray contrast modalities for metrology