Select closed volume

Dear All,

If I have a single volume (in VTK terms) formed by several closed “volumes”. How I select the points of one of those “volumes” and for example change the color of it?

Perhaps, selecting one of the points of the “volume” a find the other points by propagation.

ITK package?

Thanks,

Luís Gonçalves

Is the volume boundary represented by a surface (via vtkPolyData or vtkUnstructuredGrid)? If so, if you know one point on the volume, and the surface is connected, you can use vtkPolyDataConnectivityFilter or vtkConnectivityFilter to extract / select the surface.

The volume has intensity value 255 and the in the frontier/edge passes to 0. All structured images.

Such labelmap editing operations (split to island, assign color to each island, etc.) are available in 3D Slicer’s Segment Editor module. It uses VTK filters or ITK filters wrapped in VTK filter interface. You can use everything in 3D Slicer as is, or copy-paste the code into your project and maintain it yourself.

Within VTK, for vtkImageData, the vtkImageConnectivityFilter can be used to label enclosed regions.

1 Like

Thanks. It worked.