Print

Print


You could script this is MATLAB by loading the image, sorting the values,
finding the 1000th ranked voxel, then thresholding based on that value.

However, if you have access to AFNI, you could use the following:
for IMG in `ls spmT*.nii`; do for P in 1 5 25 75 95 99; do
Thresh=`3dBrickStat -percentile $P 1 $P -non-zero -nonan -mask maskfile.nii
$IMG | awk '{print $2}'`; 3dcalc -a $IMG -expr "isnegative(a-${Thresh})"
-prefix lower_${P}_${IMG}; 3dcalc -a $IMG -expr "ispositive(a-${Thresh})"
-prefix upper_${P}_${IMG}; done; done

**Make sure the maskfile is the same for all images. If you want another
percentile, then just change the 1 5 25 75.. to the number you want to use.
The higher the number, the fewer the voxels.

Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Postdoctoral Research Fellow, GRECC, Bedford VA
Research Fellow, Department of Neurology, Massachusetts General Hospital
and
Harvard Medical School
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at
(773)
406-2464 or email.



On Fri, May 4, 2012 at 9:18 PM, Gao Junling <[log in to unmask]> wrote:

> Dear SPM Experts,
>
> Here is a simple yet interesting question.
> When we do SPM result, we usually set p = 0. 001 (uncorrected) or p = 0.05
> (FWE correct), then we get the statistical activation mapping and how many
> voxels activated. My questions is, can we set a specific number of
> activated voxels (e.g., 1000 voxel totally) and then get the activation map?
>
> The reason to do this is that I have two groups of subjects, young and
> old, although the final activation map is different between young and old.
> However, after setting a lower threshold for young subjects, I found the
> activation maps between the two groups are rather similar. This makes me
> wonder whether I can actually set a total voxel number and see how much
> similar the maps of the two group will be. My feeling is that the so-called
> HAROLD model(Hemispheric asymmetry reduction in older adults) might not be
> an absolute distinction, but a matter of levels of activations.
>
> It seems SPMS can only set p-level before you can get total activated
> voxels. Anyone here know about the other way? Thank you very much!
>
> Best wishes,
> Gao
>