Krish Singh wrote:
> Hi,
>
> Using the Imcalc functions, is it possible to calculate an image which
> contains the maximum value of a set of target images?
>
> For example, suppose I have six con**.img files. Is it possible to
> generate a "peak.img" file such that each voxel within peak.img contains
> the maximum value from the same voxel in each of the six con* files?
>
> For a two sample case, I tried the following:
>
> f='i1*(i1>=i2)+i2*(i2>=i1)';
>
> but that didn't work. I'm not much of a matlab expert, so apologies if
> there is a trivial solution.
>
> Krish
>
> --
> Dr Krish D Singh
> Department of Vision Sciences
> Aston University
> Aston triangle
> Birmingham
> B4 7ET
> ENGLAND
> tel: +44 (0)121 359 3611 ext 5176/5190
> fax: +44 (0)121-333 4220
> email: [log in to unmask]
-select the six images
-name the imagefile peaks
-and paste the equation:
reshape(max([i1(:) i2(:) i3(:) i4(:) i5(:) i6(:)],[],2),size(i1))
Torben Ellegaard Lund, M.Sc. Phys. Eng.
Danish Research Centre for Magnetic Resonance
Hvidovre Hospital
Kettegaard Alle 30
2650 Hvidovre
Denmark
Phone: +45 3632 3324
Fax: +45 3647 0302
email: [log in to unmask]
|