Dear Muhammad and Donald,
not very efficient yet but in SPM12 you should be able to do something
like this:
% Input data
V = spm_vol(spm_select(Inf,'image'));
% Atlas (can be a NIfTI atlas filename)
xA = spm_atlas('load','Neuromorphometrics');
% Extracted data
D = zeros(numel(V),numel(xA.labels));
for i=1:numel(xA.labels)
M = spm_atlas('mask',xA,xA.labels(i).name);
D(:,i) = spm_summarise(V,struct('def','mask','spec',M),'litres');
end
Best regards,
Guillaume.
On 22/05/15 17:47, MCLAREN, Donald wrote:
> Here is a program that I quickly wrote and should give you a start. It
> may have a few bugs in it, but it outlines the process of what I did:
> (1) create a separate ROI for each region;
> (2) extract each region.
>
> For extracting each region, I used extractTS developed locally, but you
> can also use spm_summarise.
>
> The code requires the utilities download from mrtools.mgh.harvard.edu
> <http://mrtools.mgh.harvard.edu>. It may also require the fcMRI
> processing tools as well. I can't remember which download contains
> extractTS.
>
> Best Regards, Donald McLaren
> =================
> D.G. McLaren, Ph.D.
> Research Fellow, Department of Neurology, Massachusetts General Hospital and
> Harvard Medical School
> Postdoctoral Research Fellow, GRECC, Bedford VA
> 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 Mon, May 18, 2015 at 7:46 PM, Muhammad Adeel Parvaz
> <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>
> Hi all,
> Is there a way to extract mean gray matter volumes from regions
> specified by a template (e.g., aal template, or any other template
> in .nii format)? We have VBM8-processed gray-matter images and we
> would like to extract volumes of regions based on a template. How do
> we go about doing that?
>
> Thanks much!
>
> -Muhammad Parvaz
>
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|