# How to create a point in vtk?

**URL:** https://discourse.vtk.org/t/how-to-create-a-point-in-vtk/2992
**Category:** Support
**Created:** [April 9, 2020, 5:45am UTC](https://discourse.vtk.org/t/how-to-create-a-point-in-vtk/2992 "2020-04-09T05:45:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![NeuZhangQiang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/neuzhangqiang/32/2248_2.png) [@NeuZhangQiang](https://discourse.vtk.org/u/NeuZhangQiang)
#### Post date: [April 9, 2020, 5:45am UTC](https://discourse.vtk.org/t/how-to-create-a-point-in-vtk/2992/1 "2020-04-09T05:45:51Z")

</div>

VTK is too complicate…

I want to find the connectivity region around a point, and I want to use vtkImageConnectivityFilter.

The code should be:

```auto
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?

---

<div class="post-metadata">

### Author: ![cousinitt](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cousinitt/32/2398_2.png) [@cousinitt](https://discourse.vtk.org/u/cousinitt)
#### Post date: [April 9, 2020, 1:37pm UTC](https://discourse.vtk.org/t/how-to-create-a-point-in-vtk/2992/2 "2020-04-09T13:37:50Z")

</div>

I haven’t used that filter before, and I couldn’t find any examples, but I did find another [related question](http://vtk.1045678.n5.nabble.com/vtkConnectivityFilter-and-connected-components-td5720289.html). Perhaps that will help, good luck.

---

<div class="post-metadata">

### Author: ![NeuZhangQiang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/neuzhangqiang/32/2248_2.png) [@NeuZhangQiang](https://discourse.vtk.org/u/NeuZhangQiang)
#### Post date: [April 10, 2020, 2:21am UTC](https://discourse.vtk.org/t/how-to-create-a-point-in-vtk/2992/3 "2020-04-10T02:21:15Z")

</div>

I think that I have to search the connectivity region by myself…The vtkImageConnectivityFilter really make me confuzed.
