I am writing becaue i am using this method because i want every different object (not connected) with a different value but i obtained but results and i figured out that there are separate objects labeled with the same label. Has someone the same problem?
Objects might be connected in 3D space even if they don’t look connected on any individual 2D slice
There are more objects/labels than ImageType’s PixelType can represent. If there are 300 objects and pixel type of output image is unsigned char, then objects 256 and later will be given labels 0 through 44.
Hi, can you further explain your first reason? I can not understand it. " 1. Objects might be connected in 3D space even if they don’t look connected on any individual 2D slice"
I also met this problem and I found there are two components in 3D, which are not connected in any 2D slice from their axial view, but sitk.ConnectedComponents() function said they belong to one label.
It is clearly a single object. But if you look at it in a plane in which the highlighted red circle is, there will be two circular intersections with it (the red one, and an additional one on the opposite side of the torus). If you judged just by that slice, you would mistakenly think there are 2 objects in the image.