Login  Register

Re: TrakEM2 : segmentation with polygon ROI not working (Bug)

Posted by bpavie on Jun 15, 2015; 9:44am
URL: http://imagej.273.s1.nabble.com/TrakEM2-segmentation-with-polygon-ROI-not-working-Bug-tp5013118p5013163.html

Dear,

After a quick look of ImageJ source code of the ImageCanvas from ImageJ and the DisplayCanvas of TrakEM2 plugin, it looks the problem is more coming from the mouseMoved() method, which in DisplayCanvas doesn't look to manage the tools Toolbar.POLYGON, Toolbar.POLYLINE, Toolbar.ANGLE.

It looks at some point DisplayCanvas  was taking care of them which will explain why the video is working with using the Toolbar.POLYGON tool, but know none of the above tools are doing anything.
Actually, it looks it was using something similar to ImageCanvas and that it was commented and replaced by a threaded based class (see https://github.com/trakem2/TrakEM2/blob/master/TrakEM2_/src/main/java/ini/trakem2/display/DisplayCanvas.java#L1317 and https://github.com/trakem2/TrakEM2/blob/master/TrakEM2_/src/main/java/ini/trakem2/display/DisplayCanvas.java#L1373) which doesn't handle the above tools.

I am not sure how to change that easily, since I do not know why the default method has been replaced by the MouseMovedThread class for the mouse moved event (you must have a good reason).

Best,
Benjamin