Skip to content

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

@gselzer

Description

@gselzer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions