The present invention relates to an oven (101) comprising a heated cavity (102) for cooking a food (201), which comprises a three-dimensional scanning system (106) configured for acquiring information about the volume and/or shape of a food (201) positioned in the heated cavity (102).