VTK is too complicate…
I want to find the connectivity region around a point, and I want to use vtkImageConnectivityFilter.
The code should be:
vtkSmartPointer<vtkImageConnectivityFilter> connectivityFilter = vtkSmartPointer<vtkImageConnectivityFilter>::New(); connectivityFilter->SetInputConnection(extractVOI->GetOutputPort()); connectivityFilter->SetExtractionModeToSeededRegions(); connectivityFilter->SetSeedData(seed);
The seed should be vtkDataSet. But I have no idea how to set this seed. For example, if I want to find the connectivity region around (50, 50), how should I create this center data?