Ticket #965 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

IJ2 does not track color just like IJ1

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b1-initial
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by bdezonia) (diff)

In IJ1 we track fg/bg colors.

In IJ2 the gray values and the color values are tracked as separate items. There are two places that update them (the PickerTool and the OptionsColors dialog).

It turns out that IJ1 relies on foreground and background color always being tracked. If not then running plugins like Clear and Clear Outside can fill with an unexpected color. OptionsSynchronizer does not handle translation of its fg/bg gray values to colors in IJ1.

It's not clear whether this is something for user to adapt to or if its a bug to fix.

Change History

comment:1 Changed 8 years ago by bdezonia

  • Description modified (diff)

comment:2 Changed 8 years ago by bdezonia

See also #926 and #967

Last edited 8 years ago by bdezonia (previous) (diff)

comment:3 Changed 8 years ago by bdezonia

  • Milestone changed from imagej-2.0-beta2 to imagej-2.0-beta1

comment:4 Changed 8 years ago by curtis

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2

comment:5 Changed 8 years ago by bdezonia

  • Milestone changed from imagej-2.0-beta2 to imagej-2.0-beta1

comment:6 follow-up: ↓ 7 Changed 8 years ago by bdezonia

After discussion we've determined that IJ2 will not really track colors like IJ1.

The color picker functionality will record all the channel values at a given pixel location.
It's configure() code will call OptionsColors dialog.
The OptionsColors dialog (to be renamed) will show two lists of channels ("foreground" and "background")
For beta 1 each list of channel values will be a comma separated string of values
Eventually we'll want a list of doubles which we will support with a new dialog widget yet to be done
When the picker is run besides recording channel values it will remember the best color from the view
It is this color that will get synched from IJ2 to IJ1
We will not synch IJ1 colors back to IJ2 since information would get lost
When drawing in IJ2 using the current channel values:

  • if target image has more channels than current values then zero fill
  • if target image has fewer channels than current values then grab 1st n

Assigned pixels will clamp the input channel values if they are out of bounds for the target type when assigning pixels
We could consider scaling rather than clamping.

comment:7 in reply to: ↑ 6 Changed 8 years ago by curtis

Replying to bdezonia:

Eventually we'll want a list of doubles which we will support with a new dialog widget yet to be done

This work is described in ticket #792.

comment:8 Changed 8 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

This ticket is complete via numerous changes beginning with bffaa4924a99baa82b760b98030d3d00b465ff67 and ending in 3ff92047937688a9030553480272dd563e71a1ff

Note: See TracTickets for help on using tickets.