|In Brief||A rudimentary example of using the Volume Rendering Skeleton code to render basic MRI data in NIfTI or .hdr/.img format (whatever that is). Support for other formats (like vol) can be added easily.... more|
The way this works is to load the MRI data into a single-channel OpenGL 3D Texture. The texture values are sampled inside the Fragment shader and mapped to colors by the transfers function (which is a 4 channel 1D texture). The vertex shader is only there to assign the proper texture coordinates to the image planes (you can assign the coordinates directly to the image planes themselves from within Python but it's more work).
You should see something like this (which is the MRI_head dataset in hdr/img format):
If you intend to work with NIfTI files, you will need to install PyNIfTI. The PyNIfTI sites provides a number of precompiled packages for several common distributions... if you are running Fedora 11 you can use the F10 nifticlib packages from the OpenSUSE package site but will have to install PyNIfTI from source (which isn't actually a big deal with easy_install)
r - Reload shader sources
l - Toggle lighting