Commit 59f951f9 authored by Saad Jbabdi's avatar Saad Jbabdi
Browse files

first commit

parent 79ca76bc
# If =1, use implicit masking based on value in --ref image. Default =1
--imprefm=1
# If =1, use implicit masking based on value in --in image, Default =1
--impinm=1
# Value to mask out in --ref image. Default =0.0
--imprefval=0
# Value to mask out in --in image. Default =0.0
--impinval=0
# sub-sampling scheme, default 4,2,1,1
--subsamp=8,8,4,4,2,2
# Max # of non-linear iterations, default 5,5,5,5
--miter=5,5,5,5,5,10
# FWHM (in mm) of gaussian smoothing kernel for input volume, default 6,4,2,2
--infwhm=4,3,2,1.5,1,0.5
# FWHM (in mm) of gaussian smoothing kernel for ref volume, default 4,2,0,0
--reffwhm=4,3,2,1.5,1,0.5
# Weigth of membrane energy regularisation, default depending on --ssqlambda and --regmod switches. See user documetation.
--lambda=300,150,100,50,40,30
# Estimate intensity-mapping if set, deafult 1 (true)
--estint=1,1,1,1,1,0
# Apply the mask if set, default 1 (true)
#--applyrefmask=0,1,1,1,1,1
--applyrefmask=1
# Apply the mask if set, default 1 (true)
--applyinmask=1
# (approximate) resolution (in mm) of warp basis in x-, y- and z-direction, default 10,10,10
--warpres=5,5,5
# If set (=1), lambda is weighted by current ssq, default 1
--ssqlambda=1
# Model for regularisation of warp-field [membrane_energy bending_energy], default bending_energy
--regmod=bending_energy
# Model for intensity-mapping [none global_linear global_non_linear local_linear global_non_linear_with_bias local_non_linear]
--intmod=global_non_linear_with_bias
# Order of poynomial for mapping intensities, default 5
--intorder=5
# Resolution (in mm) of bias-field modelling local intensities, default 50,50,50
--biasres=10,10,10
# Weight of regularisation for bias-field, default 10000
--biaslambda=10000
# If =1, ref image is used to calculate derivatives. Default =0
--refderiv=0
#!/bin/bassh
# Registration to F99 macaque atlas
# S. Jbabdi
if [ "$2" == "" ];then
echo ""
echo " do_reg_F99.sh <brain> <outputBase> [F99Dir]"
echo ""
echo " <brain> : FA or T1 image or similar contrast"
echo " <outputBase> : Prefix for output image and warps"
echo " [F99Dir] : Default is $FSLDIR/etc/xtract_data/standard/F99"
echo ""
exit 1
fi
f99dir=$3
if [ "$atl" == "" ];then
f99dir=$FSLDIR/etc/xtract_data/standard/F99
fi
# Parse args
anat=$1
atl=$f99dir/mri/struct_brain
conf=$f99dir/config
out=$2
# REGISTRATION TO F99 ATLAS
echo ""
echo " ---> Remove Bias Field"
fast -n 1 -b -B -l 10 -o ${out}_struct_brain $anat
echo ""
echo " ---> Initial affine registration"
flirt -in $anat -ref $atl -omat ${out}_anat_to_F99.mat -out ${out}_anat_to_F99
echo ""
echo " ---> FNIRT with custom config file"
fnirt --in=$anat --ref=$atl --aff=${out}_anat_to_F99.mat --iout=${out}_anat_to_F99_nonlin --cout=${out}_anat_to_F99_warp --config=${conf}
invwarp -w ${out}_anat_to_F99_warp -r $anat -o ${out}_F99_to_anat_warp
echo ""
echo " ---> Check registration"
applywarp -i $atl -o ${out}_F99_to_anat_nonlin -r $anat -w ${out}_F99_to_anat_warp
slicesdir -o $atl ${out}_anat_to_F99_nonlin $anat ${out}_F99_to_anat_nonlin
echo "In order to check registration, open the following file onto a web browser:"
echo "`pwd`/slicesdir/index.html"
echo ""
echo "Done."
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment