Skip to content

Commit

Permalink
STYLE: Initialize unitSize RandomCoordinateSamplers by Size::Filled(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Dekker committed Oct 27, 2023
1 parent 26f8484 commit 2d5b380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Common/ImageSamplers/itkImageRandomCoordinateSampler.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ ImageRandomCoordinateSampler<TInputImage>::GenerateData()
const auto croppedInputImageRegion = this->GetCroppedInputImageRegion();

/** Convert inputImageRegion to bounding box in physical space. */
InputImageSizeType unitSize;
unitSize.Fill(1);
const auto unitSize = InputImageSizeType::Filled(1);
InputImageIndexType smallestIndex = croppedInputImageRegion.GetIndex();
InputImageIndexType largestIndex = smallestIndex + croppedInputImageRegion.GetSize() - unitSize;
InputImageContinuousIndexType smallestImageContIndex(smallestIndex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ MultiInputImageRandomCoordinateSampler<TInputImage>::GenerateSampleRegion(
* but possibly different origin/spacing.
* \todo: test this really carefully!
*/
InputImageSizeType unitSize;
unitSize.Fill(1);
const auto unitSize = InputImageSizeType::Filled(1);
for (unsigned int i = 0; i < numberOfRegions; ++i)
{
/** Get the outer indices. */
Expand Down

0 comments on commit 2d5b380

Please sign in to comment.