calculate median intensity value of white matter from T1 image

Hi All,

I have a T1 image and a white matter binary mask. I would like to calculate the median intensity value of the white matter from the T1 image.

Is there a quick way to calculate it in AFNI ?

Many thanks

Rito

Howdy-

How about:


3dROIstats \
    -median \
    -mask DSET_WM_MASK  \
    DSET_T1_

? that will give you both the mean and median, with some possibly-not-well-vertically-aligned column labels for information.

If you really don’t want to even see the median, then:


3dROIstats \
    -median \
    -nomeanout \
    -mask DSET_WM_MASK  \
    DSET_T1_

And if you don’t want any extra label stuff (e.g., if you are scripting), then you could use the “-quiet” option to just output the number(s):
3dROIstats
-quiet
-median
-nomeanout
-mask DSET_WM_MASK
DSET_T1_




--pt

Immensely helpful.

Thanks

Rito