-
Notifications
You must be signed in to change notification settings - Fork 82
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
Integrate ij1-ij2 synchronization to image conversion #155
Comments
from @ctrueden
|
see also #74 |
May I ask why this synchronization has to happen in |
@imagejan Ideally, yes. But I am not sure exactly when we should trigger this synchronization. To summarize the architecture for interested readers:
So now we have an original ImageJ As you might expect, many core plugins e.g. "Subtract Background" and "Gaussian Blur" will operate on the current slice's working pixels array. But exactly when should the resync back to the backing ImgLib2 image happen? The imglib2-ij library handles it by writing out the changed pixels whenever But what if a plugin doesn't ever call The workaround I talked with @elevans about yesterday was to call Maybe these heuristics could achieve sufficient performance by hooking into a bunch of common This problem really needs a person to fully focus on it for one week or more. And unfortunately no one is going to do that before the end of this year. |
One other (probably horrible) idea I had was to make some kind of But this idea would still not solve the Python case, because for Python, we really do need the pixel changes to be synced back out to the numpy array. We could of course use this |
Relatedly: I think this issue is misnamed, because calling
The above four-step workflow is what most of the relevant issues here are doing. And The simplest thing is probably to rename |
Agreed, we should make this change. Thinking more about this since our last meeting, I'm starting to like the idea of an |
The synchronization function was renamed to |
When we wrap numpy arrays to
ImagePlus
instances we end up with a virtualImagePlus
that does not automatically reflect changes to its pixel values.We have the
synchronize_ij1_to_ij2
helper method to work around this limitation but it's currently not called as part of our conversion methods.In
from_java
we should have a check that if our data is a virtualImagePlus
, we synchronize it. This check should be defensive and work even if IJ1 is not present on the classpath.The text was updated successfully, but these errors were encountered: