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.4k stars 662 forks source link

STYLE: Replace `Allocate(); FillBuffer(0)` with `AllocateInitialized()` #4494

Closed N-Dekker closed 5 months ago

N-Dekker commented 5 months ago

Replaced lines of code of the form

image>Allocate();
image>FillBuffer(zero);

With image->AllocateInitialized();.

Cases found by the regular expression ^(.+->)Allocate.+;\r\n\1FillBuffer.

Follow-up to pull request https://github.com/InsightSoftwareConsortium/ITK/pull/4479 commit 47fe345cd81c8126e1a50d43c751cc67d6ebfc47 "ENH: Add AllocateInitialized() to ImageBase"