Hi,
On 18 May 2007, at 02:23, Pat Vee wrote:
> Hi all,
>
> I'm trying to use avwstats to count the number of voxels and find
> the mean
> within a masked image. What I've done is created a binary mask, then
> multiplied that by an image to only leave values in the non-masked
> regions.
>
> So, to count voxels I'm typing:
> avwstats <input> -V
> It outputs 2 values; I understand that the 1st value is the number
> of voxels
> that are non-zero. I've been getting whole numbers for this on the
> order of
> hundreds (e.g., 826), which is what I expect. However, I don't
> understand
> what the 2nd value is. I've been getting numbers on the order of
> thousands,
> with decimals for this (e.g., 13560.75). Can someone explain what
> this
> number is?
If you just type "avwstats" you get the usage;
the second number is the volume, i.e. the first number X voxel volume.
> To find the mean, I'm typing:
> avwstats <input> -M
> It outputs a value that I believe is the mean for all the non-zero
> voxels.
> However, I realized that it's possible that some of the volumes
> will have
> zero values within the non-masked regions. So, is there some way
> to mask
> regions so that the masked area is converted to NaNs - or some
> other method
> that would allow me to include zeros when calculating the mean?
We don't use NaNs, This is easy in avwstats++ with the -k (masking)
option.
Cheers.
------------------------------------------------------------------------
---
Stephen M. Smith, Professor of Biomedical Engineering
Associate Director, Oxford University FMRIB Centre
FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK
+44 (0) 1865 222726 (fax 222717)
[log in to unmask] http://www.fmrib.ox.ac.uk/~steve
------------------------------------------------------------------------
---
|