imagej / imagej-legacy

ImageJ+ImageJ2 compatibility layer
https://imagej.net/libs/imagej-legacy
BSD 2-Clause "Simplified" License
17 stars 25 forks source link

Reconcile IJ1 <-> IJ2 synchronization and object conversion #231

Open imagejan opened 4 years ago

imagejan commented 4 years ago

There are currently multiple open issues related to IJ1 <-> IJ2 image conversion:

As mentioned by @ctrueden in https://github.com/imagej/imagej-legacy/issues/186 and https://github.com/imagej/imagej-legacy/issues/229#issuecomment-561296997, we should possibly separate conversion and (lazy) synchronization better and create thorough tests for all (reported and anticipated) use cases.

@ctrueden do you think it would be feasible to change behavior such that:

?

ctrueden commented 4 years ago

@imagejan Thanks for summarizing these. We can (and should) change the converter behavior not to touch the LegacyImageMap. The second point—changing when we synchronize—would require careful consideration and testing.

imagejan commented 4 years ago

An important point to test is if conversion/synchronization also works correctly on a higher level that allows interacting with how the current image is displayed (current slice, color map, display settings, etc.):

See also this discussion on the forum: Analyze the current slice of an ImgPlus in ImageJ2

imagesc-bot commented 4 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/analyze-the-current-slice-of-an-imgplus-in-imagej2/38238/3

imagesc-bot commented 4 years ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/get-active-image-index-in-an-imagej2-plugin-called-in-fiji/39764/3

imagejan commented 2 years ago

I think the comment in https://github.com/imagej/pyimagej/issues/155#issuecomment-989048033 by @ctrueden is relevant here, also without the Python-related parts:

The question is when (and at which performance cost) synchronization should be performed. Maybe a boolean option flag to distinguish between an "eager" and a "lazy" mode would make sense here, similar to auto_sync that @elevans suggests for pyimagej?

I am posting this here for reference, in case someone will have time to focus on this issue for one week during a future hackathon 😄

maarzt commented 2 years ago

Is somebody working on this image or should I maybe do it? @imagejan @ctrueden @hinerm

imagejan commented 2 years ago

I'm not sure if @hinerm or @elevans have this on their radar currently, but I guess that you'd be most welcome to work on it, @maarzt! 🙏

elevans commented 2 years ago

@maarzt @imagejan This issue is on our radar and in the queue. We're working on finishing up the PyImageJ publication, getting the PyImageJ documentation/examples in order and releasing a new version of PyImageJ (1.1.0). The way things are currently planned we will address this issue in the following release (not 1.1.0 as there is not enough time).