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 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 valign="BASELINE">Subject:
            </th>
            <td>IJ2 work/LUTs</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap valign="BASELINE">Date: </th>
            <td>Tue, 07 Aug 2012 13:45:04 -0500</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap valign="BASELINE">From: </th>
            <td>Aivar Grislis <a href="mailto:grislis@wisc.edu" target="_blank"><grislis@wisc.edu></a></td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap valign="BASELINE">To: </th>
            <td><a href="mailto:imagej-devel@imagejdev.org" target="_blank">imagej-devel@imagejdev.org</a>, Curtis Rueden
              <a 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 href="mailto:ImageJ-devel@imagej.net">ImageJ-devel@imagej.net</a><br>
<a href="http://imagej.net/mailman/listinfo/imagej-devel" target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
<br></blockquote></div><br></div>