Now, how can I take from those labels the bones only (is CBCT), and use it to remove it from the final sitk::Image ? What are the next filter that should I use these labels to remove bones from the volume ?
Thank you for your time and patience.
Flaviu.
P.S. If I use sitk::ConnectedComponent instead of sitk::SLIC I got only two labels (from a complete CBCT):
From my researches I understand that sitk::ChangeLabelImageFilter should be used after sitk::LabelIntensityStatisticsImageFilter. But I didn’t found any example: Search - v5.4.0
Can you tell me how to use this filter ? Or at least if I am the right way …
The LabelMapToBinaryImageFilter operates of Images which have a sitkLabel pixels type, not regular integers. You can use NotEqual(change, 0) to do a similar operation on scalar images.
Kindly thank you Bradley, I get rid of that error. But I have to continue to dig in, because after all code from above, even corrected, I got only a diffuse cube, with only small part of opaque brown piece. By now, I only shoot in the dark …
I have tried sitk::LabelIntensityStatisticsImageFilter instead of sitk::LabelShapeStatisticsImageFilter, with pretty same result. And I guess I got the same result because I still don’t get it what should I put in changeMap from sitk::ChangeLabel As key, and as value.
And as value, *statistics.GetRoundness(it), or *statistics.GetPhysicalSize(it) or *statistics.GetMean(it) ? Or what ? I haven’t found any documentation regarding this …
I think once I’ll understand this, my chance to solve my task will increase … I’ll be very grateful for any clarification here.
Ok, I’ll read it all, even I have read another documentation about this … seem that I haven’t paid enough attention as long I cannot solve my issue.