Re: Log Math Function

Posted by Cammer, Michael on
URL: http://imagej.273.s1.nabble.com/Log-Math-Function-tp5020510p5020526.html

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