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 #878 (closed feature: fixed)

Opened 2011-11-21T10:58:11-06:00

Last modified 2014-08-20T11:45:24-05:00

Support "subtracting" ROIs

Reported by: dscho Owned by: dscho
Priority: critical Milestone: imagej2-b9-rois
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By: #1022, #1465, #1466
Blocking: #285, #1010

Description

In ImageJ 1.x, you can hold down the Alt key when selecting a region which will _subtract_ the selected part from the current selection.

This requires a substantial extension of our current ROI framework.

Change History

comment:1 Changed 2012-02-26T23:00:41-06:00 by curtis

  • Blocking 285, 1010 added

comment:2 Changed 2012-02-26T23:00:51-06:00 by curtis

  • Type changed from defect to feature

comment:3 Changed 2012-02-27T14:55:06-06:00 by dscho

  • Priority changed from major to blocker

comment:4 Changed 2012-02-27T14:56:34-06:00 by dscho

  • Status changed from new to accepted

comment:5 Changed 2012-02-27T16:10:54-06:00 by dscho

  • Blocking 1022 added

comment:5 Changed 2012-03-02T18:04:09-06:00 by dscho

Unfortunately, JHotDraw does not offer any functionality like that, so most likely I will have to write code to generate a JHotDraw figure from an AWT GeneralPath and use AWT for the geometry operations.

comment:6 Changed 2012-03-03T19:25:59-06:00 by dscho

Progress: I found out how to convert a Java AWT-type Shape object (given its PathIterator) into a JHotDraw-type BezierPath.

Since JHotDraw depends on AWT's geometry classes anyway, we can now rely on java.awt.geom.Area to do the constructive area geometry (such as subtraction). We will also be able to use this to flatten multiple selections into one single composite one.

As always, progress can be seen in the Git repository (in this case, the 'roi-subtract' branch).

comment:7 Changed 2012-03-09T15:49:23-06:00 by dscho

The real problem seems to be that we need to add support for multi-path bezier RegionOfInterests to ImgLib2...

comment:8 Changed 2012-03-23T17:18:27-05:00 by dscho

And related to the lack of multi-path bezier ROIs in ImgLib2: there is no support for such a beast in JHotDrawCanvas either. So I'll do that, too.

comment:9 Changed 2012-03-26T10:48:29-05:00 by curtis

  • Blocking 1022 removed

comment:10 Changed 2012-03-26T10:49:07-05:00 by curtis

  • Blocked By 1022 added

(In #1022) Selection tool is successfully eliminated. Alt key will not work until subtracting ROIs works (see ticket #878). But there is nothing left to do for this specific ticket.

comment:10 Changed 2012-03-29T11:41:53-05:00 by curtis

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2

Finishing this work will have to wait till beta2, as we are too short on time.

comment:11 Changed 2012-05-15T10:34:49-05:00 by curtis

  • Blocking 1143 added; 285 removed

comment:12 Changed 2012-06-08T13:40:19-05:00 by curtis

  • Priority changed from blocker to critical

comment:13 Changed 2012-07-03T12:53:12-05:00 by curtis

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

comment:14 Changed 2012-07-03T13:26:11-05:00 by bdezonia

  • Blocking 285 added

comment:15 Changed 2012-07-03T13:28:24-05:00 by bdezonia

  • Blocking 1143 removed

comment:16 Changed 2012-08-14T10:32:40-05:00 by curtis

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta6

ROIs will be the focus of beta6.

comment:17 Changed 2012-09-06T18:58:46-05:00 by dscho

I worked quite a bit on this and am close to merging things. It requires a change in ImgLib that introduces a dependency on AWT again, but that will go away soon. It also adds our own ad-hoc JHotDraw tool for general paths (i.e. a list of Beziér paths combined with the even/odd winding rule), re-using the BezierTool. The progress can be seen in the 'roi-dscho' branch in imglib.git and the 'roi-subtract' branch in imagej.git.

comment:18 Changed 2012-09-07T14:59:45-05:00 by dscho

  • Blocked By 1465 added

comment:19 Changed 2012-09-07T15:04:30-05:00 by dscho

  • Blocked By 1466 added

comment:20 Changed 2012-09-11T16:32:29-05:00 by dscho

  • Blocked By 1470 added

comment:21 Changed 2012-12-17T12:25:48-06:00 by bdezonia

  • Blocked By 1470 removed

comment:22 Changed 2014-08-20T11:45:24-05:00 by curtis

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