~8x slower registration with itk-elastix Python API vs elastix CLI — minimal reproducible example

Yes merging histograms or other data in a single threaded fashion can be quite slow. You might find the approach using in LabelStatisticImageFilter useful for reference.

ITK/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx at fc3590bf3bed62a9d77a1587c7b190fa25d52f82 · InsightSoftwareConsortium/ITK · GitHub It performs the merges concurrently during threading instead of after.

2 Likes