Skip to content

Conversation

@N-Dekker
Copy link
Contributor

@github-actions github-actions bot added area:Examples Demonstration of the use of classes 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 area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module area:Numerics Issues affecting the Numerics module labels Nov 21, 2024
@N-Dekker N-Dekker force-pushed the Remove-Initialize-after-New-in-tests-and-example branch from f36f144 to d6a113b Compare November 21, 2024 16:45
For most ITK types, `p->Initialize()` has no effect, directly after
`p = T::New()`, so the `Initialize()` call might as well be removed.

Excluded a `randomNumberGenerator->Initialize()` call from this commit, as that
call appears to actually have an effect (randomizing the seed).

- Follow-up to pull request InsightSoftwareConsortium#4972
commit 674b3d2
"STYLE: Remove `p->Initialize()` calls directly after `p = T::New()`"
- Follow-up to pull request InsightSoftwareConsortium#4972
commit 674b3d2
"STYLE: Remove `p->Initialize()` calls directly after `p = T::New()`"
@N-Dekker N-Dekker force-pushed the Remove-Initialize-after-New-in-tests-and-example branch from d6a113b to 04cde48 Compare November 21, 2024 20:06
@N-Dekker N-Dekker marked this pull request as ready for review November 21, 2024 20:31
@hjmjohnson hjmjohnson merged commit bc044c1 into InsightSoftwareConsortium:master Nov 22, 2024
17 checks passed
N-Dekker added a commit to N-Dekker/ITKSphinxExamples that referenced this pull request Nov 27, 2024
When a point set is just created by `New()`, it is already properly initialized.

- Follow-up to pull request InsightSoftwareConsortium/ITK#4976
commit InsightSoftwareConsortium/ITK@bc044c1
"STYLE: Remove p->Initialize() call after p = T::New() in example"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Examples Demonstration of the use of classes area:Filtering Issues affecting the Filtering module area:Numerics Issues affecting the Numerics module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation 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.

3 participants