First of all, you need to upgrade to a recent VTK version. It is unreasonable to expect help with using a decade old version.
You can find vtkImageConnectivityFilter documentation here. All VTK filters have tests, which you can use as examples. See the relevant test here. You can find a Python example in 3D Slicer’s “Flood filling” Segment Editor effect. If you have any specific questions you can ask it here.
There is no example for this filter on VTK examples website. It would be great if you could write one (based on what you have learnt and you think could be useful for others who are new to VTK) and contribute it as described here.
Before you implement anything, I would suggest to first create your segmentation workflow in a VTK-based interactive segmentation tool, such as 3D Slicer. Once you know exactly what steps you need to get good-quality segmentation, you can start automating the process.