Re: De-combine ROI

Posted by dscho on
URL: http://imagej.273.s1.nabble.com/De-combine-ROI-tp3702271p3702272.html

Hi,

On Thu, 6 Jul 2006, roberto aranibar wrote:

> Does anyone know if it is possible to separate a multi-part ROI into
> separate ROIs? That is, if I have an ROI that I modified using the alt
> key, is there a way to separate the original ROI from the modified part?

When you combine ROIs, you do not have the original ROI any more, but just
the merged result. You could, however, write a plugin, which uses the
PathIterator class to decompose the ROI. But there are several problems:

- in ImageJ, you can have one ROI only. How do you choose which one, and
  what do you do with the others?

- You can have a WIND_EVEN_ODD rule on the selection, which basically
  means that you can do things like a doughnut shape. In such a case, you
  should _not_ decompose the segments blindly, because they might not make
  sense on their own (i.e. you could end up with _two_ circle selections,
  when you really wanted to _unselect_ the inner circle).

Ciao,
Dscho