[vtkusers] (no subject)

Vetria Byrd byrdv at cis.uab.edu
Fri Feb 13 11:07:53 EST 2004


I am trying to convert a python program to C++.

Python Code:

outline = vtkOutlineFilter()
outline.SetInput(reader.GetOutput())
outlineMapper = vtkPolyDataMapper()
outlineMapper.SetInput(outline.GetOutput())
outlineActor = vtkActor()
outlineActor.SetMapper(outlineMapper)
outlineProp=outlineActor.GetProperty()
outlineProp.SetColor(0,0,0)

Converted C++ code:

vtkOutlineFilter *outline = vtkOutlineFilter::New();
   outline->SetInput( (vtkDataSet *) reader->GetOutput() );
	   
vtkPolyDataMapper *outlineMapper = vtkPolyDataMapper::New();
   outlineMapper->SetInput(outline->GetOutput() );

vtkActor *outlineActor = vtkActor::New();
   outlineActor->SetMapper(outlineMapper);
	   
vtkActor *outlineProp = vtkActor::New();

// the following lines of code are generating error messages:

   outlineProp=outlineActor->GetProperty();
   outlineProp->SetColor(0,0,0);


Error messages:
type `vtkActor' is not a base type for type `vtkProperty'
no matching function for call to `vtkActor::SetColor (int, int, int)'

How do I convert these two lines of python code to C++?

Thanks in advance,
Vetria





More information about the vtkusers mailing list