[vtkusers] Using Scalars to colour

Sean Richards sean at millwood.ca
Fri Jun 18 10:35:39 EDT 2004


Hello all!

I am using vtkPolyDataConnectivityFilter to extract all the different regions I have in some data. The code I am using is as follows

  vtkPolyDataConnectivityFilter *connect = vtkPolyDataConnectivityFilter::New();
connect->SetInput(legReader->GetOutput());
connect->SetExtractionModeToAllRegions();
connect->ColorRegionsOn();

Then later when I render the resulting image, everything is blue.

I want all the different regions to have different colours (I think this is what the above code should do). Do I need to use a lookup table to somehow colour the data? (If so, how do you do this?)

Any help would be greatly appreciated.

Thanks!

Sean


More information about the vtkusers mailing list