NaN and maximum pixel projections

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NaN and maximum pixel projections

Cammer, Michael-3
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.

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.



Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory

NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY  10016

[hidden email]<mailto:[hidden email]>  http://nyulmc.org/micros  http://microscopynotes.com/

Voice direct only, no text or messages:  1-914-309-3270 and 1-646-501-0567


------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: NaN and maximum pixel projections

Wayne Rasband-2
> 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