[ImageJ-devel] ImageOpener always giving me three channels when these is only one.
Lee Kamentsky
leek at broadinstitute.org
Mon Dec 13 08:13:44 CST 2010
On 12/13/2010 9:04 AM, Gabriel Landini wrote:
>
> Two ways of labelling: one is by changing the index MOD the number of colours,
> the other is to use all the indexes and let the LUT distribute the colours.
> Both have problems. The first one I already mentioned, and there are not
> unique particle indexes as they might be shared, but this is the one that
> looks least confusing: the next particle in the scan is of a different colour.
>
> The other: one can index increasingly in a 32 bit image, but because the LUT
> is stretched to fit the data range, many consecutive particles look the same
> colour (but have a different index). I use that in one of the morphology
> plugins (I think it is called Binary_Label)
CellProfiler uses greedy coloring:
http://en.wikipedia.org/wiki/Greedy_coloring . I construct a graph of
adjacent objects (and you can do things like distance transforms to
create an array where all objects are expanded to fill the background to
make them all adjacent so that nearby objects are colored differently).
I order objects from most connected to least and make sure the color I
assign is different from any of their connections - you're guaranteed to
use as few colors as the most connected object + 1. Perhaps this is a
way of recoloring any arbitrary image to make it colorblind-accessible
(and possibly very ugly ;-) ).
--Lee
More information about the ImageJ-devel
mailing list