[vtkusers] Advice with setting LUT [vtkLookupTable] for FireIce (Hot/Cold)

David Gobbi david.gobbi at gmail.com
Tue Apr 12 10:23:46 EDT 2011


Hi Michal,

Using SetHueRange etc. will probably not give you a satisfying lookup
table.  I suggest that you use standard lookup tables e.g. like the
ones that come with ImageJ.  If you have arrays of red, green, and
blue then you can build a lookup table with code like this:

table->SetNumberOfColors(256);
table->Build();
for (int i = 0; i < 256; i++) {
  double alpha = (i < 10 ? 0.0 : 1.0); // include a transparency threshold
  table->SetTableValue(i, red[i]/255.0, green[i]/255.0, blue[i]/255.0, alpha);
}

A nice collection of lookup tables can be found here:
http://imagej.nih.gov/ij/download/luts/

 - David




On Tue, Apr 12, 2011 at 1:20 AM, Bc. Michal Srna <michal at srna.info> wrote:
> Hello,
>
> I am blending CT images with SPECT (nuclear medicine) images. I have found
> and tried some settings of vtkLookupTable (rainbow, hot...) for colormapping
> those SPECT images, but none of them suits my needs.
>
> I have one example of blending output of GE SPECT/low-dose CT Imaging system
> and it looks like that - http://goo.gl/8eDfH (third column of images). That
> is the colormapping I am aiming for.
>
> I tried to find some LUTs and it seems, that the closest is the FireIce
> (Hot/Cold) LUT, see the example here: http://goo.gl/KawPo
>
> I didn't find, how to set vtkLookupTable for creating LUT like that
> (SetHueRange,...). Could someone please help me, how to create LUT for
> colormapping like on that example (Hot/Cold)?
>
> My second question comes with transparency - I don't know, if it's possible
> to colormap just bones (not black parts of image) and black parts make
> totally transparent, so when blending it would looks like just bones were
> colormapped?
>
> Thanks for any suggestion!
>
> Best regards,
>
> Michal
>
> --
> S pozdravem Bc. Michal Srna
>
> Fotografické portfolio:
> http://michalsrna.cz
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list