[vtkusers] How to convert vtkVolume to vtkImageData?

Jothy jothybasu at gmail.com
Fri Jul 23 11:48:30 EDT 2010


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.

Thanks,

Jothy

On Tue, Jul 20, 2010 at 11:09 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> This is "almost" a trivial thing to do.  With vtkImageMapToColors, you
> can do this:
>
> vtkImageMapToColors::SetLookupTable(vtkColorTransferFunction)
>
> So, you can use ImageMapToColors to map an image to exactly the same
> colors that you get when you do a volume rendering.  However, the
> vtkColorTransferFunction does not do opacity, only colors -- the
> opacity is handled by a separate vtkPiecewiseFunction (the fact that
> the vtkColorTransferFunction doesn't include the alpha channel is
> something that I consider to be a flaw in VTK.)
>
> So, unless I am mistaken, if you want to map a vtkImageData through a
> piecewise opacity function, you will have to find a creative way of
> doing so.
>
>  David
>
>
> On Tue, Jul 20, 2010 at 3:03 PM, Jothy <jothybasu at gmail.com> wrote:
> > Hi all,
> >
> > Is there any way to convert vtkVolume to vtkImageData after volume
> rendering
> > using composite function?
> >
> > Actually I need to get the opacity values from each voxel (alpha).
> >
> > Any help would be highly appreciated!
> >
> >
> > Thank you
> >
> > Jothy
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100723/c6cdc8cd/attachment.htm>


More information about the vtkusers mailing list