Re: NaN and maximum pixel projections

Posted by Wayne Rasband-2 on
URL: http://imagej.273.s1.nabble.com/NaN-and-maximum-pixel-projections-tp5024271p5024272.html

> On Dec 7, 2020, at 1:33 PM, Cammer, Michael <[hidden email]> wrote:
>
> We have 32 bit stacks with NaN values for many of the voxels.
>
> When we do a Z projection in maximum mode, instead of returning a simple maximum pixel projection where we would expect the NaNs to be ignored, they are being calculated into the total, perhaps being averaged in.

This bug is fixed in the ImageJ 1.53h4 daily build.

-wayne


>
> For example, we would expect a certain X,Y location to have a value of 0.043, but it ends up with a value of -1.54E38.
>
>
> I put an example Z series and a resulting max projection along with a screen snap showing the numerical differences at https://www.dropbox.com/sh/h4ajx22fq8ib3ym/AADk7yIFffiJPCtzCv4ABIMsa?dl=0
>
>
> Also, removing NaN slices from the stack changes the results.  The more removed, the closer to the correct result.
>
>
> Is this expected behavior with NaN?
>
>
> For now we may simply change NaN to zero for the projection and change back to NaN for analysis, but thought we'd ask if IJ is doing the correctly.
>
>
> Thank you.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html