automatically calculate T-values by MatLab for further analysis in xjView

173 views
Skip to first unread message

a.k.a. industrial

unread,
May 5, 2011, 8:09:10 AM5/5/11
to xjView discuss group
Hi there,

thanks again for the great work.
What i like most is that i can easily integrate the xjview function
into my skripts.
In my skript(s) I run first and second level analysis with SPM for
several subjects automatically (i.e. externally).

Problem:
Unfortunately I am not able to create T-value images without using
'SPM RESULTS'. And I do not want to click around like crazy each time
I try some new preprocessing steps.

How do I create automatically a contrast with the following values:
> SPM.xCon.name='regressor';
> SPM.xCon.c=[1;0];
and make SPM create a T-value image before I call xjview.

Thanks in for all hints in advance,
industrial

a.k.a. industrial

unread,
May 5, 2011, 8:06:02 AM5/5/11
to xjView discuss group

Xu Cui

unread,
May 5, 2011, 1:04:46 PM5/5/11
to xjview-dis...@googlegroups.com
Maybe the following scripts will help?

load('SPM.mat');

% contrasts
%---------------------------------------------------------------------------

nContrast = length(SPM.xCon);
if nContrast == 0
    SPM.xCon   = spm_FcUtil('Set',cname,FT,'c',c(:),SPM.xX.xKXs);
else
    SPM.xCon(nContrast + 1)   = spm_FcUtil('Set',cname,FT,'c',c(:),SPM.xX.xKXs);
end
          
index = nContrast + 1;

% and evaluate
%---------------------------------------------------------------------------
spm_contrasts(SPM, nContrast + 1);





--
You received this message because you are subscribed to the Google Groups "xjView discuss group" group.
To post to this group, send email to xjview-dis...@googlegroups.com.
To unsubscribe from this group, send email to xjview-discuss-g...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xjview-discuss-group?hl=en.




--
----------------------------------------------------------------
Xu Cui
Department of Psychiatry and Behavioral Sciences
Stanford University
Blog: http://www.alivelearn.net
----------------------------------------------------------------

a.k.a. industrial

unread,
May 5, 2011, 4:10:46 PM5/5/11
to xjView discuss group
Hi,

thanks!

SPM.xCon =spm_FcUtil('Set','regressor','T','c',
[1;0],SPM.xX.xKXs);
does totally do the trick.

May I ask how you knew this?
I want to learn more about using SPM as integral part of my matlab
code (without calling 'spm' itself)
But I find no (comprehensive) guide whatsoever.
Am I missing something or is it all just documented within the code?\


Thanks again.
LUV xjview!

Xu Cui

unread,
May 5, 2011, 4:32:03 PM5/5/11
to xjview-dis...@googlegroups.com
 > But I find no (comprehensive) guide whatsoever. Am I missing something or is it all just documented within the code?
Yes, reading code.

Xu
Reply all
Reply to author
Forward
0 new messages