Posted by
Albert Cardona-2 on
Dec 08, 2009; 12:43pm
URL: http://imagej.273.s1.nabble.com/ImageJ-development-involvement-contributions-tp3690030p3690078.html
On Fri, Dec 4, 2009 at 7:53 AM, Johannes Schindelin
<
[hidden email]> wrote:
>>
>> If we're still talking about Swing vs AWT then none of the core data
>> structures (ImagePlus, ImageProcessor etc) need change at all.
>
> This is not true, as both have references to AWT components in them
> (e.g. ImagePlus points to its ImageWindow, ImageProcessor points to the
> Roi which points to the ImageCanvas, etc).
I second that. In TrakEM2, which uses Swing, I had to literally create
fake extended ImagePlus. ImageCanvas and ImageWindow classes just to
redirect calls, mostly for ROIs. The alterantive was to rewrite
ImageCanvas, which slowly over time I did to a surprising degree.
Making ImageJ depend on Swing would just repeat the same mistake.
Making ImageJ be GUI-independent would help a lot: then any GUI (AWT,
Swing, GWT, QT) could be bolted on top.
>> I've made an ImagePanel derivative of ImageCanvas for some of our
>> applications and there are only about 10 lines of code which need to be
>> changed to make the switch.
>
> For the SIOX plugin, Ignacio and me tried to decouple the ImagePlus from
> the ImageCanvas, and use JImagePanel, but we failed to decouple the ROIs
> enough: if the ImageProcessor is not attached to an ImageCanvas, then
> there is currently no clean way to let ImageJ handle the ROIs but display
> them as overlays of the JImagePanel.
Precisely.
Albert