Skip to content

PERF: Use ImageBufferRange in AfterThreadedComputePDFs#1440

Merged
N-Dekker merged 1 commit into
mainfrom
Perf-ParzenWindowHistogramImageToImageMetric-AfterThreadedComputePDFs
May 5, 2026
Merged

PERF: Use ImageBufferRange in AfterThreadedComputePDFs#1440
N-Dekker merged 1 commit into
mainfrom
Perf-ParzenWindowHistogramImageToImageMetric-AfterThreadedComputePDFs

Conversation

@N-Dekker
Copy link
Copy Markdown
Member

@N-Dekker N-Dekker commented May 5, 2026

Made ParzenWindowHistogramImageToImageMetric::AfterThreadedComputePDFs much faster.

The registration test case of the benchmark by Nicolas Chiaruttini (https://discourse.itk.org/t/8x-slower-registration-with-itk-elastix-python-api-vs-elastix-cli-minimal-reproducible-example/7736) appears to run more than 30 % faster with the CLI (elastix executable), from ~3 seconds to ~2 seconds on Window 11, at "my" LKEB/LUMC pc (AMD Threadripper, 32-Cores, 4 GHz, 64 logical processors), when using the default number of work units for the metric (ITK_MAX_THREADS, which is 128 for the executable), so without specifying "-threads".

Made `ParzenWindowHistogramImageToImageMetric::AfterThreadedComputePDFs` much
faster.

The registration test case of the benchmark by Nicolas Chiaruttini (https://discourse.itk.org/t/8x-slower-registration-with-itk-elastix-python-api-vs-elastix-cli-minimal-reproducible-example/7736) appears to run more than 30 % faster with the CLI (elastix executable), from ~3 seconds to ~2 seconds on Window 11, at "my" LUMC pc (AMD Threadripper, 32-Cores, 4 GHz, 64 logical processors), when using the default number of work units for the metric (`ITK_MAX_THREADS`, which is 128 for the executable), so without specifying "-threads".
Copy link
Copy Markdown
Contributor

@thewtex thewtex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🔥

@N-Dekker N-Dekker merged commit bdb63bb into main May 5, 2026
7 of 8 checks passed
@N-Dekker N-Dekker deleted the Perf-ParzenWindowHistogramImageToImageMetric-AfterThreadedComputePDFs branch May 5, 2026 15:23
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request May 15, 2026
Included elastix pull requests:

SuperElastix/elastix#1444
"Improve performance of Advanced, ParzenWindowHistogram,
ParzenWindowMutualInformation ImageToImageMetric"

SuperElastix/elastix#1440
"PERF: Use ImageBufferRange in AfterThreadedComputePDFs"

SuperElastix/elastix#1431
"ENH: Print a warning for each unused parameter of the ParameterMap"

All included new commits:

SuperElastix/elastix@5.3.1...77c726a
N-Dekker added a commit to N-Dekker/ITKElastix that referenced this pull request May 15, 2026
Included elastix pull requests:

SuperElastix/elastix#1444
"Improve performance of Advanced, ParzenWindowHistogram,
ParzenWindowMutualInformation ImageToImageMetric"

SuperElastix/elastix#1440
"PERF: Use ImageBufferRange in AfterThreadedComputePDFs"

SuperElastix/elastix#1431
"ENH: Print a warning for each unused parameter of the ParameterMap"

All included new commits:

SuperElastix/elastix@5.3.1...77c726a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants