[ImageJ-devel] Questions about imglib2

Johannes Schindelin Johannes.Schindelin at gmx.de
Thu Mar 15 10:22:00 CDT 2012


Hi,

On Thu, 15 Mar 2012, Stephan Saalfeld wrote:

> > It's about separation. Keep in mind that AWT dependencies are
> > difficult at best in certain environments (cluster, Android, massively
> > parallel computation, SWT).
> > 
> 
> I fully agree.  We will need to decide how to separate that properly.
> 
> > > 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).
> > 
> 
> Absolutely.  But to my knowledge, the current IJ2 display builds upon
> DatasetView which builds upon ARGBScreenImage which builds upon AWT
> Image.
> 
> https://github.com/imagej/imagej/blob/master/core/data/src/main/java/imagej/data/display/DatasetView.java
> 
> Am I missing something else?  If not, that would need separation too,
> many alternative DatasetViews to come?

You're only missing what I did not say (because I write all these mails on
a phone, waiting for the bicycle to be repaired whose chain a mutual
friend of ours broke...).

There is a ticket on http://trac.imagej.net/ that states that indeed, we
use ARGBScreenImage and that we want to separate things better in ImgLib2
;)

After all, it makes sense to reuse the same code for making a
BufferedImage that is implemented in ImgLib2 rather than reinventing the
wheel...

> > 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.
> > 
> 
> Yes.

Glad we're on the same page, even before discuussing it... ;)

Ciao,
Johannes



More information about the ImageJ-devel mailing list