<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">The basic ideas for LUTs:<br>
<br>
1) Use common formulas to look up color bin in LUTs and to look
up histogram bin. (See my Histogram e-mail).<br>
<br>
2) Migrate IJ2 color classes into ImgLib2 as Curtis mentioned. <i><b>Or
should we just use net.imglib2.type.numeric.ARGBType?</b></i><br>
<br>
3) Support ColorTable16 and hide details of ColorTable8 & 16
by having ColorTable be a base class or interface that has the
following methods:<br>
<br>
// get number of colors (typically 256; 64K for ColorTable16)<br>
int getSize();<br>
<br>
// gets colors for displaying the LUT (typically bins is 256)<br>
ColorRGBA[] getColors(int bins);<br>
<br>
// given the mininum value that maps to the first color and
maximum that maps to the last color, what does current value map
to?<br>
ColorRGBA lookUpColor(double value, double minimum, double
maximum);<br>
<br>
Thanks!<br>
Aivar<br>
<br>
On 8/10/12 2:39 PM, Curtis Rueden wrote:<br>
</div>
<blockquote
cite="mid:CADN69ymZ8uLQ1WBCGpwzqsogve0btCtspEvZmOQWxKrN_hMhsA@mail.gmail.com"
type="cite">Hi all,
<div><br>
</div>
<div>Aivar and I chatted, and we have a plan for improving the LUT
API.</div>
<div><br>
</div>
<div>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:</div>
<div> * imagej.util.ColorRGB</div>
<div> * imagej.util.ColorRGBA</div>
<div> * imagej.util.Colors</div>
<div> * imagej.data.display.ColorTables</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Curtis</div>
<div><br>
<br>
<div class="gmail_quote">On Tue, Aug 7, 2012 at 1:58 PM, Aivar
Grislis <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:grislis@wisc.edu" target="_blank">grislis@wisc.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> I meant to send this
to the imagej-devel list...
<div>
<div class="h5"><br>
<br>
<div>-------- Original Message --------
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap"
valign="BASELINE">Subject: </th>
<td>IJ2 work/LUTs</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap"
valign="BASELINE">Date: </th>
<td>Tue, 07 Aug 2012 13:45:04 -0500</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap"
valign="BASELINE">From: </th>
<td>Aivar Grislis <a moz-do-not-send="true"
href="mailto:grislis@wisc.edu"
target="_blank"><grislis@wisc.edu></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap"
valign="BASELINE">To: </th>
<td><a moz-do-not-send="true"
href="mailto:imagej-devel@imagejdev.org"
target="_blank">imagej-devel@imagejdev.org</a>,
Curtis Rueden <a moz-do-not-send="true"
href="mailto:ctrueden@wisc.edu"
target="_blank"><ctrueden@wisc.edu></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>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
</pre>
<br>
<br>
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
ImageJ-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:ImageJ-devel@imagej.net">ImageJ-devel@imagej.net</a><br>
<a moz-do-not-send="true"
href="http://imagej.net/mailman/listinfo/imagej-devel"
target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>