<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi all,<br>
I'm looking for ideas on how to harmonize the ImageJ 1.0 rois with
the ImageJ 2.0 overlays. At present, if you run an ImageJ 1.0
plugin, the harmonization code will duplicate the overlays because
it has no mechanism to check whether a roi was intentionally
duplicated or just happens to be there. Also, in ImageJ 1.0, each
ImagePlus has a single ROI which can be a composite of other ROIs
but the compositing is done by AWT. The pieces of the ROI composite
produced by AWT will not have a direct one-to-one correspondence
with the overlays that produced them and this makes matching and
back-translation to ImageJ a non-trivial task. Presently, the code
correctly produces one overlay that represents the one ImageJ ROI in
the ImagePlus and it adds, not replaces, the current set of
overlays.<br>
<br>
I'd really like some guidance on how to proceed and what would be an
acceptable solution. I'm sure I can figure out how to implement any
reasonable idea but I feel completely unqualified to choose that
solution. Some possibilities:<br>
<ul>
<li>Only back-translate an ImagePlus's ROI if the area it masks is
different on output from what it was on input. Slow, but
possibly as close to correct as possible.<br>
</li>
<ul>
<li>Replace all overlays with a single composite on output.</li>
<li>Replace all overlays with individual overlays as represented
by the paths in the ImagePlus's ROI. Requires analysis of
paths to determine which are disjoint (donut ROI is large
circle XORed with smaller inner circle and translates into a
composite ROI in this case whereas two circles that do not
overlap become two separate ROIs).<br>
</li>
</ul>
<li>Have a "HarmonizeOverlays" plugin that lets a user control
what happens via macros. Advantages: user can construct a macro
composed of several ImageJ 1.0 plugins and those will not suffer
from a mis-harmonization during the course of the macro. User
will have some degree of control over how the harmonization
takes place, choosing whether to replace overlays in the
display, add to them and whether to translate to a composite or
individual overlays. Disadvantages: not automatic and possibly
confusing.</li>
</ul>
But again, I don't want to decide what's right and I am most
definitely open to suggestion.<br>
<br>
--Lee<br>
</body>
</html>