[vtkusers] How to change colour mapping of a vtkImageData? (used as a plane's texture)
tom fogal
tfogal at apollo.sr.unh.edu
Mon Jun 27 21:50:10 EDT 2005
<20050627213934.10615 at smtp10.qc.aibn.com>"Sean McBride" writes:
<snip>
>My pseudo-code snippit is:
>
>vtkImageReslice* resliceY = vtkImageReslice::New();
> ...
<snip>
>vtkPolyDataMapper* planeYMapper = vtkPolyDataMapper::New();
> planeYMapper->SetInput(planeYSource->GetOutput());
> planeYMapper->SetLookupTable(colourTransfer); // ******
>vtkTexture* planeYTexture = vtkTexture::New();
> planeYTexture->SetInput(resliceY->GetOutput());
>vtkActor* planeYActor = vtkActor::New();
> planeYActor->SetMapper(planeYMapper);
> planeYActor->SetTexture(planeYTexture);
>myRenderer->AddActor(planeYActor);
Ive never used these particular filters, so I'm shooting in the dark --
but I \emph{believe} that with vtkSphereSource and friends (e.g.
vtkTexturedSphereSource), if you set a color for the Actor's color AND
a texture for the sphere, the texture overrides the Actor's color
completely. Assuming my memory is sound, LookupTable colors may also be
overridden by textures.
HTH,
-tom
More information about the vtkusers
mailing list