[ImageJ-devel] ImageJ 1 legacy harmonization and rois

Lee Kamentsky leek at broadinstitute.org
Tue Jun 14 09:53:13 CDT 2011


Hi all,
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.

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:

    * 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.
          o Replace all overlays with a single composite on output.
          o 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).
    * 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.

But again, I don't want to decide what's right and I am most definitely 
open to suggestion.

--Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20110614/5b15eee1/attachment.html>


More information about the ImageJ-devel mailing list