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

Opened 2012-09-12T10:56:58-05:00

Last modified 2012-09-17T12:47:42-05:00

Surface Plot doesn't always work

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b5-scripting
Component: Legacy Compatibility Version: 2.0.0-beta4
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1459

Description (last modified by bdezonia)

Open Organ Of Corti
Split Channels
Select channel 3 image (blue)
Run Analyze :: Surface Plot
Asked if run on all 15 images: say yes
The command does not work and a dialog shows "ImageJ 1.x threw an exception"

This sequence works fine in IJ1 version 1.47a and 1.47c
Also doing a basic surface plot of some loaded sample data does work in IJ2.

Change History

comment:1 Changed 2012-09-12T10:58:30-05:00 by bdezonia

  • Description modified

comment:2 Changed 2012-09-13T11:11:39-05:00 by bdezonia

  • Blocking 1459 added

comment:3 Changed 2012-09-17T11:46:02-05:00 by bdezonia

After thoroughly debugging this I know the issue. IJ1 is calling on an ImagePlus that is in an inconsistent state. It has an int[] for the first slice and byte[]'s for the remaining ones. This is due to poor initialization code. It does not affect IJ1 due to some blind luck but does affect IJ2 because we intercept and do some processing. I have emailed Wayne a one line initialization fix and have asked him to change code. Awaiting reply.

The proposed fix:

Changing line 70 of SurfacePlotter from this:

stack.addSlice(null, new byte[plot.getWidth()* plot.getHeight()]);

to this:

stack.addSlice(null, plot.duplicate().getPixels());

comment:4 Changed 2012-09-17T12:47:42-05:00 by bdezonia

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

From Wayne: This change is in the ImageJ 1.47d9 daily build

comment:5 Changed 2012-10-10T13:27:48-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta6 to imagej-2.0.0-beta5-new