[vtkusers] Help!!!I can't change the color of the iso face!
Bill Lorensen
wlorens1 at nycap.rr.com
Sat May 4 21:20:11 EDT 2002
mapMC->ScalarVisibilityOff();
At 11:30 AM 5/4/02 +0800, Lin Fei wrote:
>Hi everybody,
> I'm using vtkMarchingCubes class to create some isofaces,but I can not change the color when rendering.I develop this in the example SampleMFC comes with VTK4.0.Here is a piece of my code in CSampleDoc:
>
> vtkStructuredPointsReader * reader = vtkStructuredPointsReader::New();
> reader->SetFileName("ironProt.vtk");
>
> vtkMarchingCubes * skinExtractor = vtkMarchingCubes::New();
> skinExtractor->SetInput(reader->GetOutput());
> skinExtractor->SetValue(0, 128);
>
> vtkPolyDataMapper *mapMC = vtkPolyDataMapper::New();
> mapMC->SetInput(skinExtractor->GetOutput(0));
>
> vtkActor *actMC = vtkActor::New();
> actMC->SetMapper(mapMC);
> actMC->GetProperty()->SetColor(1,1,0);//<==This line doesn't work at all.
>
> Props->AddItem(actMC);
>
> No matter what color I set,it's always blue.But if I render a vtkCubeSource object or something in the same program,it works.
> Any help will be highly appreciated!
>
>
>Sophie
>5/4/2002
>
>
>_________________________________________________________________
>Ãâ·ÑÏÂÔØ MSN Explorer£ºhttp://explorer.msn.com/lccn/intl.asp
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list