Hi Dana,

Sure. Take the same 4D file you used, binarise it with fslmaths (-bin), and use it as the input to fslmeants, exactly as you did with the original GM file. The output from this is another table, just as the first, but in which each value is the number of non-zero voxels divided by the overall number of voxels in each label.

Then load the 2 tables (i.e., the original, that is the average GM, and the new one) in a spreadsheet program, or in Matlab, Octave, or any other similar program, and divide the elements of the 1st table by the elements of the 2nd table. This should be the result you need.

Hope this helps!

All the best,

Anderson



On 2 June 2014 17:52, Dana Wagshal <[log in to unmask]> wrote:
Thanks Anderson this worked great! However, I noticed that the output was the mean value. Is there a way to output the mean value for nonzero voxels?


On Sat, May 31, 2014 at 10:29 AM, Anderson M. Winkler <[log in to unmask]> wrote:
Hi Dana,

Almost! Try this:
fslmeants -i gray_matter.nii.gz --label=HarvardOxford-cort-maxprob-thr0-2mm.nii.gz

The output is a matrix. Each row corresponds to a volume in gray_matter.nii.gz (so, if the input is a 3D file, there is just 1 long line). Each column (there are 48) is for a label. You'd be interested in the 7th column it seems.

All the best,

Anderson




--
-Dana