Dear Mark,
I tried the -R option, but this procedure still produces the same problem.
The problem appears to be related to the decimal accuracy of the fslmaths -thr method. Fslstats returns a number with 6 decimal places. If I feed a number with 5 decimal places (truncating, not rounding, the 6th decimal number) into fslmaths, the method works. Obviously, this is a workaround that will only work if all other voxels have values that differ at least 0.00001, so perhaps a bug fix is needed in future versions of fslmaths?
This is the workaround method I have used to truncate the values to 5 decimal places accuray.
fslmaths zstat_std_masked_maxes_z -thr `fslstats zstat_std_masked_maxes_z -R | awk '{printf("%30.7f",$2)}' | awk '{print substr($0,22,7)}'` -bin zstat_std_masked_maxpnt
Best, Henk
|