[vtkusers] Regions of connected cells
azmagillian87
xrysafenia.malliastolidou at gmail.com
Tue Nov 26 09:03:26 EST 2013
Thanks again for replying !
my obj file looks like three disconnected parts with many cells each it's
not complicate
and i use the below code just like the example with the difference i have
one source, the obj file
vtkSmartPointer<vtkAppendPolyData> appendFilter =
vtkSmartPointer<vtkAppendPolyData>::New();
appendFilter->AddInputConnection(reader->GetOutputPort());
appendFilter->Update();
vtkSmartPointer<vtkPolyDataConnectivityFilter> connectivityFilter =
vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();
connectivityFilter->SetInputConnection(appendFilter->GetOutputPort());
connectivityFilter->SetExtractionModeToAllRegions();
connectivityFilter->ColorRegionsOn();
connectivityFilter->SetColorRegions(1);
connectivityFilter->Update();
vtkSmartPointer<vtkPolyDataMapper> extractedMapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
extractedMapper->SetInputConnection(connectivityFilter->GetOutputPort());
mapper->SetScalarRange(connectivityFilter->GetOutput()->GetPointData()->GetArray("RegionId")->GetRange());
extractedMapper->Update()
--
View this message in context: http://vtk.1045678.n5.nabble.com/Regions-of-connected-cells-tp5724635p5724646.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list