A medical system comprising a selection means (25) for selecting at least one of layers in a three-dimensional tomographic image of a retina, and a generation means (26) for generating 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.