Thanks David!!<div><br></div><div>This is just what I was looking for!!</div><div><br></div><div>I&#39;m curious on how to solve this using another actor for the marker since I&#39;m using vtkImageViewer2.</div><div><br></div>
<div>Thanks &amp; Regards,</div><div>Luis</div><div><br><div class="gmail_quote">On Tue, Jun 29, 2010 at 8:30 AM, David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Luis,<br>
<br>
The LUT can be set in a separate step, using vtkImageMapToColors. With<br>
vtkImageMapToColors, you can use SetOutputFormatToRGB() or<br>
SetOutputFormatToRGBA().<br>
<br>
image1 -&gt; vtkImageMapToColors (RGB) -&gt; image1_rgb<br>
marker -&gt; vtkImageMapToColors (RGBA) -&gt; marger_rgba<br>
<br>
(image1_rgb , marker_rgba) -&gt; vtkImageBlend -&gt; composite_rgb<br>
<br>
Also, if your marker image is smaller than your main image, you can<br>
position it in the main image by using vtkImageChangeInformation:<br>
<br>
marker -&gt; vtkImageChangeInformation::SetExtentTranslation() -&gt;<br>
marker_new_position<br>
<br>
By adjusting the vtkImageChangeInformation to change the extent of the<br>
second image input for vtkImageBlend, you can adjust where it will<br>
appear relative to the first image.<br>
<br>
Another option (that does not use vtkImageBlend) is to use a separate<br>
actor for the marker.<br>
<font color="#888888"><br>
  David<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
On Mon, Jun 28, 2010 at 9:16 PM, Luis Roberto P. Paula<br>
&lt;<a href="mailto:luisrpp@gmail.com">luisrpp@gmail.com</a>&gt; wrote:<br>
&gt; Hi All,<br>
&gt;<br>
&gt; I have two images:<br>
&gt;<br>
&gt; vtkImageData object;  // Contains the object of interest - Grey scale image (0 - 256)<br>
&gt; vtkImageData marker;  // Just the marker for the object - Binary Image with same size of &#39;object&#39;<br>
&gt;<br>
&gt; I need to display the marker over the object in a GUI. To do that, I`m using the vtkImageBlend:<br>
&gt;<br>
&gt;   vtkImageBlend* blend = vtkImageBlend::New();<br>
&gt;   blend-&gt;RemoveAllInputs();<br>
&gt;   blend-&gt;AddInput(object);<br>
&gt;   blend-&gt;AddInput(marker);<br>
&gt;   blend-&gt;SetOpacity(1, opacity);<br>
&gt;   blend-&gt;Update();<br>
&gt;<br>
&gt; Then, I&#39;m setting the output image to a vtkImageViewer2.<br>
&gt;<br>
&gt; So far so good, but the problem is that I have to control the opacity to see the marker.<br>
&gt;<br>
&gt; Is it possible to set a LUT for each image in vtkImageBlend, so I can set the marker a different color for the marker, without the need to set opacity?<br>
&gt;<br>
&gt; If this is not the correct approach to do this kind of effect, could someone give me some guidance?<br>
&gt;<br>
&gt; Thanks &amp; Regards,<br>
&gt; Luis<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
</div></div></blockquote></div><br></div>