sotnir / NENAH-BIDS

A collaborate platform for streamlining a BIDS workflow for the NENAH study, on the linux workstation based at University of Southampton.
https://www.southampton.ac.uk/cndng
Creative Commons Zero v1.0 Universal
2 stars 2 forks source link

mask in dMRI/preprocess cuts out the brain #100

Closed finnlennartsson closed 6 months ago

finnlennartsson commented 2 years ago

Here is sub-NENAH004 image

Comes from here in preprocess.sh

if [ ! -f mask.mif.gz ]; then
    dwiextract -bzero $dwi.mif.gz - | mrmath -force -axis 3 - mean meanb0tmp.nii.gz
    bet meanb0tmp meanb0tmp_brain -m -F -R
    # Check result
    echo Check the results
    echo "mrview meanb0tmp.nii.gz -roi.load meanb0tmp_brain_mask.nii.gz -roi.opacity 0.5 -mode 2"
    mrconvert meanb0tmp_brain_mask.nii.gz mask.mif.gz
    rm meanb0tmp*
fi
finnlennartsson commented 6 months ago

We have now changed this by and testing different -f values for BET
https://github.com/sotnir/NENAH-BIDS/blob/fed2cbd9b8421f8883015104d34d0f65560cd59e/dMRI/preprocess_QC.sh#L240-L261 and choosing the best one.

The optimal BET-values are listed in QC_dwi.csv