[vtkusers] Delete object from vtkPolyDataConnectivityFilter(C++)
hao chen
harry1994128 at gmail.com
Mon Jul 16 02:49:33 EDT 2018
Hi, kenichiro yoshimi
Thank you for your reply.
But I don't know the specific method.
Do you mean like this:
vtkSmartPointer<vtkDICOMImageReader> DicomImageReader =
vtkSmartPointer<vtkDICOMImageReader>::New();
DicomImageReader->SetDirectoryName("E:\\offline_3Ddata\\2017042402");
DicomImageReader->Update();
vtkSmartPointer<vtkContourFilter> filter =
vtkSmartPointer<vtkContourFilter>::New();
filter->SetInputConnection(DicomImageReader->GetOutputPort());
filter->SetValue(0, 9000);
filter->Update();
vtkSmartPointer<vtkTriangleFilter> triangleFilter =
vtkSmartPointer<vtkTriangleFilter>::New();
triangleFilter->SetInputConnection(filter->GetOutputPort());
triangleFilter->Update();
* vtkSmartPointer<vtkIdFilter> idFilter =
vtkSmartPointer<vtkIdFilter>::New();
idFilter->SetInputConnection(sphereSource->GetOutputPort());
idFilter->SetIdsArrayName("ids");
idFilter->Update();*
vtkSmartPointer<vtkPolyDataConnectivityFilter> connectivityFilter =
vtkSmartPointer<vtkPolyDataConnectivityFilter>::New();
connectivityFilter->SetInput(*idFilter*->GetOutput());
connectivityFilter->SetExtractionModeToCellSeededRegions();
connectivityFilter->AddSeed(1000);
connectivityFilter->Update();
----------------------------------------------------------------------------------------------------------------------
By the way, I didn't realize that I don't know how to get the CellID from
vtkPolyDataConnectivityFilter.
I use 'GetCellNeighbors' to get CellId, but if I use in circled object(too
large), it will work very slowly.
So I found vtkPolyDataConnectivityFilter method, want to find out the CellId
directly.
Can you show me the specific method?
Sorry my poor english.
Thank you~
Hao
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list