Login  Register

Re: Log Math Function

Posted by Jacob Keller-2 on Apr 18, 2018; 3:12pm
URL: http://imagej.273.s1.nabble.com/Log-Math-Function-tp5020510p5020528.html

Hi Michael,

Your code and other workarounds are fine, but the problem is for
unsuspecting users (like me two days ago) who assume log means Log10, and
also who are not aware of the scaling issue. Also, I am not entirely clear
why for 16-bit images the final range is not the entire 16-bit range but
simply the original range. Is this for error propagation?

The problem is basically the misleading nature of the menu item "log."

But I appreciate the stickiness of redoing things. Couldn't one simply
rename the menu item LogE, and keep the underlying "log" command intact
somehow, in order not to break existing code?

JPK




Am I missing something, or can these arguments be corrected with the

> following simple macro code?
>
> newImage("256x256", "8-bit ramp", 256, 256, 1);
>    run("32-bit");
>    run("Log");
>    run("Divide...", "value=2.302585");  // constant to convert to base 10
> resetMinAndMax();
>
> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
> NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY
> 10016
> C: 914-309-3270  [hidden email]  http://nyulmc.org/micros
> http://microscopynotes.com/
>
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Michael Schmid
> Sent: Wednesday, April 18, 2018 7:07 AM
> To: [hidden email]
> Subject: Re: Log Math Function
>
> Hi Jacob,
>
> I think it would be a nuisance to have a pop-up dialog telling me that
> 'log' is natural logarithm, and/or that scaling was done. I would have to
> click it away.
>
> To me, it is pretty obvious that scaling needs to be done because an
> 'integer' image type (8 bit, 16 bit) would otherwise have very poor
> resolution for the log.
>
> Automatically converting to 32 bits would make existing macros work
> incorrectly if they use this function and rely on the current behavior.
>
> So I don't see much room for improvement. One could think of displaying a
> message in the status line, but probably it would be overlooked anyhow.
>
>
> ------------------------------------------------------------
> 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
>

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