Closed dzenanz closed 3 months ago
The changes look OK.
Just an FYI, not all attributes of LabelGeometryImageFilter take into consideration image spacing and geometry. The similar LabelMap based statistics I have found to be reliable.
The above used image has unit spacing, so that is not the issue.
Intensity values were cast to integers, thus making the computation imprecise.
Images below show centroids in red and weighted centroids in green.
Before this PR:![centroidsOld](https://github.com/InsightSoftwareConsortium/ITK/assets/1792121/a29432ce-093d-47ef-ab4e-03126a89e8b0)
After this PR:![centroidsNew](https://github.com/InsightSoftwareConsortium/ITK/assets/1792121/c986ad73-1e8c-4be3-b4c6-6b303e8ad812)
PR Checklist