#!/bin/bash # Step One: Request Resources #SBATCH --ntasks=1 #SBATCH --cpus-per-task=2 #SBATCH --mem=40GB #SBATCH --time=0:30:00 # Step Two: Download some brains wget https://cau-gin.brainminds.riken.jp/brainminds/BMA-2017/raw/master/bma-1-mri.nii.gz wget https://cau-gin.brainminds.riken.jp/brainminds/BMA-2017/raw/master/bma-1-region_seg.nii.gz wget https://cau-gin.brainminds.riken.jp/brainminds/BMA-2019/raw/master/bma_2019_exvivo/base_data/sp2_avg_mri_exvivo_t2wi_v1.0.0.nii .gz wget https://cau-gin.brainminds.riken.jp/brainminds/BMA-2019/raw/master/bma_2019_exvivo/labelmap/sp2_label_512_v1.0.0.nii.gz # Step Three: Clear the environment and load software PATHs module purge module load foss/2022a module load ANTs/2.4.4 # Step Four: Registering brain1 to brain2 antsRegistrationSyNQuick.sh d 3 \ -f sp2_avg_mri_exvivo_t2wi_v1.0.0.nii.gz \ -m bma-1-mri.nii.gz \ -o brain1_to_brain2_ \ -n 2 # Step Five Inverse transform (Map label2 to brain1) antsApplyTransforms -d 3 \ -i sp2_label_512_v1.0.0.nii.gz \ -r bma-1-mri.nii.gz \ -o label2_to_brain1.nii.gz \ -t [brain1_to_brain2_0GenericAffine.mat, 1] \ -t brain1_to_brain2_1InverseWarp.nii.gz \ -n NearestNeighbor