Thanks for this package! I'm excited to be able to use Julia in my analysis.
I'm sanity checking and measuring performance here, with this nifti.
The mean of that 3d dataset is 838.206399 (according to fsl and AFNI tools), but mean(niread('mynii.nii.gz')) reports 836.1491.
I'm not sure how to narrow down where the discrepancy is coming from.
fslstats wf-mp2rage-7t_2017087.nii.gz -m
838.206399
3dBrickStat -slow -mean wf-mp2rage-7t_2017087.nii.gz
838.206
scripts/niimean.jl
836.1491
cat scripts/niimean.jl
#!/usr/bin/env julia
using Statistics
using NIfTI
ni = niread("wf-mp2rage-7t_2017087.nii.gz");
print(mean(ni))