I should also mention that I am trying to do this from the command line with spm_imcalc_ui. From what I can tell, it appears to be having trouble evaluating the square of an image, such as sqr(i1). However, I am able to do this from the SPM GUI ImCalc without any problems.
Below is the code that I am inputting and the error I am getting:
>> P1 = [outputPath 'i1.img'];
>> spm_imcalc_ui([P1], [outputPath 'ip_norm_sqr_i1.img'], 'sqr(i1)')
SPM5: spm_imcalc_ui (v$Rev: 940 $) 16:43:58 - 16/02/2012
========================================================================
??? Error using ==> spm_imcalc at 101
Can't evaluate "sqr(i1)".
Error in ==> spm_imcalc_ui at 161
Vo = spm_imcalc(Vi,Vo,f,args);
Thanks,
-Andrew
Dear SPMers,
I am attempting to use ImCalc to calculate the square root of sums of squares, i.e.:
sqrt(sqr(i1)+sqr(i2))
However, SPM give me an error when trying to combine these steps. I can do them sequentially, but if there is a way that I can combine them, I would like to know how.
Thanks!
-Andrew