-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds log checkbox to GUI #22
base: master
Are you sure you want to change the base?
Conversation
I have done a quick test. I have a few comments:
|
EPICS_AD_Viewer should compile. Negative numbers should not cause such a drastic drop in frame rate now, but data rate for EPICS_AD_Viewer falls more than for EPICS_NTNDA_Viewer. Snap function is still unreliable with log, maybe because taking the log of each pixel takes too long and/or ImageProcessor is sometimes duplicated before it is completed? Not sure why, so for now snap button tells user to turn off log if snap button is selected. Contrast is adjustable in log mode. |
I just pulled the latest commits. EPICS_AD_Viewer.java still does not compile for me:
And now EPICS_NTNDA_Viewer does not compile either:
Those errors were generated with ImageJ 1.53j on Windows. I just updated to 1.53s and I get the same errors. What version of ImageJ are you using that does not generate these errors? |
I'm using 1.53t. |
I’m running on Windows. What are you using? |
On Windows the latest version available is 1.53s. I just updated to the latest "Daily build" which is 1.53t30. That did not help, I get the same compile errors on both EPICS_AD_Viewer.java and EPICS_NTNDA_Viewer.java. |
I'm running on Linux. |
Does this commit do anything for the errors? |
Yes, that fixed the errors in both EPICS_AD_Viewer.java and EPICS_NTNDA_Viewer.java. I think that rather than disabling Snap in log mode it would be better to just snap an image without the log applied. The user can then simply do Process/Math/Log to apply the log if they want it. |
Ok, sounds good. |
Snap button snaps image without log applied. |
Log Checkbox is added on both EPICS_NTNDA_Viewer and EPICS_AD_Viewer. Selecting it takes log of the image, unchecking undoes it/turns it off.
Log checkbox uses built in ImageJ log function:
For 8-bit, new pixel value = log(pixelValue) * 255/log(255).
For 16-bit, new pixel value = log(pixelValue) * maxPixelValue/log(maxPixelValue), where maxPixelValue is the value of the maximum pixel value currently displayed.
For 32-bit, new pixel value = log(pixelValue). Plugin sets contrast to make new pixel values/image viewable.
Once the plugin is running/has been started, selecting another separate image in ImageJ (a Snap or other) and selecting the log checkbox will take the log of that image, according to the same rules above, and unchecking will undo the log.
Known Bugs/Cautions
Care must be taken when switching between taking the log of two different images. It is best to turn log off before switching between images, to avoid taking the log of an image twice on accident.
The log checkbox does not work well when attempting to turn the log display of individual slices of a stack on and off.
log checkbox by request of @antoninomiceli