Skip to content

Edits to ColorTables of ImagePlus created from a Dataset never make it back to that Dataset #311

@gselzer

Description

@gselzer

@ctrueden provided me with a script that can be run in Fiji-future with a SNAPSHOT scijava/scripting-python jar, which does the following:

  • Initializes a multi-channel Dataset.
  • Converts it to an ImagePlus using PyImageJ (which uses the DatasetToImagePlusConverter).
  • Edits the LUT of that ImagePlus, such that one channel is Magenta.
  • Displays the ImagePlus.
    From there, I want to interact with the active ImageDisplay, so I call LegacyImageDisplayService.getActiveImageDisplay. This taps into the LegacyImageMap, finds the associated ImageDisplay within its internal map, and returns it after synchronizing the associated attachments (i.e. ROIs and Tables, but not LUT)s. Therefore, the returned dataset does not have the edited Magenta that I see in the active image display.

LegacyImageMap makes a Harmonizer object on events - is there a reason why it cannot have one of these all the time, such that syncrhonizeAttachmentsToDataset could utilize it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions