New bug : Issue #17101 - vtkConnectivityFilter - SetExtractionModeToSpecifiedRegions keep points from other regions.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

New bug : Issue #17101 - vtkConnectivityFilter - SetExtractionModeToSpecifiedRegions keep points from other regions.

jbor

Hi everyone,

I added a new bug on the gitlab repo: Issue #17101

The GetNumberOfPoints is the same as before the extraction (bad), while the GetNumberOfCells has only the cell count of the specified regions (good).

 


Example code:

 

vtkSmartPointer<vtkPolyDataConnectivityFilter> connectivity = vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();

 

connectivity->SetInputData(inputpolydata->GetOutput());

 

connectivity->SetExtractionModeToAllRegions();

 

connectivity->Update();

 

 

for (int i = 0; i < connectivity->GetNumberOfExtractedRegions(); ++i)

{

  connectivity->SetExtractionModeToSpecifiedRegions();

 

  connectivity->InitializeSpecifiedRegionList();

 

  connectivity->AddSpecifiedRegion(i);

 

  connectivity->Modified();

 

  connectivity->Update();

 

  vtkSmartPointer<vtkPolyData> extractedRegion = vtkSmartPointer<vtkPolyData>::New();

 

  extractedRegion->DeepCopy(connectivity->GetOutput());

 

  cout << "points extracted region: " << extractedRegion->GetNumberOfPoints() << endl;

 

  cout << "cells extracted region: " << extractedRegion->GetNumberOfCells() << endl;

 


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Loading...