[vtkusers] Errors converting python code to C++

Vetria Byrd byrdv at cis.uab.edu
Fri Feb 13 11:14:38 EST 2004


That last email was without a subject:  sorry.

------------- Begin Forwarded Message -------------

Delivered-To: vtkusers at vtk.org
From: Vetria Byrd <byrdv at cis.uab.edu>
To: vtkusers at vtk.org
MIME-Version: 1.0
Content-MD5: h9toHG9iaMVWgyhjv9VNrQ==
Subject: [vtkusers] (no subject)
X-BeenThere: vtkusers at vtk.org
X-Mailman-Version: 2.0.11
List-Help: <mailto:vtkusers-request at vtk.org?subject=help>
List-Post: <mailto:vtkusers at vtk.org>
List-Subscribe: <http://www.vtk.org/mailman/listinfo/vtkusers>, 
<mailto:vtkusers-request at vtk.org?subject=subscribe>
List-Id: <vtkusers.vtk.org>
List-Unsubscribe: <http://www.vtk.org/mailman/listinfo/vtkusers>, 
<mailto:vtkusers-request at vtk.org?subject=unsubscribe>
List-Archive: <http://www.vtk.org/pipermail/vtkusers/>
Date: Fri, 13 Feb 2004 10:07:53 -0600 (CST)

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


_______________________________________________
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://www.vtk.org/mailman/listinfo/vtkusers

------------- End Forwarded Message -------------





More information about the vtkusers mailing list