[ImageJ-devel] ImageOpener always giving me three channels when these is only one.
ctrueden at wisc.edu
Sun Dec 12 15:58:08 CST 2010
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.
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.
On Sun, Dec 12, 2010 at 1:22 PM, Grant B. Harris <gharris at mbl.edu> wrote:
> I'm having a problem with opening an imglib.Image...
> I'm testing with an image: Cells.tif is an unsigned 8-bit image.
> The Image created by ImageOpener.openImage(file) has 3 channels when it
> should have only one.
> The code I am using is:
> String filename = "Cells.tif";
> final ImageOpener imageOpener = new ImageOpener();
> Image<T> inImg = imageOpener.openImage(filename);
> This outputs:
> Image 'Cells.tif [X Y Channel]', dim=(617, 460, 3)
> Type = mpicbg.imglib.type.numeric.integer.UnsignedByteType
> Container = mpicbg.imglib.container.planar.PlanarContainer
> And when I do ImageJFunctions.displayAsVirtualStack(inImg).show()
> I get an ImageWindow with a slider for 3 channels...
> Is this a bug? Or am I doing something wrong?
> -- Grant
> ImageJ-devel mailing list
> ImageJ-devel at imagejdev.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ImageJ-devel