[ImageJ-devel] Img <-> BufferedImage conversion
Brian Schlining
bschlining at gmail.com
Wed Aug 20 13:13:24 CDT 2014
Hi Curtis,
One thing I need to do is transform Img (actually ArrayImg) objects to BufferedImages.
Note that if what you want is to transform N-dimensional Imgs to rendered BufferedImages (e.g., at specific planes, perhaps composited, and so forth), you can use the Projector and Converter API:
Yes, for the most part, I want to transform the Img to BufferedImages so that I can draw info onto them. (See attached example). A full round-trip might not be needed, but it would be a nice to have.
https://github.com/imglib/imglib/tree/imglib2–2.0.0-beta–26/core/src/main/java/net/imglib2/display/projector https://github.com/imglib/imglib/tree/imglib2–2.0.0-beta–26/core/src/main/java/net/imglib2/converter
This is how ImageJ2 actually paints Img objects on screen, using CompositeXYProjector and RealLUTConverter.
Can you give me a code example of how this would work? It’s not obvious from the javadocs how to use a Projector and Converter to generate a BufferedImage.
– Brian Schlining
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20140820/a0e9356c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filter_3-20090430221134.png
Type: image/png
Size: 178158 bytes
Desc: not available
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20140820/a0e9356c/attachment-0001.png>
More information about the ImageJ-devel
mailing list