# Filter for deleting isolated voxels

**URL:** https://discourse.vtk.org/t/filter-for-deleting-isolated-voxels/7328
**Category:** Support
**Created:** [December 3, 2021, 2:09pm UTC](https://discourse.vtk.org/t/filter-for-deleting-isolated-voxels/7328 "2021-12-03T14:09:29Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Christos\_Tsolakis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/christos_tsolakis/32/2076_2.png) [@Christos\_Tsolakis](https://discourse.vtk.org/u/Christos_Tsolakis)
#### Post date: [December 3, 2021, 10:12pm UTC](https://discourse.vtk.org/t/filter-for-deleting-isolated-voxels/7328/2 "2021-12-03T22:12:18Z")

</div>

A connectivity filter ( like [vtkImageConnectivityFilter](https://vtk.org/doc/nightly/html/classvtkImageConnectivityFilter.html#details)) is close to what you describe. It will assign distinct labels to connected regions of the image. You can then pick the ones you want. Make sure to also check `vtkImageConnectivityFilter::SetExtractionModeToLargestRegion()` as well as [earlier posts](https://discourse.vtk.org/t/how-to-use-vtkimageconnectivityfilter/3142) on discourse . I haven’t checked with vtk.js but I expect this filters to be available.

---

_[View the full topic](https://discourse.vtk.org/t/filter-for-deleting-isolated-voxels/7328)._
