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

WIP (Not ready): Add GradientImageFilter::OverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>) #4533

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

N-Dekker
Copy link
Contributor

Deprecated the old GradientImageFilter member function OverrideBoundaryCondition(BoundaryConditionType *) in favor of OverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>).

Aims to make it more clear that the filter takes the ownership of the specified BoundaryCondition object.

Triggered by a comment from Bradley Lowekamp (@blowekamp) at #4512 (comment)

@github-actions github-actions bot added type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Filtering Issues affecting the Filtering module labels Mar 26, 2024
@N-Dekker N-Dekker force-pushed the GradientImageFilter-OverrideBoundaryCondition branch from e6fd91e to ddf1f8d Compare March 26, 2024 09:57
@dzenanz dzenanz requested a review from blowekamp March 26, 2024 11:51
@N-Dekker N-Dekker force-pushed the GradientImageFilter-OverrideBoundaryCondition branch from ddf1f8d to 9843157 Compare April 1, 2024 20:24
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.
@N-Dekker N-Dekker force-pushed the GradientImageFilter-OverrideBoundaryCondition branch from 9843157 to 650d8ca Compare April 2, 2024 09:36
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.
@N-Dekker N-Dekker force-pushed the GradientImageFilter-OverrideBoundaryCondition branch from 650d8ca to 337e3ff Compare April 2, 2024 13:48
@N-Dekker
Copy link
Contributor Author

N-Dekker commented Apr 3, 2024

For the record, I started a discussion on how unique_ptr parameters are supported by SWIG, at:

@N-Dekker N-Dekker changed the title Add GradientImageFilter::OverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>) WIP (Not ready): Add GradientImageFilter::OverrideBoundaryCondition(std::unique_ptr<BoundaryConditionType>) Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Filtering Issues affecting the Filtering module type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant