<div dir="ltr">If I use a grayscale instead of a RGB vtkLookupTable and if I set the opacity transfer function, won't the final colors corelate with the opacity values.<br><br>Thanks,<br><br>Jothy<br><br><div class="gmail_quote">
On Tue, Jul 20, 2010 at 11:09 PM, 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: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
This is "almost" a trivial thing to do. With vtkImageMapToColors, you<br>
can do this:<br>
<br>
vtkImageMapToColors::SetLookupTable(vtkColorTransferFunction)<br>
<br>
So, you can use ImageMapToColors to map an image to exactly the same<br>
colors that you get when you do a volume rendering. However, the<br>
vtkColorTransferFunction does not do opacity, only colors -- the<br>
opacity is handled by a separate vtkPiecewiseFunction (the fact that<br>
the vtkColorTransferFunction doesn't include the alpha channel is<br>
something that I consider to be a flaw in VTK.)<br>
<br>
So, unless I am mistaken, if you want to map a vtkImageData through a<br>
piecewise opacity function, you will have to find a creative way of<br>
doing so.<br>
<br>
David<br>
<div><div></div><div class="h5"><br>
<br>
On Tue, Jul 20, 2010 at 3:03 PM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> Is there any way to convert vtkVolume to vtkImageData after volume rendering<br>
> using composite function?<br>
><br>
> Actually I need to get the opacity values from each voxel (alpha).<br>
><br>
> Any help would be highly appreciated!<br>
><br>
><br>
> Thank you<br>
><br>
> Jothy<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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:<br>
> <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>
><br>
</blockquote></div><br></div>