[ImageJ-devel] [fiji-devel] saving images with imglib2-io

Stephan Preibisch stephan.preibisch at gmx.de
Wed Mar 7 14:13:32 CST 2012


Hi Curtis & Mark,

first of all thanks a lot for caring about this important issue. I felt this was always one of the really important things lacking in ImgLib.
I just had a look into the source code, and it looks like a great start. You are right, extracting planes from other sources than PlanarImg will not be a big deal.

I have 5 questions/comments that we might want to think about now or later:

1) We should maybe not only do this for Img, but actually for any RandomAccessibleInterval<NativeType>. In this way we will be able to write Img, Views, anything that is rectangular. The source code will be just the same ... 
2) Also thinking along those lines (and more into the future), is there maybe any way to write/read sparse data, i.e. a list of coordinates and associated values (net.imglib2.collection)?
3) Another issue will soon be planes that are too big to hold them in one java array, do you have means to write/read them? The CellImg will be able to hold them, and according to Stephan Saalfeld it will not take much longer until electron microscopy will produce such images. The current limit of java arrays is 2^31-1 entries which means ~46000x46000 pixels per plane.
4) Are there means to not only consider RealType? Maybe we could think of a way where it is enough to have just a NativeType that is able to project itself into a java basic type array?
5) What also crossed my mind were Non-Native-Types and if we should somehow consider them at all. A generic but I guess slow and inefficient method would be to serialize each pixel individually?

Regarding the related topic: I completely agree. Merging imglib2-io with Bioformats seems like just the right thing to do. It is anyway useless without bioformats :)

Nice greetings!
Steffi



On Mar 6, 2012, at 19:45 , Curtis Rueden wrote:

> Hi Steffi & everyone,
> 
> But Mark, maybe we should talk about the saver?
> 
> The work on ImgSaver is now being done in the imglib-io branch of my Bio-Formats Git repository:
>     https://github.com/ctrueden/bioformats/tree/imglib-io
>     https://github.com/ctrueden/bioformats/tree/imglib-io/components/scifio/src/ome/scifio/img
>     https://github.com/ctrueden/bioformats/blob/imglib-io/components/scifio/src/ome/scifio/img/ImgSaver.java
> 
> Currently, only a skeleton of the API exists, but Mark will be continuing work throughout this week. Initially, we decided to implement the special case for PlanarImg, which will provide good performance. We will add the more general case after that.
> 
> On a related topic: we are hoping to merge the imglib-io project into scifio core. As discussed at the last hackathon, the scifio.jar library now depends on imglib2.jar, which has several advantages. It allows SCIFIO to share ImgLib2's dimensional axis enumeration (Axes & AxisType), as well as pixel types. More importantly to end users, it enables SCIFIO to provide a high-level API for obtaining Img objects from a data source—if we merge imglib-io into scifio. Does this sound like a good plan?
> 
> Regards,
> Curtis
> 
> 
> On Tue, Mar 6, 2012 at 5:38 PM, Stephan Preibisch <stephan.preibisch at gmx.de> wrote:
> Hi Johannes,
> 
> I am not, I was just looking to add it to the examples, but this can wait.
> 
> But Mark, maybe we should talk about the saver?
> 
> Bye bye,
> Steffi
> 
> Am Mar 6, 2012 um 13:57 schrieb Johannes Schindelin <Johannes.Schindelin at gmx.de>:
> 
> > Hi,
> >
> > please also note that imagej-devel at imagejdev.org is now
> > imagej-devel at imagej.net.
> >
> > On Tue, 6 Mar 2012, Johannes Schindelin wrote:
> >
> >> On Tue, 6 Mar 2012, Stephan Preibisch wrote:
> >>
> >>> I once implemented an n-dimensional saver for imglib1 using the ImageJ
> >>> tiff saver. I will try to port this one today, you will find it in
> >>> ImageJFunctions.saveAsTIFFs.
> >>
> >> Please don't. People will start to use it and it will be incompatible
> >> with the SCIFIO/Bio-Formats based ImgSaver. Hopefully you agree that 1)
> >> that would be bad and 2) the ImgSaver will be more powerful, supporting
> >> the complete Bio-Formats infrastructure.
> >
> > I realize that I sounded much harsher than intended. Just wanted to make
> > sure that time is used efficiently.
> >
> > If you are in dear need of a saver *right now*, I recommend working with
> > Mark Hiner on an interface so that users of your saver will transparently
> > be using the scifio-based one when that is available.
> >
> > Ciao,
> > Dscho
> >
> > --
> > Please avoid top-posting, and please make sure to reply-to-all!
> >
> > Mailing list web interface: http://groups.google.com/group/fiji-devel
> 
> --
> Please avoid top-posting, and please make sure to reply-to-all!
> 
> Mailing list web interface: http://groups.google.com/group/fiji-devel
> 
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20120307/32ef2519/attachment.html>


More information about the ImageJ-devel mailing list