Skip to content

Repository files navigation

S3Map

This is the code for fast spherical mapping of cortical surfaces using S3Map algorithm. Figure framework

Usage

  1. Download or clone this repository into a local folder
  2. Open a terminal and run the follwing code (better do this in a conda environment):
conda env create -f environment.yml

if only cpu is available, you can install the cpu version torch

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu

otherwise, install the correct torch version of your machine

  1. Prepare your data, i.e., inner surfaces in vtk format (the file name should end in '.vtk')

  2. Simply run "python s3all.py -h" for the whole pipeline, and the expected output should be.

python s3all.py  -h
usage: s3all.py [-h] --input INPUT [--save_interim_results {True,False}]

Superfast spherical surface pipeline 
1. Computing mean curvature and area 
2. Inflating the inner surface and computing sulc 
3. Initial spherical mapping 
4. Distortion correction for initial spherical surface.

optional arguments:
  -h, --help            show this help message and exit
  --input INPUT, -i INPUT
                        the input inner surface (white matter surface) in vtk format, containing vertices and faces. There should be 'lh' or 'rh' in the filename for identifying left hemisphere or right hemisphere.
  --save_interim_results {True,False}
                        save intermediate results or not, if Ture, there will be many results generated and need more storage

An example output log can be found at here.

  1. Use paraview to visualize all generated .vtk surfaces, or read_vtk into python environment for further processing.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages