Skip to content

Improve the implicit masking

Bryan Guillaume requested to merge improveImplicitMasking into master

The goal of this MR is to improve the implicit masking of swe. It uses to mimic what randomise was doing i.e. removing only voxels with constant data for all data points. Nevertheless, in swe, we need to be more restrictive than that because the SwE is computing complex within-subject error covariance matrices while randomise computes only a scalar error variance.

The idea was to mimic the umplicit masking used in the SPM version of swe and the changes reflect that.

In addition, I have also added the removal of voxels with at least one nan because that seems the source of some issues in the computation of some cluster-wise statistics. This does not seem present in randomise. Note that systematically removing these voxels could be problematic in scenarios with a voxel-wise design that would acknowledge some nans in some subjects and would still want to get a results for these voxels. For example, in a scenario with a subject with a lesion tagged with nans. I will however look at this latter in another MR after more urgent changes.

Merge request reports