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 1090 - TrakEM2 : segmentation with polygon ROI not working
TrakEM2 : segmentation with polygon ROI not working
Status: RESOLVED DUPLICATE of bug 661
Product: Fiji
Classification: Unclassified
Component: TrakEM2
unspecified
PC Windows
: P4 normal
Assigned To: Albert Cardona
Depends on:
Blocks:
 
Reported: 2015-06-16 09:30 CDT by Benjamin.Pavie
Modified: 2015-06-17 14:53 CDT
3 users (show)

See Also:

Description Benjamin.Pavie 2015-06-16 09:30:00 CDT
I watched the following video http://www.ini.uzh.ch/~acardona/movies/arealist-create-and-edit.mp4 describing how to segment in TrakEM2 and at 43 sec, it demonstrates how to use polygon ROI tool to draw a ROI then use the FIT SPLINE option to get a perfect selection.
Unfortunately, using the last FIJI version available (ImageJ 1.49t), it impossible to use the polygon ROI tool which is not working anymore. Using it will just draw a tiny yellow square as a first point and refuse to add a new one, getting stuck. You can't even unselect the ROI easily. 

According to Wayne Rasband who tested TrakEM2 in ImageJ 1.49s, 1.48, 1.47 and 1.46 and 1.44, it did not work in any of these earlier versions (I add this comment for the forum):

quoted:
"The problem with the polygon ROI tool in TrakEM2 does not seem to be due to an ImageJ API change in the last three years. I tried using the tool in ImageJ 1.49s, 1.48, 1.47 and 1.46 and it did not work in any of these earlier versions..
(...)
The Polygon ROI tool in TrakEM2 does not work with ImageJ 1.44, released in January 2011. I tried to revert to 1.43 but Fiji would not restart when I downgraded to that version."

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 now 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 had a good reason).

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: UPDATEABLE

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\Users\u0094799\bin\Fiji.app/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\Users\u0094799\bin\Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20150614035343)
Fiji: http://fiji.sc/update/ (last check:20150605150752)

Files not up-to-date:
  03c47575 (LOCAL_ONLY) 20150511162009 plugins/3D_Convex_Hull.jar
  f79be975 (LOCAL_ONLY) 20150414165535 plugins/Auto_Focus.jar
  34e56692 (LOCAL_ONLY) 20150611165214 plugins/BoneJ_.jar
  1f12fc21 (LOCAL_ONLY) 20150610170354 plugins/IntSeg_3D.jar
  5f60d96e (LOCAL_ONLY) 20150427143733 plugins/Watershed_.jar
  6cbd979b (LOCAL_ONLY) 20150527103909 plugins/pagita_.jar
Comment 1 Benjamin.Pavie 2015-06-17 03:14:31 CDT
It looks like the bug was already reported previously, see bug ID 661
Comment 2 Curtis Rueden 2015-06-17 14:53:05 CDT
Thanks for the detailed investigation, Benjamin. Closing this one as duplicate. Discussion continuing in the original issue.

*** This bug has been marked as a duplicate of bug 661 ***