<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi All</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I am trying to overlay 2 registered images using complementary LUTs (magenta & green), so that the images will appear white where they match perfectly. However, I couldn't get the desired results. The image appears magenta where they match.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br>Can anyone find any mistakes in this?</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Below are the LUTs I use:</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><font color="#008000">GREEN</font><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">lookup</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">table</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkLookupTable</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">table</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkLookupTable</span><span style="color:rgb(0,0,0)">>::</span><span style="color:rgb(0,0,0)">New</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">table</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetHueRange</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">0.33333</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,128)">0.33333</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">table</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetSaturationRange</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">table</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetValueRange</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">table</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetAlpha</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">0.5</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">table</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">SetRampToLinear</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">table</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">Build</span><span style="color:rgb(0,0,0)">();</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">MAGENTA</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">lookup</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">table</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkLookupTable</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(0,0,0)">table2</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkLookupTable</span><span style="color:rgb(0,0,0)">>::</span><span style="color:rgb(0,0,0)">New</span><span style="color:rgb(0,0,0)">();</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">table2</span><span style="font-family:verdana,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">-></span><span style="font-family:verdana,sans-serif;font-style:italic;color:rgb(0,0,0)">SetHueRange</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">(</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,128)">0.8333</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">,</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,128)">0.8333</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">);</span><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">table2</span><span style="font-family:verdana,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">-></span><span style="font-family:verdana,sans-serif;font-style:italic;color:rgb(0,0,0)">SetSaturationRange</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">(</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,128)">1.0</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">,</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,128)">1.0</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">);</span><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">table2</span><span style="font-family:verdana,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">-></span><span style="font-family:verdana,sans-serif;font-style:italic;color:rgb(0,0,0)">SetValueRange</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">(</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,128)">0.0</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">,</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,128)">1.0</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">);</span><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">table2</span><span style="font-family:verdana,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">-></span><span style="font-family:verdana,sans-serif;font-style:italic;color:rgb(0,0,0)">SetAlpha</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">(</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,128)">0.5</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">);</span><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">table2</span><span style="font-family:verdana,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">-></span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">SetRampToLinear</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">();</span><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">table2</span><span style="font-family:verdana,sans-serif;color:rgb(192,192,192)"> </span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">-></span><span style="font-family:verdana,sans-serif;font-style:italic;color:rgb(0,0,0)">Build</span><span style="font-family:verdana,sans-serif;color:rgb(0,0,0)">();</span><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Any help is highly appreciated!</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Cheers</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Jothy</pre></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre></div></div>