Skip to content

A simple real-time brain visualization tool for Rust, based on the three-d crate.

Notifications You must be signed in to change notification settings

dfsp-spirit/brainview-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brainview

A high-level library and a simple viewer (binary) for surface-based structural neuroimaging data, written in Rust.

The brainview crate is based on neuroformats and three-d by Asger Nyman Christiansen. It can visualize brain surface meshes and related per-vertex data computed from magnetic resonance images (MRI) in FreeSurfer, CAT12 and other neuroimaging software packages which can output or convert to a supported file format.

Why brainview?

The goal of the brainview crate is to provide a very high-level wrapper around three-d that allows neuroscientists using Rust for scientific data analyses to look at their data and statisical results directly in Rust -- without having to export their data first and then load them again in a separate viewer application, which is time-consuming and error-prone when looking at many results.

Ideally, you should be able to load and visualize your neuroimaging data with two function calls.

Usage

This is WIP, come back another day. Once it's ready, the project will be split into a lib crate for libbrainview and a binary crate for the brainviewer application.

You can have a look at src/main.rs to see the client code used to create the prototype below.

Running the current prototype

If you insist and have a recent Rust toolchain installed, you can build the current prototype from source and run it like this:

git clone https://github.com/dfsp-spirit/neuroformats-rs
git clone https://github.com/dfsp-spirit/brainview-rs
cd brainview-rs/
cargo build --release

cargo run

Note that you need the neuroformats-rs repo in the same directory as it is currently loaded from there. (Yes, this is WIP.)

This will open a 3D window and show a rotating brain mesh, with vertex colors representing cortical thickness:

Vis

About

A simple real-time brain visualization tool for Rust, based on the three-d crate.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages