X-ray diffraction for food quality evaluation