# ConnectedComponentImageFilter doc

**URL:** https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368
**Category:** Beginner Questions
**Created:** [October 23, 2018, 3:09pm UTC](https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368 "2018-10-23T15:09:47Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Fijoy\_Vadakkumpadan](https://discourse.itk.org/user_avatar/discourse.itk.org/fijoy_vadakkumpadan/32/1287_2.png) [@Fijoy\_Vadakkumpadan](https://discourse.itk.org/u/Fijoy_Vadakkumpadan)
#### Post date: [October 23, 2018, 3:09pm UTC](https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368/1 "2018-10-23T15:09:47Z")

</div>

Hello,

The documentation for ConnectedComponentImageFilter:

[https://itk.org/Doxygen/html/classitk\_1\_1ConnectedComponentImageFilter.html](https://itk.org/Doxygen/html/classitk_1_1ConnectedComponentImageFilter.html)

states that “The final object labels start with 1 and are consecutive”, but I’m noticing that this true only if the output background value is set to zero (default). If the output background is set to a non-zero value (by calling the SetBackgroundValue() routine of the filter), labels start at 0. They remain consecutive, except for skipping the background value if needed.

Does the documentation need an update?

–Fijoy

---

<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: [October 23, 2018, 3:25pm UTC](https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368/2 "2018-10-23T15:25:29Z")

</div>

> [@Fijoy\_Vadakkumpadan](#):
>
> Does the documentation need an update?

It does. Do you want to update it?

---

<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: [October 23, 2018, 3:27pm UTC](https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368/3 "2018-10-23T15:27:59Z")

</div>

The code for the function which constructs consecutive labels can be found [here](https://github.com/InsightSoftwareConsortium/ITK/blob/82ab8bde7679ca21559933356f193a78a1d47848/Modules/Filtering/ImageLabel/include/itkScanlineFilterCommon.h#L202-L222).

---

<div class="post-metadata">

### Author: ![Fijoy\_Vadakkumpadan](https://discourse.itk.org/user_avatar/discourse.itk.org/fijoy_vadakkumpadan/32/1287_2.png) [@Fijoy\_Vadakkumpadan](https://discourse.itk.org/u/Fijoy_Vadakkumpadan)
#### Post date: [October 24, 2018, 2:48pm UTC](https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368/4 "2018-10-24T14:48:42Z")

</div>

Dženan, Yes, gladly. Should I create a pull request after updating the Doxygen comment block in this file?:

> <https://github.com/InsightSoftwareConsortium/ITK/blob/fb76d3eaaf060ef023336f850a55191f7822a18d/Modules/Segmentation/ConnectedComponents/include/itkConnectedComponentImageFilter.h>

–Fijoy

---

<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: [October 24, 2018, 5:54pm UTC](https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368/5 "2018-10-24T17:54:11Z")

</div>

We are in the process of switching from [gerrit](https://itk.org/Wiki/ITK/Git/Develop) to GitHub code review. While we still haven’t switched, I guess a doc-only change can be done as a GitHub pull request. @matt.mccormick

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [October 24, 2018, 10:44pm UTC](https://discourse.itk.org/t/connectedcomponentimagefilter-doc/1368/6 "2018-10-24T22:44:49Z")

</div>

Contributions are certainly welcome @Fijoy_Vadakkumpadan!

As @dzenanz noted, we have note moved to using GitHub as the main repository, and we can not merge PR’s until that happens. However, this is slated for next week, so you are welcome to stage a PR on GitHub 🐙.
