Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERF: GenerateData() should not set "WriteResultImage" (issue #370) #477

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

N-Dekker
Copy link
Member

@N-Dekker N-Dekker commented Jun 7, 2021

Both ElastixFilter::GenerateData() and ElastixRegistrationMethod::GenerateData() did overwrite a user preference by explicitly setting the "WriteResultImage" parameter. This behavior was added with commit a6e8f10 "ENH: Add ElastixFilter support for initial transform parameter file" by Kasper Marstal (@kaspermarstal), 3 February 2016.

Which causes a performance issue, #370 "Final image transformation takes long time", reported by @orange676.

With this commit these GenerateData() member functions longer set "WriteResultImage". When the value of this parameter is false, the elastix library will no longer generate a result image; GetOutput() will return an empty image.

Discussed at the internal elastix sprint of 7 June 2021, with Marius (@mstaring), Stefan (@stefanklein), and Viktor (@ViktorvdValk).

@N-Dekker N-Dekker force-pushed the GenerateData-no-longer-set-WriteResultImage-true branch from 828f820 to e47fc12 Compare June 7, 2021 14:11
Both `ElastixFilter::GenerateData()` and `ElastixRegistrationMethod::GenerateData()` did overwrite a user preference by explicitly setting the "WriteResultImage" parameter. This behavior was added with commit a6e8f10 "ENH: Add ElastixFilter support for initial transform parameter file" by Kasper Marstal, 3 February 2016.

Which causes a performance issue, #370 "Final image transformation takes long time", reported by orange676.

With this commit these `GenerateData()` member functions longer set  "WriteResultImage". When the value of this parameter is false, the elastix library will no longer generate a result image; `GetOutput()` will return an empty image.

Discussed at the internal elastix sprint of 7 June 2021, with Marius, Stefan, and Viktor.
@N-Dekker N-Dekker force-pushed the GenerateData-no-longer-set-WriteResultImage-true branch from e47fc12 to 2115035 Compare June 7, 2021 14:24
@N-Dekker N-Dekker changed the title PERF: GenerateData() no longer set "WriteResultImage" (issue #370) PERF: GenerateData() should not set "WriteResultImage" (issue #370) Jun 7, 2021
@N-Dekker N-Dekker marked this pull request as ready for review June 7, 2021 18:08
@N-Dekker N-Dekker merged commit 7d9b9ef into develop Jun 8, 2021
@N-Dekker N-Dekker deleted the GenerateData-no-longer-set-WriteResultImage-true branch June 8, 2021 07:57
@N-Dekker N-Dekker linked an issue Jun 8, 2021 that may be closed by this pull request
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.

Final image transformation takes long time
1 participant