Raytracing and volume render in vanilla webgpu

Hi all, just wanted to share something I’ve been working on. It’s a volume render of an entire mri scan in nifti format. I wrote a tissue segmentation algorithm to automatically identify different brain tissues( gray matter, white matter , csf) and highlight them in different colors . The segmentation algorithm uses a mix of first and second derivatives and hessian plots to map tissue gradient magnitude and curvature in 3d space. Basically mimicking how the sulci and gyri of the brain itself curve and how we perceive them. I’m hoping to expand this to micmic full physical properties of the brain itself so this is a work in progress. The codebase is written in wgsl/webgpu , javascript and python ( for data analysis i.e matplotlib, scipy and nibabel).