[ImageJ-devel] ImageOpener always giving me three channels when these is only one.

Grant B. Harris gharris at mbl.edu
Sun Dec 12 13:22:09 CST 2010


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.
(http://dev.imagejdev.org/svn/imagej/trunk/ijx/Cells.tif)

The code I am using is:

         String filename = "Cells.tif";
         final ImageOpener imageOpener = new ImageOpener();
         Image<T> inImg = imageOpener.openImage(filename);
         reportInformation(inImg);

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




More information about the ImageJ-devel mailing list