[vtkusers] How to loop around vtkAppendPolydata ?

Wen-Hsing Chiang wchiang at iesinet.com
Thu Sep 25 17:40:31 EDT 2003


Hi,
If I understand it correctly, you might want to use the following code
to append (accumulate) many many instances of vtkPolydata to an instance
of vtkAppendPolydata.

Here goes the code:

//create an instance of vtkAppendPolydata
vtkAppendPolydata * pAppendPolyData = vtkAppendPolydata::New(); 
    	
//loop over all vtkpolydata objects you want to append to
pAppendPolyData
  //create APolydataObject
	.....

  //Append APolydataObject to pAppendPolyData
  pAppendPolyData->AddInput(APolydataObject);

  //delete pAppendPolyData
  APolydataObject->Delete();
//end of the loop




Wen-Hsing Chiang
  



-----Original Message-----
From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On Behalf
Of tutu lamotte
Sent: Thursday, September 25, 2003 1:42 PM
To: vtkusers at vtk.org
Subject: [vtkusers] How to loop around vtkAppendPolydata ?


Dear List !

We need to find a way to "accumulate" many polydata
that are manually created (Without source object). The
huge accumulated polydata would be the output of a vtkAppendPolydata
instance. Now because it is an accumulation, it means that the output
would also need to be the input of the same vtkAppendPolydata instance.
Each new polydata would be inserted as a second input. (this second
input would be disconnected after Update is called on the Append filter.
) We've tried that approach but the end result is always one single
polydata... and not an accumulation of all the datasets that were
appended.

Hope it's clearly explained !

Thanks for any suggestions !


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
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




More information about the vtkusers mailing list