A medical imaging apparatus includes processing circuitry configured to acquire a volumetric data set, acquire location information for a layer that is part of a structure represented in the volumetric data set, and perform a ray casting algorithm to generate a rendered image from the volumetric data set. The ray casting algorithm includes, for each of a plurality of rays cast through a volume of the volume of the volumetric data set: determining data values for a plurality of sample positions along the ray; estimating, based on the location information, a position of an intersection point at which the ray intersects the layer; and using a precomputed function to determine a contribution of the intersection point to an aggregated color for the ray.