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

Johannes Schindelin Johannes.Schindelin at gmx.de
Mon Dec 13 03:52:34 CST 2010


Hi,

On Mon, 13 Dec 2010, Gabriel Landini wrote:

> On Sunday 12 December 2010 22:33:55 Curtis Rueden wrote:
> > 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.
> 
> Just imagine you are working with an 8 bit image, then you want to see 
> some contrast enhanced and apply a false colour LUT and then go back to 
> the greyscale LUT. If I saved this image which is now greyscale with the 
> grey.lut, would this be re-opened as RGB? Maybe this is not such a good 
> idea.
> 
> I do not know how IJ tests the LUT, but I guess it would be trivial: 
> loop through the 256 entries and see if they are r=g=b in the expected 
> sequential order. If so, then treat as 8bit greyscale image. Checking 
> the table would tell you if there are any hidden colours.

IMHO an index-color image is _not_ of a numeric type. So to properly 
support index-color images, one would need to make a "CategoricalType" 
that still uses bytes or shorts, but that cannot add/multiply/whatever.

OTOH if the LUT is just a view mode (as it should always be seen in 
scientific imaging), then the LUT is not part of the image and should not 
be saved in the first place. I often catch users insisting on the DAPI 
channel being colored blue, when they should know fully well (because I 
told them) that the DAPI channel is the result of a range of frequencies, 
not blue.

In short: in most cases I hear people want index-color images, it turns 
out that they really want numeric images with lookup tables instead. Since 
we want to analyze the samples of which those images were taken, it is 
really, really important to keep the distinction in mind.

Ciao,
Johannes





More information about the ImageJ-devel mailing list