NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 661 - Cannot draw Polyline Roi
Cannot draw Polyline Roi
Status: REOPENED
Product: Fiji
Classification: Unclassified
Component: TrakEM2
unspecified
PC Linux
: P5 critical
Assigned To: Albert Cardona
: 1090
Depends on:
Blocks:
 
Reported: 2013-09-10 11:02 CDT by Stephan Saalfeld
Modified: 2015-06-17 14:53 CDT
2 users (show)

See Also:

Description Stephan Saalfeld 2013-09-10 11:02:51 CDT
I cannot draw a polyline Roi any more.  The canvas shows the initial point but no further mouse action is accepted.  Straight line, freehand line do work as expected, however, I can 'split images under polyline' only using a polyline selection that I cannot draw: consequence, I cannot split images along folds.
Comment 1 Stephan Saalfeld 2013-09-11 04:18:01 CDT
Workaround while the bug persists:

Open the Beanshell Interpreter

1. draw the separating line as a freehand line
2. execute:
   roi = IJ.getImage().getRoi();
   roi2 = new PolygonRoi(roi.getFloatPolygon(), Roi.POLYLINE);
   IJ.getImage().setRoi(roi2);
3. the freehand line is now a polyline with many nodes and can be used to
   split the inmages

I suggest that TrakEM2, internally, could do this conversion instead of insisting that the selection is a polyline already.
Comment 2 Curtis Rueden 2014-08-19 10:54:47 CDT
I cannot reproduce this problem with an up-to-date Fiji on OS X: the polyline tool lets me draw a polyline using a series of left mouse clicks on the Blobs image. If the problem persists for you, please reopen with details, using Help > Report a Bug and copying the environment information, then pasting it into a comment here, along with complete instructions on how to reproduce.
Comment 3 Curtis Rueden 2014-08-19 10:56:28 CDT
Oh I see, you mean a TrakEM2 canvas specifically. In that case, yes, I can reproduce with a blank TrakEM2 project. Sorry for the noise.
Comment 4 Albert Cardona 2014-12-11 08:32:24 CST
Well that's unfortunate: the polyline is the tool used to split images into two pieces.

So the ij.gui.ImageCanvas must have changed again in a non-backwards compatible way.

Albert
Comment 5 Benjamin.Pavie 2015-06-17 03:12:12 CDT
I have just reported the same bug (see last bug), and found that it is due to the DisplayCanvas in TrakEM2 itself, since the MouseMovedThread inner class that handle the mousemove event do not do anything if the ROI is a Roi.POLYGON, Roi.POLYLINE, Roi.ANGLE or Roi.LINE, unlike the mouseMoved method from ImageCanvas (see https://github.com/trakem2/TrakEM2/blob/master/TrakEM2_/src/main/java/ini/trakem2/display/DisplayCanvas.java#L1334 and http://rsb.info.nih.gov/ij/developer/source/ij/gui/ImageCanvas.java.html )

So it looks for some reason that those ROI are not supported anymore in Mousemoved, so they cannot be draw anymore.
It looks like an earlier version was using the mouseMoved  method of ImageCanvas since we can see it commented:
https://github.com/trakem2/TrakEM2/blob/master/TrakEM2_/src/main/java/ini/trakem2/display/DisplayCanvas.java#L1317
which will explain why it was working previously.

Benjamin
Comment 6 Curtis Rueden 2015-06-17 14:53:05 CDT
*** Bug 1090 has been marked as a duplicate of this bug. ***