Hi Michael,
I guess your intuition is right ;) You can certainly use any kind of
test on each values within an image, but not necessarily using ImCalc. I
would suggest to look into using something like
vol = spm_read_vols(spm_vol(spm_select));
which will then give you a 3D matrix of your volume in the Matlab
workspace with which you can do as you please. For example,
res = (1 - binocdf(vol .* 32 - 1, 32, .25));
works for me (I did not find bino*m*cdf on my machine), although I am
not sure this is what you want. But this approach should be more
flexible in any case.
Hope this helps,
Marko
Michael Bannert wrote:
> Hi all,
>
> I'm trying to calculate a binomial test on all voxels in a brain map. I'm using imcalc for this purpose. However, SPM doesn't seem to like what I'm doing since it's giving me the following error:
>
> Error running job: Error using ==> spm_imcalc at 101
> Can't evaluate "1 - binomcdf(i1 .* 32 - 1, 32, .25)".
> In file "/Users/mbannert/matlabScripts/spm5/spm_imcalc.m" (v184), function "spm_imcalc" at line 101.
> In file "/Users/mbannert/matlabScripts/spm5/spm_imcalc_ui.m" (v940), function "spm_imcalc_ui" at line 161.
> In file "/Users/mbannert/matlabScripts/spm5/spm_config_imcalc.m" (v1032), function "fun" at line 154.
>
> What is the correct way of doing this? Is there an easier way to calculate a binomial test with SPM?
>
> Thanks& best regards,
> Michael
>
> PS: I have this intuition that the binomcdf function is the problem in this expression.
>
> --
> Michael Bannert, Dipl.-Psych.
> Vision& Cognition Lab
> Bernstein Center for Computational Neuroscience Tübingen
> c/o MPI for Biological Cybernetics
> Spemannstr. 41, 72076 Tübingen, Germany
>
> phone: +49 7071 601 1659
> http://www.kyb.tuebingen.mpg.de/~mbannert
>
--
____________________________________________________
PD Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Universitäts-Kinderklinik
Abt. III (Neuropädiatrie)
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
University Children's Hospital
Dept. III (Pediatric Neurology)
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn
____________________________________________________
|