Dear Andreas,
Maybe you could:
1) explicitly create a mask of all voxels where all of your images are
non-Nan, and then apply this mask to all the images before estimating
them,
or 2) try and play with the 'mask' flag in using the spm_imcalc_ui as a
function, eg:
spm_imcalc_ui('','mean.img','((i1-i2)./i1)+(i3-i4)./i3+...)/10',{0;1;4;0})
or something like that. You can type: "help spm_imcalc_ui" for more
details on the flags. There may be other ways, but that's all that comes
to my mind right now.
All the best,
Kalina
On Mon, 14 May 2001, abartsch wrote:
> Dear Kalina,
> thanks since I am struggling with a similar problem. Could you give some
> advice for the case that there are zeros in the image matrix, i.e. division
> by zero can not be computed?
>
> Warning: Divide by zero.
> > In c:\spm99\spm_imcalc.m at line 96
> In c:\spm99\spm_imcalc_ui.m at line 157
>
> TIA-
> Andreas
>
>
> ----- Original Message -----
> From: "Kalina Christoff" <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Freitag, 11. Mai 2001 19:20
> Subject: Re: question
>
>
> > Dear Dough,
> >
> > >
> > > In SPM ;In ImcCalc I would like to simply calculate and display the mean
> > > percent change across pre-post scans across subjects as an image.
> > >
> > > Thus 10 people scan1 scan2 so Subject scan1 scan2 Subject2 scan1
> > > scan2....
> > >
> > > =mean( (i1-i2)/i1)+(i3-i4)/i3+....)
> > >
> > > when I try versions of this in ImCalc I get weird scaling etc
> > >
> > > Any help appreciated
> > >
> >
> >
> > Try: ( (i1-i2)./i1) + (i3-i4)./i3 + ... ) / 10
> >
> > I think the "mean" function won't work unless you're using spm_imcalc as a
> > matlab function. So in your case, you have to explicitly divide by the
> > number of subjects.
> >
> > All the best,
> >
> > Kalina
> >
> >
> >
> >
> ____________________________________________________________________________
> _
> > Kalina Christoff Email: [log in to unmask]
> > Office: Rm.430; (650) 725-0797
> > Department of Psychology Home: (408) 245-2579
> > Jordan Hall, Main Quad Fax: (650) 725-5699
> > Stanford, CA 94305-2130
> http://www-psych.stanford.edu/~kalina/
> >
> ____________________________________________________________________________
> _
>
_____________________________________________________________________________
Kalina Christoff Email: [log in to unmask]
Office: Rm.430; (650) 725-0797
Department of Psychology Home: (408) 245-2579
Jordan Hall, Main Quad Fax: (650) 725-5699
Stanford, CA 94305-2130 http://www-psych.stanford.edu/~kalina/
_____________________________________________________________________________
|