Dear Tao,
> I'm more interested by the second solution. But I don't know where can
> I obtained these famous variables xSPM and hReg in the reportresults
> batch. It's realy what I'd like to do.
If you specify and run a "SPM>Stats>Results Report" module, the
variables you're looking for will be available in the workspace and you
will be able to use the spm_sections command.
Equivalently, run something along those lines:
xSPM.swd = '/path/to/your/spmmat/;
xSPM.Ic = 2; % index of contrast
xSPM.n = 1; % conjunction number (next update)
xSPM.u = 0.05;
xSPM.Im = [];
xSPM.thresDesc = 'FWE';
xSPM.title = '';
xSPM.k = 0;
xSPM.units = {'mm' 'mm' 'mm'};
[hReg xSPM] = spm_getSPM(xSPM);
spm_check_registration(fullfile(spm('Dir'),'canonical','single_subj_T1.nii'));
spm_orthviews('AddBlobs',1,xSPM.XYZ,xSPM.Z,xSPM.M);
spm_orthviews('Reposition',[0 -90 20]); % any coordinates you want {mm}
spm_orthviews('Redraw');
% or this:
[hReg xSPM SPM] = spm_results_ui('Setup',xSPM);
spm_sections(xSPM,hReg,fullfile(spm('Dir'),'canonical','single_subj_T1.nii'))
> Another question, when I do a conjunction analysis. I can only obtain an
> image but not recorded in SPM.mat. How can I display this image using
> coordinates on 'single_subj_T1.nii' .
if you are doing a conjunction, the xSPM variable will still contain the
relevant information for display. In a script, you just need to enter a
vector of contrast indices instead of a scalar in xSPM.Ic above (and
answer the question conjunction/global null).
You can also save the conjunction map as an image with the 'Save' button
in the Results window, and reuse that image for an overlay in CheckReg.
Best regards,
Guillaume.
> Thank you again for your help !
>
> Tao
>
> ----- Original Message ----- From: "Guillaume Flandin"
> <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Wednesday, March 17, 2010 2:00 PM
> Subject: Re: [SPM] displayimage
>
>
>> Dear Tao,
>>
>> Once in the Results section, you can type something like this:
>> spm_sections(xSPM,hReg,fullfile(spm('Dir'),'canonical','single_subj_T1.nii'))
>>
>> spm_orthviews('Reposition',[0 -90 20])
>> If you want to automatise it further, you can use beforehand a batch
>> module "SPM>Stats>Results Report" that will generate the variables xSPM
>> and hReg used above.
>> See the help of spm_orthviews.m for further options.
>>
>> Best regards,
>> Guillaume.
>>
>>
>> jiang wrote:
>>> Dear SPMers,
>>>
>>> for the moment to display activation image on a anatomic one, I should
>>> begin each time by result->overlay--> section....
>>>
>>> I'd like to know whether there exists some routine or code to do the
>>> same thing just by selecting images and entering the coordinates ?
>>>
>>> Thank you very much for your help.
>>>
>>> Tao
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|