[vtk-developers] Color and opacity mapping to a slice in VTK
Marcus D. Hanwell
marcus.hanwell at kitware.com
Mon May 28 13:16:43 EDT 2018
Thanks David, we are already using it, and I had just missed the API to
enable it on my first scan through. It looks great, and works really well,
thank you for pointing it out!
On Fri, May 25, 2018 at 3:43 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi Marcus,
>
> You could try using vtkDiscretizableColorTransferFunction instead of
> vtkColorTransferFunction. It can do opacity mapping as well as color
> mapping, and you should be able to use it anywhere in the VTK imaging
> pipeline that a lookup table would normally be used.
>
> - David
>
>
> On Fri, May 25, 2018 at 1:30 PM, Marcus D. Hanwell <
> marcus.hanwell at kitware.com> wrote:
>
>> Hi,
>>
>> The Tomviz project has had a request to add color and opacity mapping to
>> slices through vtkImageData. The volume mapper does this quite nicely, and
>> they would like to apply the same thing to slices which seems reasonable.
>>
>> This seems like something that may have already been done before in VTK,
>> has it? I couldn't find it, but in my mind it would extend what we
>> currently do from RGB to RGBA for a texture in a plane (that is the only
>> thing we are interested in at least). It is especially useful where you
>> have a range of values that are effectively background, and we want that to
>> be fully transparent so that the slice doesn't obscure contours, volume
>> rendering, atoms, etc from a tomographic reconstruction.
>>
>> Thanks for any input, if it doesn't exist yet we will look at the best
>> way of adding it.
>>
>> Thanks,
>>
>> Marcus
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtk-developers/attachments/20180528/5ef0e50b/attachment.html>
More information about the vtk-developers
mailing list