WIP (Not ready): Add GradientImageFilter::OverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>)#4533
Draft
N-Dekker wants to merge 5 commits intoInsightSoftwareConsortium:mainfrom
Conversation
e6fd91e to
ddf1f8d
Compare
ddf1f8d to
9843157
Compare
Follow-up to pull request InsightSoftwareConsortium#4532 commit b4f0bb8 STYLE: Replace "the the" with "the" in comments
Added a helper typedef, for `GradientImageFilter::OverrideBoundaryCondition` and its implementation.
Added `GradientImageFilter::OverrideBoundaryCondition` overload, to allows specifying the argument by a `unique_ptr`. Aims to make it more clear that the filter takes the ownership of the specified `BoundaryCondition` object. Triggered by a comment from Bradley Lowekamp at InsightSoftwareConsortium#4512 (comment) on March 13, 2024.
9843157 to
650d8ca
Compare
Aims to avoid errors from ITK.Linux.Python and ITK.macOS.Python like those from https://open.cdash.org/viewBuildError.php?buildid=9511958: > Wrapping/Modules/ITKImageGradient/itkGradientImageFilterPython.cpp:3856:70: > error: call to implicitly-deleted copy constructor of > `std::unique_ptr<itk::ImageBoundaryCondition<itk::Image<float, 2>>>` Using ITK's current SWIG revision, 2024-03-26-master.
Deprecated (`ITK_FUTURE_LEGACY_REMOVE`) the overload of `GradientImageFilter::OverrideBoundaryCondition` that has a raw pointer as parameter, in favor of the overload that has a `unique_ptr` as parameter.
650d8ca to
337e3ff
Compare
Contributor
Author
|
For the record, I started a discussion on how unique_ptr parameters are supported by SWIG, at: |
GradientImageFilter::OverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>)GradientImageFilter::OverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deprecated the old
GradientImageFiltermember functionOverrideBoundaryCondition(BoundaryConditionType *)in favor ofOverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>).Aims to make it more clear that the filter takes the ownership of the specified
BoundaryConditionobject.Triggered by a comment from Bradley Lowekamp (@blowekamp) at #4512 (comment)