[ImageJ-devel] Questions about imglib2
Curtis Rueden
ctrueden at wisc.edu
Thu Apr 19 16:04:01 CDT 2012
Hi Brian,
>
> > 2) How do I write a net.imglib2.img.Img to disk as the usual formats
> > (jpg, png, tiff) ? You have an ImgOpener but no ImgCloser err, I mean
> > ImgWriter.
> >
>
> Mark Hiner and Curtis Rueden are working on an ImageSaver:
>
>
> https://github.com/ctrueden/bioformats/blob/imglib-io/components/scifio/src/ome/scifio/img/ImgSaver.java
>
> Until this is finished, you will have to write data otherwise.
>
In case you hadn't already noticed, the initial version of ImgSaver is now
complete and available as part of imglib2-io. Please let us know if you
have any questions about it!
Regards,
Curtis
On Thu, Mar 15, 2012 at 6:05 AM, Stephan Saalfeld <saalfeld at mpi-cbg.de>wrote:
> Hi Brian,
>
> > 1) How do I convert an net.imglib2.img.Img to a
> > java.awt.image.BufferedImage?
> >
>
> There is the interface ScreenImage which can return a BufferedImage
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/core/src/main/java/net/imglib2/display/ScreenImage.java
>
> implemented by ARGBScreenImage
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/core/src/main/java/net/imglib2/display/ARGBScreenImage.java
>
> and UnsignedByteScreenImage
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/core/src/main/java/net/imglib2/display/UnsignedByteScreenImage.java
>
> . Both are Img themselves, so writing into their pixels changes the
> content of the BufferedImage. You can also map an arbitrary XY-plane of
> a RandomAccessibleInterval (Img is one) into such a screen image using
> either of the two Projectors:
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/core/src/main/java/net/imglib2/display/XYProjector.java
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/core/src/main/java/net/imglib2/display/XYRandomAccessibleProjector.java
>
> which includes type conversion from your source type into either ARGB or
> UnsignedByte using a Converter
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/core/src/main/java/net/imglib2/converter/Converter.java
>
> Default implementations are available, e.g.
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/core/src/main/java/net/imglib2/display/RealARGBConverter.java
>
> An example how to use it together with ImageJ is here:
>
>
> http://fiji.sc/cgi-bin/gitweb.cgi?p=imglib.git;a=blob;f=imglib2/tests/src/test/java/tests/OpenAndDisplayScreenImage.java;h=77a9dcffee790f6d202c3c730e7588b203a2def2;hb=HEAD
>
>
> > 2) How do I write a net.imglib2.img.Img to disk as the usual formats
> > (jpg, png, tiff) ? You have an ImgOpener but no ImgCloser err, I mean
> > ImgWriter.
> >
>
> Mark Hiner and Curtis Rueden are working on an ImageSaver:
>
>
> https://github.com/ctrueden/bioformats/blob/imglib-io/components/scifio/src/ome/scifio/img/ImgSaver.java
>
> Until this is finished, you will have to write data otherwise.
>
> Best,
> Stephan
>
>
>
> _______________________________________________
> 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/20120419/bd41f640/attachment.html>
More information about the ImageJ-devel
mailing list