# Detect and extract disjoint portions of the dataset

**URL:** https://discourse.vtk.org/t/detect-and-extract-disjoint-portions-of-the-dataset/959
**Category:** Support
**Created:** [May 14, 2019, 4:37pm UTC](https://discourse.vtk.org/t/detect-and-extract-disjoint-portions-of-the-dataset/959 "2019-05-14T16:37:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![amit112amit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amit112amit/32/2094_2.png) [@amit112amit](https://discourse.vtk.org/u/amit112amit)
#### Post date: [May 14, 2019, 4:37pm UTC](https://discourse.vtk.org/t/detect-and-extract-disjoint-portions-of-the-dataset/959/1 "2019-05-14T16:37:58Z")

</div>

Hi.  
I have a 3D surface mesh (unstructured grid) with periodic boundary conditions as shown below:

 ![Full](https://discourse.vtk.org/uploads/default/original/1X/cae415713e990834da2ab8cf17508fca0b4dbdc9.png)  
I clipped it using the scalar values and got four separated domains:  
 ![Clipped](https://discourse.vtk.org/uploads/default/original/1X/07e820fb55f6facecefc869955a81b2280901016.png)  
In this pictures there are four domains in 4 corners but sometimes there may be only 2 and it may not be at the corners. Is there a general way to extract disjoint domains from a dataset?

My goal is to translate 3 of the 4 domains and combine them into a single domain across the periodic boundary.

Regards,  
Amit

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [May 14, 2019, 8:20pm UTC](https://discourse.vtk.org/t/detect-and-extract-disjoint-portions-of-the-dataset/959/2 "2019-05-14T20:20:06Z")

</div>

Look at vtkPolyDataConnectivity. See: [https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColorDisconnectedRegionsDemo/](https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColorDisconnectedRegionsDemo/)

You can extract specified regions. See: [https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataConnectivityFilter\_SpecifiedRegion/](https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/PolyDataConnectivityFilter_SpecifiedRegion/)

Bill
