Hi Natalie,
As below, if your masks are named correctly, you can modify fsl_reg to use them with FNIRT as well as FLIRT, e.g. something like
if [ `${FSLDIR}/bin/imtest ${INPUT}_mask` = 1 ] ; then
INMASK="-inweight ${INPUT}_mask"
fi
to
if [ `${FSLDIR}/bin/imtest ${INPUT}_mask` = 1 ] ; then
INMASK="-inweight ${INPUT}_mask"
FNINMASK="inmask=${INPUT}_mask"
fi
and
${FSLDIR}/bin/fnirt --in=$INPUT --aff=${I2R}.mat --cout=${I2R}_warp $config --ref=$REFERENCE $fnirtopts
to
${FSLDIR}/bin/fnirt --in=$INPUT --aff=${I2R}.mat --cout=${I2R}_warp $config --ref=$REFERENCE $fnirtopts $FNINMASK
Note that this just minimises the effect of the lesions on the registrations - you will also need to use the warps generated by the scripts to transform the masks into the shared target space to create confounds for randomise ( see http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/UserGuide#Lesion_Masking ) for more details. If you are not using FSL 5.0.9, I would strongly recommend upgrading as randomise analyses using voxelwise confounds should be much faster.
Kind Regards
Matthew
> Hi Natalie
>
> Not sure if you need to do anything if the masks you edited are named as *_FA_mask.nii.gz.
> If not so, then you can either name it so that it is *_FA_mask.nii.gz or edit $FSLDIR/bin/fsl_reg so that the correct naming convention of your choice gets picked up as weight-masks.
>
> Best,
>
> Danny Kim
> ________________________________________
> From: FSL - FMRIB's Software Library [[log in to unmask]] On Behalf Of Natalie Busby [[log in to unmask]]
> Sent: Wednesday, February 24, 2016 6:09 AM
> To: [log in to unmask]
> Subject: [FSL] tbss_2_reg script edit
>
> Hi,
>
> I am trying to use TBSS on stroke patients with large lesions. I have edited the masks created in the tbss_1_preproc stage to avoid the lesions. However I am unsure how to edit the tbss_2_reg script to incorporate these masks. Sorry - a newbie to tbss and scripting in general so some basic instructions would be useful!
>
> Best wishes,
>
> Natalie
|