Convert stacks 2D images to 3D Volume


I have a stack of images in grayscale. I would like display this in openGL in volume form. There are images of MRI (Medical) What is the process please?


You need to write a volumetric renderer. You can extract a surface from the voxel data. You can do this by simply using cubes (like Minecraft, see or you can use something more complex that gives nicer results like Marching Cubes or Surface Nets.

Alternatively, you can ray cast the voxel data in a fragment shader after loading the layered images into a 3D texture.