Hi all, I am trying to calculate in matlab the entropy focus criterion using the same equation of mriqc described here: mriqc/mriqc/qc/anatomical.py at master · nipreps/mriqc · GitHub. I ran mriqc using flywheel mriqc, Gear Version: 0.8.0_23.1.0.
The result from mriqc (0.56) and what I find (0.60) is different. I do not see the mistake. Do you have any feedback? data is the matrix of the mprage in 3d.
n_vox = length(data(:));
corr_n_vox = (n_vox/sqrt(n_vox)) * log(1/sqrt(n_vox));
Bmax = sqrt(sum(data(:).^2));
DataCorrected = data(:)+1e-16; %# add 1e-16 to deal with log(0) being Inf similar to mrqic
EFC = sum((data(:)./Bmax) .* log(DataCorrected ./Bmax))/corr_n_vox;
Based on what is described in the picture above for mriqc, should I use log10() rather than log() to calculate the correction for EFC (
corr_n_vox = (n_vox/sqrt(n_vox)) * log10(1/sqrt(n_vox))
) This is not what they do in the code of mriqc in my understanding here: mriqc/mriqc/qc/anatomical.py at master · nipreps/mriqc · GitHub.