-
Notifications
You must be signed in to change notification settings - Fork 4
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
Mutable Layers aren't auto-contrasted #127
Comments
As a consumer I find image outputs that haven't had their contrast auto adjusted to be really annoying. Without fail my first action is to call up the auto contrast function on the image. If I remember correctly there are a few places in ImageJ (maybe plugins?) that apply the auto contrast adjustments to the image before returning them to the user. Thus in my mind there is no particular we should not return an adjusted image. I also feel like this could mitigate users being confused with outputs. They may think nothing happened...when indeed it did! |
I cannot think of a better solution that auto-scaling after running a computer op. The output container is supposed to be empty, after all. And it is highly unlikely they will pass in a metadata-rich image (e.g. For inplace ops though, I think it could be annoying in some cases. So my vote is yes for computers, no for inplaces. |
Do Can you elaborate on the cases you're thinking of? |
For plain modules, there is no such things as a computer. Any "both" input is assumed to be inplace mutation.
Here is an example: suppose you run a module that adds 10 to every pixel. If you reautoscale, it will look like nothing changed. Whereas the user will probably be expecting everything to get brighter. |
Woah, that's news to me. Is that documented, or just what happens in practice? If that's the case, then the only way I can think of to auto-contrast computer outputs only is to hardcode checks on the name of the output (because
Thanks, that helps. |
We might be talking past each other here. There is a such thing as a computer op in ImageJ Ops v1. But in the SciJava module system generally, there is no such thing as function/computer/inplace/etc. Those "special op types" are an Ops construction. Above, I am speaking about the SciJava module system in general; the only things it has for parameter types are INPUT, OUTPUT, and BOTH. That said, it gets confusing because ImageJ Ops v1 ops are (inheritance) SciJava commands. You can of course tell the difference between a computer op vs an inplace op based on which interfaces/classes it implements/extends. But if you treat them as plain SciJava commands, without special-case checking them for "op-ness", you won't know if they are computers vs inplaces. I hope by now it is clear that I am not in favor of running ImageJ Ops in such as a way, as normal SciJava modules, via the With respect to napari-imagej, I don't know how you are running ops right now, but I thought you said you were using the |
Yup, that's what we're doing. It makes things simple, as we only need to think about them as Modules, and, due to the |
Looking at the animation, when we see the original |
I tried reproducing this, but I cannot, however I encountered a new issue, which I describe in #300. |
Here's an example, running the
image.invert
Op.The output looks blank until you press the contrast button.
It's super easy to fix this by resetting the contrast of any mutable layers. I've actually already coded up the fix on my machine...
The question is: should we reset the contrast?
Factors:
@elevans @ctrueden do you have opinions?
The text was updated successfully, but these errors were encountered: