<div class="gmail_quote">On Tue, Apr 12, 2011 at 3:20 AM, Bc. Michal Srna <span dir="ltr"><<a href="mailto:michal@srna.info">michal@srna.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br><br>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. <br>
<br>I have one example of blending output of GE SPECT/low-dose CT Imaging system and it looks like that - <a href="http://goo.gl/8eDfH" target="_blank">http://goo.gl/8eDfH</a> (third column of images). That is the colormapping I am aiming for.<br>
<br>I tried to find some LUTs and it seems, that the closest is the FireIce (Hot/Cold) LUT, see the example here: <a href="http://goo.gl/KawPo" target="_blank">http://goo.gl/KawPo</a><br><br>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)?<br>
<br>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?<br>
<br></blockquote></div><br>Hi,<br><br>I often use this one, which looks a little like your Matlab example:<br><br> vtkSmartPointer<vtkColorTransferFunction> ctf =<br> vtkSmartPointer<vtkColorTransferFunction>::New();<br>
ctf->AddRGBPoint( 0, 0, 0, 0.0);<br> ctf->AddRGBPoint( 5567, 0, 0, 1.0);<br> ctf->AddRGBPoint(11135, 0, 1.0, 1.0);<br> ctf->AddRGBPoint(16376, 1.0, 1.0, 0);<br> ctf->AddRGBPoint(21943, 1.0, 0.5, 0);<br>
ctf->AddRGBPoint(27184, 1.0, 0, 0);<br> ctf->AddRGBPoint(32752, 0.5, 0, 0);<br><br>You should of course, modify the scalar range to suit your needs.<br><br>Enjoy!<br><br>Marc<br>