`Apply Morphological Closing on Specific Label Object` Example, Label value? radius value?

what values for label and radius should be used?
I am working on Labeling objects for segmentation of 2D/3D and i came accros Labeling concept. I know usually Label would be in range of 0-255 so i figured it is about the pixel intensity, in the ITK example above and other ITK Examples i cannot decide for different spatialobjects what label value to choose to select them, based on tissue, bone, or others. Did i get it wrong? what is the meaning of rasius in the algorithm, what values are good for unsigned char suitable to use is it 0-255 range? the effects is some light gray patches in sides in middle of black segments as Label value changes, also the sothest lobe of brain color changes from dark gray to light gray, as lable value changes from 100 to zero? no idea why? can anybody explain how labeling happens? is a binary segmented image can be used as label and then i can put some coloring on it in defferent segments, and make a nice colored slince of a Black/White image of a brain slice? I really appreciate your help, by the way i could not find anything in ITK documents about labeling, label map, mask lable map, i look into Lable map examples but could not still figure out how labels work in segmentation, coloring, in 3D/2D obects ?



OutputImage1.png [<Label:100, radius: 10]


OutputImage2.png [<Label: 0, radius: 10]


OutputImage3.png [Label: 255, radius: 10]



Hello @sag,

Labels are just integer values marking that a specific voxel/pixel belongs to a certain class. What that class means is context specific. For example, the whole brain could be one class or it could be multiple classes e.g. gray matter, white matter, csf.

The classes are often in [0,255] but they can be in any integer range. The values have no real meaning. That is, the same three classes can be labeled using (42, 43, 44) or (10,100, 1000) etc… The higher level part of a program has the information that maps between a label to a meaningful class: 42 is air, 43 is lung and 44 is body.

Hope this clarifies the notion of a label.

1 Like