Hi Grant,<br><br>The image has an 8-bit LUT, which is why it's being read as 3 channels. Currently ImageOpener expands such lookup tables, since ImgLib does not explicitly support indexed color. So the behavior is expected.<br>
<br>Also, it's fine to use ImageJFunctions.displayAsVirtualStack(inImg).show() for testing, but presumably you are not using it in IJX for production? The work Barry has been doing in ij1bridge is the direction we want to go.<br>
<br>-Curtis<br><br>On Sun, Dec 12, 2010 at 1:22 PM, Grant B. Harris <span dir="ltr"><<a href="mailto:gharris@mbl.edu">gharris@mbl.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'm having a problem with opening an imglib.Image...<br>
<br>
I'm testing with an image: Cells.tif is an unsigned 8-bit image.<br>
The Image created by ImageOpener.openImage(file) has 3 channels when it should have only one.<br>
(<a href="http://dev.imagejdev.org/svn/imagej/trunk/ijx/Cells.tif" target="_blank">http://dev.imagejdev.org/svn/imagej/trunk/ijx/Cells.tif</a>)<br>
<br>
The code I am using is:<br>
<br>
String filename = "Cells.tif";<br>
final ImageOpener imageOpener = new ImageOpener();<br>
Image<T> inImg = imageOpener.openImage(filename);<br>
reportInformation(inImg);<br>
<br>
This outputs:<br>
<br>
Image 'Cells.tif [X Y Channel]', dim=(617, 460, 3)<br>
Type = mpicbg.imglib.type.numeric.integer.UnsignedByteType<br>
Container = mpicbg.imglib.container.planar.PlanarContainer<br>
<br>
And when I do ImageJFunctions.displayAsVirtualStack(inImg).show()<br>
I get an ImageWindow with a slider for 3 channels...<br>
<br>
Is this a bug? Or am I doing something wrong?<br>
<br>
-- Grant<br>
<br>
_______________________________________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagejdev.org" target="_blank">ImageJ-devel@imagejdev.org</a><br>
<a href="http://imagejdev.org/mailman/listinfo/imagej-devel" target="_blank">http://imagejdev.org/mailman/listinfo/imagej-devel</a><br>
</blockquote></div><br>