InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.43k stars 668 forks source link

STYLE: Remove `p->Initialize()` calls directly after `p = T::New()` #4972

Closed N-Dekker closed 5 days ago

N-Dekker commented 5 days ago

For any ITK type T, T::New() does already initialize the object it returns.

Using Notepad++, Replace in Files, doing:

Find what:  (\w+)([ ]+= .+::New\(\);)\r\n[\r\n]* [ ]+\1->Initialize\(\);
Replace with:  $1$2
Filters: itk*.* !+\test
Directory: D:\src\ITK\Modules
[v] Match case
(*) Regular expression

Manually removed an obsolete comment saying Clear elements.