# Using VectorConfidenceConnected

**URL:** https://discourse.vtk.org/t/using-vectorconfidenceconnected/3327
**Category:** Support
**Created:** [May 18, 2020, 4:48pm UTC](https://discourse.vtk.org/t/using-vectorconfidenceconnected/3327 "2020-05-18T16:48:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [May 18, 2020, 4:48pm UTC](https://discourse.vtk.org/t/using-vectorconfidenceconnected/3327/1 "2020-05-18T16:48:28Z")

</div>

I have tried to use **sitk::VectorConfidenceConnected** with **sitk::Image** retrieved from a _dicom images_:

```
		sitk::Image imgTemp(img);
....
....
		img = sitk::VectorConfidenceConnected(sitk::Cast(imgTemp, sitk::PixelIDValueEnum::sitkComplexFloat32), 
			seed, 3, 3, 1, 255);

```

But after I used all kind of **sitk::PixelIDValueEnum** , I got the following error:

`sitk::ERROR: Pixel type: complex of 32-bit float is not supported in 3D byclass itk::simple::VectorConfidenceConnectedImageFilter`

My question is, there any way to use this filter on DICOM images ?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [May 18, 2020, 5:07pm UTC](https://discourse.vtk.org/t/using-vectorconfidenceconnected/3327/2 "2020-05-18T17:07:38Z")

</div>

This is a question for ITK/SimpleITK forum, but to quickly answer here: you need to cast the image to a supported pixel type before passing it to SimpleITK.

---

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [May 19, 2020, 5:24pm UTC](https://discourse.vtk.org/t/using-vectorconfidenceconnected/3327/3 "2020-05-19T17:24:49Z")

</div>

Because of my tired, I’ve tangled the forums 🙂 Sorry.
