# Watershed Output ...

**URL:** https://discourse.itk.org/t/watershed-output/3866
**Category:** Beginner Questions
**Created:** [February 15, 2021, 4:31pm UTC](https://discourse.itk.org/t/watershed-output/3866 "2021-02-15T16:31:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Niklas](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@Niklas](https://discourse.itk.org/u/Niklas)
#### Post date: [February 15, 2021, 4:31pm UTC](https://discourse.itk.org/t/watershed-output/3866/1 "2021-02-15T16:31:37Z")

</div>

I just started with ITK, sorry if question is silly. I’d like to apply the watershed transformation to a 3D float array (with euclidean distance transform). I do have the EDT and input this into the WatershedImageFilter. The other post [here](https://discourse.itk.org/t/watershed-control/1287) was very helpful to get me started, but so far the watershed does not work. The error is “There are no registered IO factories.”, and I guess the way I setup the input to the WatershedImageFilter is not correct. I tried both using the VTKImageToImageFilter, as well as using an ImportImageFilter, and also played quite a bit with level and threshold.  
I do want to use the 3D watershed within a VTK/C++ program, and in the end would love to have as output an integer array with the segmentation. Any help to get me going is greatly appreciated.  
Thanks and Cheers,  
Niklas

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [February 15, 2021, 5:27pm UTC](https://discourse.itk.org/t/watershed-output/3866/2 "2021-02-15T17:27:11Z")

</div>

That is a problem related to the build system. Are you using CMake for your project/example? If no, take a look at [Using\_ITK\_Without\_CMake](https://itk.org/Wiki/ITK/Using_ITK_Without_CMake) and [RegisterIOFactories](https://itk.org/ITKExamples/src/IO/ImageBase/RegisterIOFactories/Documentation.html).

---

<div class="post-metadata">

### Author: ![Niklas](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@Niklas](https://discourse.itk.org/u/Niklas)
#### Post date: [February 15, 2021, 6:53pm UTC](https://discourse.itk.org/t/watershed-output/3866/3 "2021-02-15T18:53:29Z")

</div>

Thanks, that was a pointer in the right direction. I used cmake already, but forgot to include: include(${ITK\_USE\_FILE})  
Thanks, Niklas
