[vtkusers] vtkImageActor, transparency, and depth peeling

David Feng dfeng at cs.unc.edu
Fri Mar 23 09:43:15 EDT 2007


Karthik Krishnan wrote:
>
> On 3/22/07, *David Feng* <dfeng at cs.unc.edu <mailto:dfeng at cs.unc.edu>> 
> wrote:
>
>     Makes sense.  It seems then that I have a problem with my
>     vtkImageActor,
>     as it really ought to have only one scalar component.  When I step
>     through the renderer it apparently ends up having 4 components, even
>     though it was initialized with a single-component vtkImageData. 
>
>
> You are probably sticking a vtkImageMapToColors inadvertantly 
> somewhere in your pipeline. You will have that if you use 
> ImageViewer2, it transforms the input data through a lookup table map.
>
> If this is the case, you need to use SetOutputFormatToLuminance on it. 
> The default behaviour of this class is to transform input to RGBA data.
>
> --
> karthik
>
>
You're right.  The vtkImageViewer2's vtkImageMapToWindowLevelColors was 
set by default to output to RGBA. This is unexpected behavior -- maybe 
vtkImageViewer2 could check the number of components of the input and 
handle this accordingly in the future.

Thanks for your help,
David




More information about the vtkusers mailing list