#!/bin/sh
# Use FSL flirt to register label masks
# with nearest neighbor interpolation.
# because the label values should never be interpolated.
# This example assumes:
# an existing 0.5mm standard brain (MNI152_T1_0.5mm_brain)
# an existing flirt matrix from 1 mm to 0.5 mm (stand1stand0.5.mat)
flirt -in atlas -datatype int -ref MNI152_T1_0.5mm_brain
-interp nearestneighbour
-init stand1stand0.5.mat -applyxfm -out atlas_0.5mm