Skip to content

Commit 9d1c4e4

Browse files
committed
STYLE: Replace Index var; var.Fill with auto var = Index::Filled
- Following ITK pull request InsightSoftwareConsortium/ITK#4906 commit InsightSoftwareConsortium/ITK@3ff56ea
1 parent c4bdd39 commit 9d1c4e4

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Common/Transforms/itkTransformToDeterminantOfSpatialJacobianSource.hxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ TransformToDeterminantOfSpatialJacobianSource<TOutputImage, TTransformPrecisionT
269269

270270
// For linear transformation the spatial derivative is a constant,
271271
// i.e. it is independent of the spatial position.
272-
IndexType index;
273-
index.Fill(1);
272+
auto index = IndexType::Filled(1);
274273
PointType point;
275274
outputPtr->TransformIndexToPhysicalPoint(index, point);
276275
SpatialJacobianType sj;

Common/Transforms/itkTransformToSpatialJacobianSource.hxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ TransformToSpatialJacobianSource<TOutputImage, TTransformPrecisionType>::LinearG
263263

264264
// For linear transformation the spatial derivative is a constant,
265265
// i.e. it is independent of the spatial position.
266-
IndexType index;
267-
index.Fill(1);
266+
auto index = IndexType::Filled(1);
268267
PointType point;
269268
outputPtr->TransformIndexToPhysicalPoint(index, point);
270269

Testing/itkBSplineInterpolationWeightFunctionTest.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ main()
236236

237237
/** Just call all available public functions. */
238238
WeightFunction2Type2D::IndexType startIndex;
239-
WeightFunction2Type2D::IndexType trueStartIndex;
240-
trueStartIndex.Fill(-1);
239+
auto trueStartIndex = WeightFunction2Type2D::IndexType::Filled(-1);
241240
weight2Function2D->ComputeStartIndex(cindex, startIndex);
242241
if (startIndex != trueStartIndex)
243242
{

0 commit comments

Comments
 (0)