[ImageJ-devel] Questions about imglib2
Johannes Schindelin
Johannes.Schindelin at gmx.de
Thu Mar 15 08:32:20 CDT 2012
Hi,
On Thu, 15 Mar 2012, Stephan Saalfeld wrote:
> > Note that we need to extract all code referencing AWT into a new
> > component and confine AWT's use to that component. So we might need to
> > either move ScreenImage out to, say, imglib2-awt or strip it from all
> > mentions of AWT's classes and interfaces.
>
> If dependency on AWT in imglib2-core is not wanted, then we should move
> the entire display package into a new sub-project imglib2-awt. However,
> the sole purpose ScreenImage interface being to return an awt Image it
> cannot be stripped from AWT dependency.
It's about separation. Keep in mind that AWT dependencies are difficult at
best in certain environments (cluster, Android, massively parallel
computation, SWT).
> The display package in its current for is all about generating an AWT
> image. Do you have an alternative display in mind? Is there any code?
There is other code for display, yes, in IJ2. My understanding was that
the display code in ImgLib2 is rather limited and only intended for
debugging. The actual display should be performed by the actual
application. This notion comes from my understanding that we try to do
proper separation of concerns in ImgLib2/ImageJ2 (rather than hodgepodge
everything into a library which would incur a lot of technical debt).
But of course I agree that we should retain the code to be able to facade
an Img (or even an Interval?) as an AWT Image. It's just desirable to put
such code into one very specific component.
Having said that, I will also offend this rule by putting an AWT-based
RegionOfInterest into imglib2.jar. However, this is just a temporary
work-around that is due to lack of time; in IJ2's beta2 phase I will
remove the AWT dependency again.
Ciao,
Johannes
More information about the ImageJ-devel
mailing list