Dear Daniel,
this does not sound too bad. However, instead of using imcalc, you could
do something like
3*) recover the original indices of the top N items (sort will return
the permutation vector)
4*) create a mask/retain only the top N voxels using these indices
Volkmar
Am Freitag, den 08.02.2008, 15:25 -0500 schrieb Daniel Simmonds:
> Hello all,
> I am trying to run ROI analyses by taking a large ROI mask (derived from a group analysis), applying it an individual subject's GLM analysis, and extracting the N (for example, 50) most active voxels within that mask. In theory, I would:
> 1) reshape the 3-dimensional image array into a 1-dimensional vector
> 2) sort the vector in descending order
> 3) find the value of the Nth item in the vector
> 4) use imcalc to find all the voxels that are greater than or equal to that value
> However, I imagine there's some better/more clever way to do this, either in imcalc or elsewhere. I'm also concerned that I won't necessarily be able to get exactly N voxels, in case there are some duplicate values (However, I don't think this is a big problem because images are stored in floating point, right? So it would not likely have repeats...). Can anyone help? Thanks!
> Dani
>
> Daniel Simmonds
> Developmental Cognitive Neurology
> Kennedy Krieger Institute
> [log in to unmask]
>
>
>
>
> Disclaimer:
> The materials in this e-mail are private and may contain Protected Health Information. Please note that e-mail is not necessarily confidential or secure. Your use of e-mail constitutes your acknowledgment of these confidentiality and security limitations. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender via telephone or return e-mail.
--
Volkmar Glauche
Freiburg Brain Imaging
http://fbi.uniklinik-freiburg.de/
Phone +49(0)761 270-5331
Fax +49(0)761 270-5416
|