A lightweigt html5 renderer for fmri volumes
Project description
fMRI-Volumetric-Renderer
A volumetric fMRI renderer for jupyter notebook. Built using WebGL.
This project presents a method for visualizing volumetric MRI and fMRI data based on a discrete raytracing algorithm and OpenGL. Data is pre-processed and then attached to the html template document, the renderer itself is written in html. This method presents a lightweight renderer that can be used to visualize fMRI data in the output of a jupyter notebook.
Interactive example: Here
Python Render Pipeline Usage
Get the package from the pip repository using the python pip command
pip install fMRI-Volumetric-Renderer
Display volume from file
import nibabel as nib
import torch
from volume_plot_utils import plotter
#load an example nifti file
brainData = nib.load("data/sub-0x/func/subject-data-file.nii.gz")
#load the nifti data into a pytorch tensor
activationSequence = torch.tensor(brainData.get_fdata().T)
#use the displayVolume function to display the volumetric data in ipynb
plotter.displayVolume(activationSequence)
General HTML Template Usage
The example python shows usage with pytroch and nibabel but html displays can be created from a template by substituting keywords from the template file: see plotter.py for more information
Interactive example: Here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for fMRI Volumetric Renderer-0.2.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 584acdb2f03f1de5256f7c253fb3063c8ab9d9a2ae12f576b9dc1c585e6deb7d |
|
MD5 | 79394988c98b96c503ae31173c2569d0 |
|
BLAKE2b-256 | b0b4342a60d581529d6ac6996a473ab0c878676fde5c255f3620b31a5e503ba3 |
Hashes for fMRI_Volumetric_Renderer-0.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e7e2c6503fe84ef991cd9974e4ad35adb9b42ffc047f325825cc75a0098d3f |
|
MD5 | 8d50adb3dce19610656de90e1192aad8 |
|
BLAKE2b-256 | 1c1537f5f6aa4c65fee9c294044320edd90a0627f167157894b9cc723ef68151 |