A medical system comprising a selection unit configured to select at least one of layers in a three-dimensional tomographic image of a retina, and a generation unit configured to generate an opacity function indicating an opacity of each of a plurality of voxels constituting the selected layer, based on a frequency distribution of luminance values of the plurality of voxels.