NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #965 (closed defect: fixed)

Opened 2012-02-09T14:39:29-06:00

Last modified 2012-03-06T17:57:31-06:00

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)

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 2012-02-09T14:52:04-06:00 by bdezonia

  • Description modified

comment:2 Changed 2012-02-17T12:32:26-06:00 by bdezonia

See also #926 and #967

Last edited 2012-02-17T12:47:25-06:00 by bdezonia

comment:3 Changed 2012-02-17T12:33:01-06:00 by bdezonia

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

comment:4 Changed 2012-02-27T11:00:59-06:00 by curtis

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

comment:5 Changed 2012-02-28T09:18:18-06:00 by bdezonia

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

comment:6 follow-up: ↓ 7 Changed 2012-03-02T15:10:31-06:00 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 2012-03-02T15:25:13-06:00 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 2012-03-06T17:57:31-06:00 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