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 #775 (closed defect: fixed)

Opened 2011-09-22T12:06:25-05:00

Last modified 2011-10-19T15:13:57-05:00

Convert to 8-bit broken

Reported by: afraser Owned by: bdezonia
Priority: critical Milestone: imagej2-b1-initial
Component: Legacy Compatibility Version:
Severity: critical Keywords: type, 8-bit
Cc: Blocked By:
Blocking:

Description (last modified by afraser)

Open Clown.jpg
Image > Type > 8-bit

Duplicates the display and runs the command on each display.

Looks to do the right thing, but when I open a histogram for the second display, it shows all values as being 0. Also running invert on the second display does nothing... this may be a problem with duplicate, since duplicating the original yields an image with the same strange properties (histogram = 0s, invert does nothing)

tested with ff78f1f00c5069b267bd05ed9c5350c3100536f2

Attachments

Screen shot 2011-09-22 at 1.01.38 PM.png (157.1 KB) - added by afraser 2011-09-22T12:07:29-05:00.
results of converting clown to 8-bit

Change History

Changed 2011-09-22T12:07:29-05:00 by afraser

results of converting clown to 8-bit

comment:1 Changed 2011-09-22T12:19:32-05:00 by afraser

  • Component changed from other to ij-legacy

comment:2 Changed 2011-09-22T14:21:20-05:00 by afraser

  • Description modified

comment:3 Changed 2011-10-18T15:07:26-05:00 by curtis

  • Owner changed from curtis to bdezonia
  • Status changed from new to assigned

Likely an issue with the legacy layer translation.

comment:4 Changed 2011-10-19T12:19:16-05:00 by bdezonia

adam, I'm assuming you mean Image > Type > 8-bit color. Right?

the second histogram all zero issue cannot be duplicated in 889f659ad129af101686052ec4150648302ed54e. it's possible it was fixed by bug fix for #831. also can invert resulting image.

am getting a plugin exception that keeps lut from being updated correctly. images look nothing like your PNG attachment.

comment:5 Changed 2011-10-19T12:21:53-05:00 by curtis

This bug is for the "8-bit" command, not "8-bit color." You will need to disable the blacklist in order to try it.

comment:6 Changed 2011-10-19T13:06:57-05:00 by bdezonia

okay, unblacklisted 8-bit and here is how things stand:

  • we are getting two images rather than one
  • the second histogram issue is indeed now gone
  • each image inverts. if you invert one image and then switch to the other it won't invert until you run the command twice.
  • plugin exception is indeed still happening:

[ERROR] ImageJ 1.x plugin threw exception
java.lang.ArrayIndexOutOfBoundsException: 2

at net.imglib2.AbstractInterval.dimension(AbstractInterval.java:184)
at imagej.data.display.AbstractDatasetView.getChannelCount(AbstractDatasetView.java:330)
at imagej.data.display.AbstractDatasetView.updateLUTs(AbstractDatasetView.java:308)
at imagej.data.display.AbstractDatasetView.setColorTable(AbstractDatasetView.java:127)
at imagej.legacy.translate.ColorTableHarmonizer.assignColorTables(ColorTableHarmonizer.java:259)
at imagej.legacy.translate.ColorTableHarmonizer.updateDisplay(ColorTableHarmonizer.java:74)
at imagej.legacy.translate.Harmonizer.updateDisplay(Harmonizer.java:157)
at imagej.legacy.plugin.LegacyPlugin.updateDisplaysFromImagePluses(LegacyPlugin.java:207)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:135)
at imagej.ext.plugin.PluginModule.run(PluginModule.java:174)
at imagej.ext.module.ModuleRunner.run(ModuleRunner.java:148)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:118)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:1)

comment:7 Changed 2011-10-19T15:13:57-05:00 by bdezonia

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

All issues cleared up with one line fix in 9ecb3078dc1f5da7f4ab7137cc32aa9148d00064