[vtkusers] vtkGlyph3D Colors

Amy Squillacote ahs at cfdrc.com
Fri Feb 1 09:30:50 EST 2008


Hi Bart,

I think what you're looking for is the ScalarVisibilityOff() method in 
vtkMapper.

- Amy

B.L.Kaptein at lumc.nl wrote:
> Hi,
>
> I use vtkGlyph3D to display a large number of small spheres. With VTK4,
> I could change the color of these spheres by changing the color of the
> Actor itself, but with VTK5, all spheres remain blue and I cannot change
> the color anymore. Can anybody explain to me how to fix this problem? Is
> there some command like: SetColorModeToDataColoringOff()?????
>
> -- CODE EXAMPLE -- 
> vtkGlyph3D *MarkersGlypher = vtkGlyph3D::New();
> MarkersGlypher->SetScaleModeToDataScalingOff();
> MarkersGlypher->SetColorModeToColorByVector();
> MarkersGlypher->SetInput(this->GetTransformFilter()->GetOutput());
> MarkersGlypher->SetSource(Sphere->GetOutput());
>
> vtkPolyDataMapper *MarkersMapper = vtkPolyDataMapper::New();
> MarkersMapper->SetInput(ActiveMarkersGlypher->GetOutput());
>
> vtkActor *MarkersActor = vtkActor::New();	
> MarkersActor->SetMapper(MarkersMapper);
>
> // This command does not change the color of the little spheres!
> MarkersActor->GetProperty()->SetColor(Color);
> -- END CODE --
>
> Thanks,
>
> Bart.
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>   




More information about the vtkusers mailing list