Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

 Read further if:

  • you develop or run image processing locally in bash;
  • you want to use XNAT as data source and/or remote archive;
  • you want to automate processing of multiple XNAT sessions and want to report your results in spreadsheets.

Use case: compute BET whole brain volume for all MPRAGE scans in an MRI project in XNAT and save statistics in a spreadsheet.

  1. write a bash script (assuming FSL is on the path).
    in=$1 #input DICOM scan
    dcm2nii $in
    cp $in/[0-9]*.nii head.nii
    if [ ! -f "head.nii" ]; then exit -1; fi
    bet head brain -m
    vol=(`fslstats brain_mask -V`); vol=${vol[1]}
    #report the volume in mm3 to console.
    echo $vol


  • No labels