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

Opened 2012-04-23T15:26:52-05:00

Last modified 2012-05-18T12:21:49-05:00

Copy To System broken

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

Description

Open clows, Edit Colors - set to grayscale, Move channel slider to blue component. Run Copy To System. Exception thrown.

java.lang.IllegalArgumentException: DirectColorModel required

at ij.process.ColorProcessor.setColorModel(ColorProcessor.java:100)
at imagej.legacy.translate.ColorTableHarmonizer.setImagePlusLutToFirstInView(ColorTableHarmonizer.java:205)
at imagej.legacy.translate.ColorTableHarmonizer.updateLegacyImage(ColorTableHarmonizer.java:125)
at imagej.legacy.translate.Harmonizer.updateLegacyImage(Harmonizer.java:126)
at imagej.legacy.plugin.LegacyPlugin.updateImagePlusesFromDisplays(LegacyPlugin.java:281)
at imagej.legacy.plugin.LegacyPlugin.run(LegacyPlugin.java:134)
at imagej.ext.plugin.PluginModule.run(PluginModule.java:151)
at imagej.ext.module.ModuleRunner.run(ModuleRunner.java:149)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:119)
at imagej.ext.module.ModuleRunner.call(ModuleRunner.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

Change History

comment:1 Changed 2012-04-23T15:28:31-05:00 by bdezonia

I found this when testing whether afraser's comment in IJ-Commands-All google document still held. His comments were:

Open [IJ2] an RGB image. and copy the green channel via copy to system. Paste into photoshop and it turns out that the red channel was copied. -- I have a gripe with this feature anyway since what you see isn't necessarily what you get, and since it should probably be automatically done when "copy" is done.

comment:2 Changed 2012-04-23T15:34:37-05:00 by bdezonia

This exception also happens if you run the Clear or Clear outside legacy plugins on clown

comment:3 Changed 2012-04-24T11:17:52-05:00 by bdezonia

Exception fixed, Clear, Clear Outside, and Copy to System now all run.

Cannot determine if copy to system works. I have yet to be able to find an app on Linux that will paste anything any data (or else its pasting an all white image).

comment:4 Changed 2012-04-26T10:38:13-05:00 by bdezonia

open clown and then copy to system. Exception thrown (listed below). Note that the exception line is the same as the show lut exception. Both of them do stuff like this:

Image img = IJ.getInstance().createImage(w, h);
Graphics g = img.getGraphics();

And the returned img is null thus causing the exception on the getGraphics() call.

See also ticket #966.

java.lang.NullPointerException

at ij.plugin.Clipboard.getTransferData(Clipboard.java:139)
at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1161)
at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2208)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)
at java.awt.EventQueue.access$000(EventQueue.java:96)
at java.awt.EventQueue$1.run(EventQueue.java:608)
at java.awt.EventQueue$1.run(EventQueue.java:606)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:617)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Last edited 2012-04-26T10:39:17-05:00 by bdezonia

comment:5 Changed 2012-04-26T10:53:33-05:00 by bdezonia

I've verified that code that gives rise to #966 and #1134 are the only two places in IJ1 where this is the case.

comment:6 Changed 2012-04-26T16:14:20-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta2 to imagej-2.0.0-beta3

comment:7 Changed 2012-04-27T11:11:59-05:00 by bdezonia

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

With 3db7276d884c87dba281274097094fecc3f79951 Copy To System functionality replaced by pure IJ2 plugin.

comment:8 Changed 2012-05-18T12:21:49-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta2