How can i Copy an vtkActor ( vtkMapper ) ?

Charles Law at
Tue Sep 14 08:07:32 EDT 1999


I do not know why you want to copy the data too.  Copying the actor and its
properties might be enough.  But ...

1: PointData and CellData do have methods called PassData.

2: In VTK3.0 you should be able to create a new vtkPolyData object (or 
and set the last filter in the pipeline before the mapper with:

oldData = filter->GetOutput();
newData = vtkPolyData::New();

Now oldData and newData should have exactly the same data.

At 11:01 AM 9/14/99 +0200, Luebeck, Harald wrote:

>How can create an exact copy of an vtkActor. I need an copy not an refrence
>because i want to modify some Properties without modifing the original
>At the moment i use the folloing code :
>// Copy Mapper through DataSet
>pDataSet->CopyStructure( pShapeActor->GetMapper()->GetInput() );
>// Set new mapper
>pMapper->SetInput( pDataSet );
>pActor->SetMapper( pMapper );
>How can i copy the rest of the data. i.e TCoords, Scalars ... ?
>Thanks for any help.

This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.


More information about the vtkusers mailing list