Skip to content
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

ImagePlusToDatasetConverter does not preserve pixel changes in ImagePluses originating from a Dataset #286

Open
gselzer opened this issue Nov 28, 2022 · 0 comments
Labels

Comments

@gselzer
Copy link
Contributor

gselzer commented Nov 28, 2022

In napari-imagej, we have use cases where you might transfer a Image layer to a Dataset, and then into an ImagePlus for use within the legacy ImageJ UI. This conversion will make use of ImagePlusToDatasetConverter to get that ImagePlus, registering the linking between the created ImagePlus and the original Dataset in the LegacyImageMap.

If you then process that ImagePlus, and attempt to convert it back into a Dataset, the original Dataset in the map gets returned without the changes made in the ImagePlus. The underlying data should be wrapped, but it is not updated before being returned. This results in the need for this HACK in napari-imagej. Ideally, the equivalent of ij.py.sync_image (imp.getStack().setPixels(imp.getProcessor().getPixels(), imp.getCurrentSlice())) would be placed within the ImagePlusToDatasetConverter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant