This repository contains:
- important thing 1.
- important thing 2.
- even more important thing 3 ;p.
- Either download or clone the repository.
git clone https://github.com/printyourbrain/PrintYourBrain.git
- Change directory.
cd PrintYourBrain
DISCLAIMER: You need ~4GB free storage space for this.
Make sure you have your neurodocker image listed in docker images
.
- Build the PYB image from this Dockerfile.
docker build --tag pyb - < pyb.Dockerfile
- Run an interative bash in your image, while mounting the PrintYourBrain folder and specifying your Freesurfer license file.
docker run --platform linux/x86_64 -it -v /path/to/PrintYourBrain:/PrintYourBrain -v /path/to/your/freesurfer/license.txt:/opt/freesurfer-6.0.0-min/license.txt pyb:latest
You can get your license file from here incase you don't have one!
- Make sure pip is installed.
python -m ensurepip --upgrade
- Configure your shell and restart it.
conda init bash
exec bash
- Activate the pyb conda environemnt within the container.
conda activate pyb
You are all set up to process your brain scans now! 🧠🚀
Make sure to setup both your freesurfeer and ANTs environment variables.
- Create a conda environment from this environment file.
conda env create --file environment.yml
- Start your conda environment.
conda activate pyb
Now that you are in your docker container or the conda environment, you are ready to start processing your T1w brain images!
- Change directory.
cd PrintYourBrain
- Build the pyb package.
python -m pip install --upgrade build
python -m build
-
CAUTION: Configure your project and update paths in pyb/config.py. The current config points to a 'data' folder inside PrintYourBrain directory for all files. Download Brain Templates for ANTs from here. The deafult template in the repo is NKI (can obviously be changed!).
-
Run the pyb script!
python pyb.py -i <input NIfTI file> -o <output directory name> -s <subject_name>
Run python pyb.py -h
for usage instructions!