[ImageJ-devel] ImageOpener always giving me three channels when these is only one.
ctrueden at wisc.edu
Sun Dec 12 21:33:55 CST 2010
FYI, ImageJ has a "feature" where if the LUT is totally grayscale, ImageJ
ignores it and declares the file to be a regular 8-bit image, rather than
"RGB color." Unfortunately, this makes it difficult to tell if the image has
a "hidden" color table. Still, you could probably eliminate the LUT by
resaving as TIFF again from ImageJ.
On Sun, Dec 12, 2010 at 9:49 PM, Grant B. Harris <gharris at mbl.edu> wrote:
> Not intending to use ImageJFunctions.displayAsVirtualStack... just was
> seeing if I got the same result.
> I finally found another tiff image that loads with one channel...
> - GBH
> On 12/12/2010 4:58 PM, Curtis Rueden wrote:
> Hi Grant,
> 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