[ImageJ-devel] Fwd: IJ2 work/LUTs
Aivar Grislis
grislis at wisc.edu
Fri Aug 10 17:40:37 CDT 2012
The basic ideas for LUTs:
1) Use common formulas to look up color bin in LUTs and to look up
histogram bin. (See my Histogram e-mail).
2) Migrate IJ2 color classes into ImgLib2 as Curtis mentioned. /*Or
should we just use net.imglib2.type.numeric.ARGBType?*/
3) Support ColorTable16 and hide details of ColorTable8 & 16 by having
ColorTable be a base class or interface that has the following methods:
// get number of colors (typically 256; 64K for ColorTable16)
int getSize();
// gets colors for displaying the LUT (typically bins is 256)
ColorRGBA[] getColors(int bins);
// given the mininum value that maps to the first color and maximum that
maps to the last color, what does current value map to?
ColorRGBA lookUpColor(double value, double minimum, double maximum);
Thanks!
Aivar
On 8/10/12 2:39 PM, Curtis Rueden wrote:
> Hi all,
>
> Aivar and I chatted, and we have a plan for improving the LUT API.
>
> We are going to migrate ImageJ2's color classes into ImgLib2, into
> net.imglib2.display along side ColorTable / ColorTable8 /
> ColorTable16, so that those color tables classes can make use of them.
> Specifically, the following classes from ImageJ2 will migrate:
> * imagej.util.ColorRGB
> * imagej.util.ColorRGBA
> * imagej.util.Colors
> * imagej.data.display.ColorTables
>
> These four classes are useful general-purpose color classes that fit
> in well with ImgLib2's ColorTable API, and will allow us to provide
> better LUT functionality in general. Aivar can elaborate further on
> technical details if anyone else is interested.
>
> Regards,
> Curtis
>
>
> On Tue, Aug 7, 2012 at 1:58 PM, Aivar Grislis <grislis at wisc.edu
> <mailto:grislis at wisc.edu>> wrote:
>
> I meant to send this to the imagej-devel list...
>
>
> -------- Original Message --------
> Subject: IJ2 work/LUTs
> Date: Tue, 07 Aug 2012 13:45:04 -0500
> From: Aivar Grislis <grislis at wisc.edu> <mailto:grislis at wisc.edu>
> To: imagej-devel at imagejdev.org
> <mailto:imagej-devel at imagejdev.org>, Curtis Rueden
> <ctrueden at wisc.edu> <mailto:ctrueden at wisc.edu>
>
>
>
> I've been looking at IJ2 trying to figure out how SLIM Plugin fits in.
> I was looking at the LUT code & am interested in refactoring it.
>
> I found some non-linearity bugs in the way LUTs are applied in the
> AutoContrast and DefaultImageDisplay plugins that I could fix.
>
> The LUT API could be improved. There are two kinds of LUTs, ColorTable8
> and ColorTable16, the former is what's being used as a LUT, the latter
> is in the codebase but not really used or displayed AFAIK.
>
> This could be a Service or other Plugin. I would consolidate the
> RealLUTConverter class into LUTs, LUTs would contain a ColorTable, the
> API might be something like this:
>
> // constructor
> LUT(ColorTable colorTable);
>
> // given a min/max range for the LUT, what is the color for current value?
> ARGBType lookup(double min, double max, double value);
>
> // get a swath of colors to use to display the LUT
> ARGBType[] getColors(int bins);
>
> Refactoring this isn't essential to SLIM Plugin, but it might be a good
> way to get up to speed with IJ2 work.
>
> Aivar
>
>
>
>
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net <mailto:ImageJ-devel at imagej.net>
> http://imagej.net/mailman/listinfo/imagej-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20120810/3cf2b3c4/attachment.html>
More information about the ImageJ-devel
mailing list