Thanks David!!<div><br></div><div>This is just what I was looking for!!</div><div><br></div><div>I'm curious on how to solve this using another actor for the marker since I'm using vtkImageViewer2.</div><div><br></div>
<div>Thanks & 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"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></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 -> vtkImageMapToColors (RGB) -> image1_rgb<br>
marker -> vtkImageMapToColors (RGBA) -> marger_rgba<br>
<br>
(image1_rgb , marker_rgba) -> vtkImageBlend -> 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 -> vtkImageChangeInformation::SetExtentTranslation() -><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>
<<a href="mailto:luisrpp@gmail.com">luisrpp@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I have two images:<br>
><br>
> vtkImageData object; // Contains the object of interest - Grey scale image (0 - 256)<br>
> vtkImageData marker; // Just the marker for the object - Binary Image with same size of 'object'<br>
><br>
> I need to display the marker over the object in a GUI. To do that, I`m using the vtkImageBlend:<br>
><br>
> vtkImageBlend* blend = vtkImageBlend::New();<br>
> blend->RemoveAllInputs();<br>
> blend->AddInput(object);<br>
> blend->AddInput(marker);<br>
> blend->SetOpacity(1, opacity);<br>
> blend->Update();<br>
><br>
> Then, I'm setting the output image to a vtkImageViewer2.<br>
><br>
> So far so good, but the problem is that I have to control the opacity to see the marker.<br>
><br>
> 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>
><br>
> If this is not the correct approach to do this kind of effect, could someone give me some guidance?<br>
><br>
> Thanks & Regards,<br>
> Luis<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> 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>
><br>
> 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>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
</div></div></blockquote></div><br></div>