Steps for multivariate noise normalization in FSL

Hi all,

I would like to apply multivariate noise normalization for my fMRI data (as described in Walther et al. 2016) and then use the normalized data to calculate the Euclidean distance between two activity patterns corresponding to two conditions. I used beta estimates yielded from FSL package as input values. Since I am a new FSL user, I am not entirely sure that the steps I am planning to do are correct. I would really appreciate you guidance:
For the multivariate noise normalization, a given pattern (b1) should be scaled with the error variance-covariance matrix (E), thus b1(normalized) = b1*E^1/2.
I notice that FSL outputs a res4d image, which I believe represents the model fit residual error for each time point and voxel. If my assumption about the res4d image is correct, then I could extract the error residuals correspond to my region of interest and then calculate the error variance-covariance matrix (E) needed for the multivariate noise normalization. Say, if I have 10 time points in a run and an ROI consisted of 5 voxels, then I would extract the corresponding values from the res4d image, yielding a 10 x 5 matrix and I would then calculate the error covariance matrix of these 5 voxels which will give me a 5 x 5 matrix. This 5 x 5 matrix would then be the error variance-covariance matrix (E) I use in the multivariate noise normalization formula.
Does it sound correct?

Thanks in advance,
Yuan-hao