[vtkusers] save different regions from vtkPolyDataConnectivityFilter to polydata
azmagillian87
xrysafenia.malliastolidou at gmail.com
Mon Jan 27 10:11:31 EST 2014
Hi vtk_users!
i am trying to save the different regions i find using
vtkPolyDataConnectivityFilter to different polydata
i thought it would be simple but i can't get it to work although i can
visualize each region or all o f them
i use the below code after i find all regions
connectivityFilter->SetExtractionModeToSpecifiedRegions();
connectivityFilter->Modified();
connectivityFilter->Update();
cout << "\n" << connectivityFilter->GetExtractionModeAsString() << "\n";
vtkSmartPointer<vtkPolyData> output=
vtkSmartPointer<vtkPolyData> ::New();
for(int i=0;i<numRegions;i++){
connectivityFilter->InitializeSpecifiedRegionList();
connectivityFilter->AddSpecifiedRegion(i);
connectivityFilter->Modified();
connectivityFilter->Update();
//copy the output
output->DeepCopy(connectivityFilter->GetOutput());
int num=output->GetNumberOfPoints();
cout<<num;
}
output should save different region every iteration but instead it carries
the input ,i check that by printing num
any idea?
thanks in advance!
--
View this message in context: http://vtk.1045678.n5.nabble.com/save-different-regions-from-vtkPolyDataConnectivityFilter-to-polydata-tp5725641.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list