neuroformats-rs
Handling of structural neuroimaging file formats for Rust.
This crate provides access to structural neuroimaging data in Rust by implementing parsers for various file formats. The focus is on surface-based brain morphometry data, as produced from 3D MRI images by tools like FreeSurfer, CAT12 or others.
Installation
This is work in progress, come back another day. It will be available on crates.io once a first version is ready.
Features
- Read FreeSurfer per-vertex data in curv format (like
subject/surf/lh.thickness): functionneuroformats::read_curv - Read brain meshes in FreeSurfer binary mesh format (like
subject/surf/lh.white):neuroformats::read_surf - Read FreeSurfer label files (like
subject/label/lh.cortex.label):neuroformats::read_label - Read FreeSurfer brain surface parcellations (like
subject/label/lh.aparc.annot):neuroformats::read_annot
Usage example
Read vertex-wise cortical thickness computed by FreeSurfer:
use read_curv;
curv = read_curv;
You now have a Vec<f32> with the cortical thickness values in curv.data. The order of the values matches the vertex order of the respective brain surface reconstruction (e.g., the white surface mesh of the left brain hemisphere in subjects_dir/subject1/surf/lh.white).
Development
Unit tests and continuous integration
Continuous integration results: