Using SimpleITK with Segmentations

For me it’s the other way around - I always stay away from VTK when operating on oriented images, and get them into an ITK representation first. Here’s the latest place where I had to do it, in case it can help:

You can next use use SimpleITK LabelShapeStatisticsImageFilter to get the centroid: https://itk.org/SimpleITKDoxygen100/html/classitk_1_1simple_1_1LabelShapeStatisticsImageFilter.html