From df86405731405f94b4305446735ecdf1139766af Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Fri, 1 Oct 2021 21:59:23 +0200 Subject: [PATCH 1/2] COMP: Workaround VS2017 error C2653/C2886 using-declaration compiler bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Partially reverted pull request https://github.com/InsightSoftwareConsortium/ITK/pull/2567 commit 4f309803b9b3c0268679d658e22d2f751f9c7b6c "STYLE: Avoid repeating parent aliases" because of Visual Studio 2017 compile errors reported by Dženan Zukić at https://github.com/InsightSoftwareConsortium/ITK/pull/2759 "COMP: making it compile on VS2017" Worked around the following VS2017 compile errors: > error C2653: '...': is not a class or namespace name > error C2886: '...': symbol cannot be used in a member using-declaration The compiler bug that caused these errors is reported here: "Compile error when using "using declaration" referencing a base class type that refers to itself" EssentiaX - Reported March 12, 2019 [Fixed in version 16.2] https://developercommunity.visualstudio.com/t/486683 --- Modules/Core/Common/include/itkCellInterface.h | 2 +- Modules/Core/Common/include/itkContinuousIndex.h | 2 +- Modules/Core/Common/include/itkOptimizerParameters.h | 2 +- Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h | 4 ++-- Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.h | 1 - .../Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.h | 4 ++-- Modules/Core/Transform/include/itkAffineTransform.h | 2 +- Modules/Core/Transform/include/itkCenteredAffineTransform.h | 2 +- .../Core/Transform/include/itkCenteredEuler3DTransform.h | 2 +- .../Core/Transform/include/itkCenteredRigid2DTransform.h | 2 +- .../Transform/include/itkCenteredSimilarity2DTransform.h | 2 +- Modules/Core/Transform/include/itkCompositeTransform.h | 2 +- Modules/Core/Transform/include/itkEuler2DTransform.h | 2 +- Modules/Core/Transform/include/itkIdentityTransform.h | 2 +- .../Core/Transform/include/itkMatrixOffsetTransformBase.h | 2 +- Modules/Core/Transform/include/itkRigid2DTransform.h | 2 +- Modules/Core/Transform/include/itkRigid3DTransform.h | 2 +- Modules/Core/Transform/include/itkScalableAffineTransform.h | 2 +- Modules/Core/Transform/include/itkScaleTransform.h | 2 +- Modules/Core/Transform/include/itkSimilarity2DTransform.h | 2 +- Modules/Core/Transform/include/itkTranslationTransform.h | 2 +- Modules/Core/Transform/include/itkv3Rigid3DTransform.h | 2 +- Modules/Core/Transform/test/itkMultiTransformTest.cxx | 2 +- Modules/Core/Transform/test/itkRigid3DTransformTest.cxx | 2 +- .../Filtering/LabelMap/include/itkAttributeLabelObject.h | 2 +- .../LabelMap/include/itkAttributeOpeningLabelMapFilter.h | 2 +- .../LabelMap/include/itkLabelMapToLabelImageFilter.h | 2 +- Modules/Filtering/LabelMap/include/itkShapeLabelObject.h | 2 +- .../Filtering/LabelMap/include/itkStatisticsLabelObject.h | 2 +- .../include/itkGaussianRandomSpatialNeighborSubsampler.h | 2 +- .../Statistics/include/itkRegionConstrainedSubsampler.h | 2 +- .../Statistics/include/itkSpatialNeighborSubsampler.h | 2 +- .../include/itkUniformRandomSpatialNeighborSubsampler.h | 2 +- .../itkANTSNeighborhoodCorrelationImageToImageMetricv4.h | 2 +- ...ationImageToImageMetricv4GetValueAndDerivativeThreader.h | 2 +- .../Metricsv4/include/itkCorrelationImageToImageMetricv4.h | 2 +- ...ationImageToImageMetricv4GetValueAndDerivativeThreader.h | 2 +- .../itkCorrelationImageToImageMetricv4HelperThreader.h | 2 +- .../Metricsv4/include/itkDemonsImageToImageMetricv4.h | 2 +- ...emonsImageToImageMetricv4GetValueAndDerivativeThreader.h | 2 +- .../Metricsv4/include/itkImageToImageMetricv4.h | 4 ++-- .../itkImageToImageMetricv4GetValueAndDerivativeThreader.h | 6 +++--- ...JointHistogramMutualInformationComputeJointPDFThreader.h | 4 ++-- ...itkJointHistogramMutualInformationImageToImageMetricv4.h | 2 +- .../itkMattesMutualInformationImageToImageMetricv4.h | 2 +- ...ationImageToImageMetricv4GetValueAndDerivativeThreader.h | 2 +- .../Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h | 2 +- ...uaresImageToImageMetricv4GetValueAndDerivativeThreader.h | 2 +- .../Metricsv4/include/itkObjectToObjectMultiMetricv4.h | 2 +- .../include/itkPointSetToPointSetMetricWithIndexv4.h | 4 ++-- .../Metricsv4/include/itkPointSetToPointSetMetricv4.h | 2 +- .../include/itkBSplineSyNImageRegistrationMethod.h | 2 +- .../include/itkSyNImageRegistrationMethod.h | 2 +- ...TimeVaryingBSplineVelocityFieldImageRegistrationMethod.h | 2 +- 54 files changed, 60 insertions(+), 61 deletions(-) diff --git a/Modules/Core/Common/include/itkCellInterface.h b/Modules/Core/Common/include/itkCellInterface.h index 7054e9c1f06..ce54ca99cc6 100644 --- a/Modules/Core/Common/include/itkCellInterface.h +++ b/Modules/Core/Common/include/itkCellInterface.h @@ -55,7 +55,7 @@ #define itkCellInheritedTypedefs(superclassArg) \ using Superclass = superclassArg; \ using typename Superclass::PixelType; \ - using typename Superclass::CellType; \ + using CellType = typename Superclass::CellType; \ using typename Superclass::CellAutoPointer; \ using typename Superclass::CellConstAutoPointer; \ using typename Superclass::CellRawPointer; \ diff --git a/Modules/Core/Common/include/itkContinuousIndex.h b/Modules/Core/Common/include/itkContinuousIndex.h index 64c2d56c5b2..090bf7aca52 100644 --- a/Modules/Core/Common/include/itkContinuousIndex.h +++ b/Modules/Core/Common/include/itkContinuousIndex.h @@ -65,7 +65,7 @@ class ITK_TEMPLATE_EXPORT ContinuousIndex : public Point; /** The Array type from which this Vector is derived. */ - using typename Superclass::BaseArray; + using BaseArray = typename Superclass::BaseArray; using Iterator = typename BaseArray::Iterator; using ConstIterator = typename BaseArray::ConstIterator; diff --git a/Modules/Core/Common/include/itkOptimizerParameters.h b/Modules/Core/Common/include/itkOptimizerParameters.h index d580e487d03..53fcb9c3bc8 100644 --- a/Modules/Core/Common/include/itkOptimizerParameters.h +++ b/Modules/Core/Common/include/itkOptimizerParameters.h @@ -41,7 +41,7 @@ class ITK_TEMPLATE_EXPORT OptimizerParameters : public Array; using ArrayType = Superclass; - using typename Superclass::VnlVectorType; + using VnlVectorType = typename Superclass::VnlVectorType; using typename Superclass::SizeValueType; /** Helper class for managing different types of parameter diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h index 63d9851ad9f..3a28274ce69 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.h @@ -54,12 +54,12 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshLineCell // itkCellInheritedTypedefs using Superclass = TCellInterface; using typename Superclass::PixelType; - using typename Superclass::CellType; + using CellType = typename Superclass::CellType; using typename Superclass::CellAutoPointer; using typename Superclass::CellConstAutoPointer; using typename Superclass::CellRawPointer; using typename Superclass::CellConstRawPointer; - using typename Superclass::CellTraits; + using CellTraits = typename Superclass::CellTraits; using typename Superclass::CoordRepType; using typename Superclass::InterpolationWeightType; using typename Superclass::PointIdentifier; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.h index a1c4b3b5f21..a43d5698aea 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPoint.h @@ -47,7 +47,6 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshPoint : public Point /** Base inverse transform type. This type should not be changed to the * concrete inverse transform type or inheritance would be lost. */ - using typename Superclass::InverseTransformBaseType; + using InverseTransformBaseType = typename Superclass::InverseTransformBaseType; using InverseTransformBasePointer = typename InverseTransformBaseType::Pointer; InverseTransformBasePointer diff --git a/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h b/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h index 77b700f1de8..7269b4da04d 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeLabelObject.h @@ -79,7 +79,7 @@ class ITK_TEMPLATE_EXPORT AttributeLabelObject : public LabelObject; using Pointer = SmartPointer; - using typename Superclass::LabelObjectType; + using LabelObjectType = typename Superclass::LabelObjectType; using ConstPointer = SmartPointer; using ConstWeakPointer = WeakPointer; diff --git a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h index 5801dc5b6b4..ddffa652cd6 100644 --- a/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h +++ b/Modules/Filtering/LabelMap/include/itkAttributeOpeningLabelMapFilter.h @@ -61,7 +61,7 @@ class ITK_TEMPLATE_EXPORT AttributeOpeningLabelMapFilter : public InPlaceLabelMa using PixelType = typename ImageType::PixelType; using IndexType = typename ImageType::IndexType; - using typename Superclass::LabelObjectType; + using LabelObjectType = typename Superclass::LabelObjectType; using AttributeAccessorType = TAttributeAccessor; using AttributeValueType = typename AttributeAccessorType::AttributeValueType; diff --git a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h index db1029ea546..4978cb7050a 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h +++ b/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h @@ -60,7 +60,7 @@ class ITK_TEMPLATE_EXPORT LabelMapToLabelImageFilter : public LabelMapFilter; - using typename Superclass::LabelObjectType; + using LabelObjectType = typename Superclass::LabelObjectType; using Pointer = SmartPointer; using ConstPointer = SmartPointer; using ConstWeakPointer = WeakPointer; diff --git a/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h b/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h index a274688bd27..e9ebeb497f0 100644 --- a/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h +++ b/Modules/Filtering/LabelMap/include/itkStatisticsLabelObject.h @@ -46,7 +46,7 @@ class ITK_TEMPLATE_EXPORT StatisticsLabelObject : public ShapeLabelObject; - using typename Superclass::LabelObjectType; + using LabelObjectType = typename Superclass::LabelObjectType; using Pointer = SmartPointer; using ConstPointer = SmartPointer; using ConstWeakPointer = WeakPointer; diff --git a/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h index af7ee035cd1..d8ac202dea0 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkGaussianRandomSpatialNeighborSubsampler.h @@ -54,7 +54,7 @@ class ITK_TEMPLATE_EXPORT GaussianRandomSpatialNeighborSubsampler /** Standard class type aliases */ using Self = GaussianRandomSpatialNeighborSubsampler; using Superclass = UniformRandomSpatialNeighborSubsampler; - using typename Superclass::Baseclass; + using Baseclass = typename Superclass::Baseclass; using Pointer = SmartPointer; using ConstPointer = SmartPointer; diff --git a/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h b/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h index 70dc1a9e12f..491477bb332 100644 --- a/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkRegionConstrainedSubsampler.h @@ -59,7 +59,7 @@ class ITK_TEMPLATE_EXPORT RegionConstrainedSubsampler : public SubsamplerBase; using Superclass = SubsamplerBase; - using typename Superclass::Baseclass; + using Baseclass = typename Superclass::Baseclass; using Pointer = SmartPointer; using ConstPointer = SmartPointer; diff --git a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h index 83f16dfa990..5822683f3bc 100644 --- a/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkSpatialNeighborSubsampler.h @@ -56,7 +56,7 @@ class ITK_TEMPLATE_EXPORT SpatialNeighborSubsampler : public RegionConstrainedSu /** Standard class type aliases */ using Self = SpatialNeighborSubsampler; using Superclass = RegionConstrainedSubsampler; - using typename Superclass::Baseclass; + using Baseclass = typename Superclass::Baseclass; using Pointer = SmartPointer; using ConstPointer = SmartPointer; diff --git a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h index 6716bdb6571..62c291130be 100644 --- a/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h +++ b/Modules/Numerics/Statistics/include/itkUniformRandomSpatialNeighborSubsampler.h @@ -54,7 +54,7 @@ class ITK_TEMPLATE_EXPORT UniformRandomSpatialNeighborSubsampler : public Spatia /** Standard class type aliases */ using Self = UniformRandomSpatialNeighborSubsampler; using Superclass = SpatialNeighborSubsampler; - using typename Superclass::Baseclass; + using Baseclass = typename Superclass::Baseclass; using Pointer = SmartPointer; using ConstPointer = SmartPointer; diff --git a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h index ff9e1801c2c..9a2022244a3 100644 --- a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4.h @@ -138,7 +138,7 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4 using typename Superclass::FixedImageType; using typename Superclass::MovingImageType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::FixedOutputPointType; using typename Superclass::MovingOutputPointType; diff --git a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h index 8cac7f1f591..3a25ec7733e 100644 --- a/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkANTSNeighborhoodCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT ANTSNeighborhoodCorrelationImageToImageMetricv4GetValu using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualPointType; using typename Superclass::VirtualIndexType; using typename Superclass::FixedImagePointType; diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h index 5c3e60bb463..a245b14c2e1 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4.h @@ -108,7 +108,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4 using typename Superclass::MovingTransformType; using typename Superclass::JacobianType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::VirtualPointSetType; diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h index 0208590e169..1ce75ca84b0 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -50,7 +50,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4GetValueAndDerivativeTh using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::ImageToImageMetricv4Type; + using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::FixedImagePointType; diff --git a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h index 3202d2e2cdb..ebe04bd8d22 100644 --- a/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h +++ b/Modules/Registration/Metricsv4/include/itkCorrelationImageToImageMetricv4HelperThreader.h @@ -52,7 +52,7 @@ class ITK_TEMPLATE_EXPORT CorrelationImageToImageMetricv4HelperThreader using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::ImageToImageMetricv4Type; + using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::FixedImagePointType; diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h index 0475a42f2ab..fc255ba61d1 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4.h @@ -90,7 +90,7 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4 using typename Superclass::MovingTransformType; using typename Superclass::JacobianType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using VirtualSPointSetType = typename Superclass::VirtualPointSetType; diff --git a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h index c3da810c48c..d35bebbd1ee 100644 --- a/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkDemonsImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -50,7 +50,7 @@ class ITK_TEMPLATE_EXPORT DemonsImageToImageMetricv4GetValueAndDerivativeThreade using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::ImageToImageMetricv4Type; + using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type; using typename Superclass::VirtualPointType; using typename Superclass::VirtualIndexType; using typename Superclass::FixedImagePointType; diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h index 50f845d2d24..fadb7f17538 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4.h @@ -227,7 +227,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 using typename Superclass::FixedTransformJacobianType; using typename Superclass::MovingTransformJacobianType; - using typename Superclass::ObjectType; + using ObjectType = typename Superclass::ObjectType; /** Image-accessor type alias */ using FixedImageType = TFixedImage; @@ -247,7 +247,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4 using MovingImageIndexType = typename MovingImageType::IndexType; /** Types for the virtual domain */ - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualImagePointer; using typename Superclass::VirtualPixelType; using typename Superclass::VirtualRegionType; diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h index 0add2af726d..8290e073e3e 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreader< /** Types of the target class. */ using ImageToImageMetricv4Type = TImageToImageMetricv4; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::FixedImagePointType; @@ -152,8 +152,8 @@ class ITK_TEMPLATE_EXPORT using typename Superclass::AssociateType; /** Types of the target class. */ - using typename Superclass::ImageToImageMetricv4Type; - using typename Superclass::VirtualImageType; + using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::FixedImagePointType; diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h index 10bf0ef8912..bf74180f06c 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; @@ -117,7 +117,7 @@ class ITK_TEMPLATE_EXPORT using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h index 0daa69e1b05..26fb570d9b0 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.h @@ -88,7 +88,7 @@ class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationImageToImageMetricv4 using FixedTransformJacobianType = typename Superclass::FixedTransformType::JacobianType; using MovingTransformJacobianType = typename Superclass::MovingTransformType::JacobianType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::VirtualPointSetType; diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h index c2530d293ca..93261dac78c 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.h @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4 using typename Superclass::MovingTransformType; using typename Superclass::JacobianType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::VirtualPointSetType; diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h index 565253c665b..40756ad42ed 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -52,7 +52,7 @@ class ITK_TEMPLATE_EXPORT MattesMutualInformationImageToImageMetricv4GetValueAnd using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::ImageToImageMetricv4Type; + using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type; using typename Superclass::VirtualPointType; using typename Superclass::VirtualIndexType; using typename Superclass::FixedImagePointType; diff --git a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h index 5ce0255c0b6..35ff948f86b 100644 --- a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4.h @@ -74,7 +74,7 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4 using typename Superclass::MovingTransformType; using typename Superclass::JacobianType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualIndexType; using typename Superclass::VirtualPointType; using typename Superclass::VirtualPointSetType; diff --git a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h index 2cc239b9522..3b4f3873ad8 100644 --- a/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -50,7 +50,7 @@ class ITK_TEMPLATE_EXPORT MeanSquaresImageToImageMetricv4GetValueAndDerivativeTh using typename Superclass::DomainType; using typename Superclass::AssociateType; - using typename Superclass::ImageToImageMetricv4Type; + using ImageToImageMetricv4Type = typename Superclass::ImageToImageMetricv4Type; using typename Superclass::VirtualPointType; using typename Superclass::VirtualIndexType; using typename Superclass::FixedImagePointType; diff --git a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h index d08f13ae372..dda1fcedb2c 100644 --- a/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkObjectToObjectMultiMetricv4.h @@ -129,7 +129,7 @@ class ITK_TEMPLATE_EXPORT ObjectToObjectMultiMetricv4 using MetricBaseConstPointer = typename MetricType::ConstPointer; using MetricQueueType = std::deque; - using typename Superclass::ObjectType; + using ObjectType = typename Superclass::ObjectType; using WeightValueType = typename DerivativeType::ValueType; using WeightsArrayType = Array; diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h index 90feca50b86..86e780e25cd 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricWithIndexv4.h @@ -120,7 +120,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricWithIndexv4 using DisplacementFieldTransformType = typename Superclass::MovingDisplacementFieldTransformType; - using typename Superclass::ObjectType; + using ObjectType = typename Superclass::ObjectType; /** Dimension type */ using typename Superclass::DimensionType; @@ -167,7 +167,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricWithIndexv4 using LocalDerivativeType = FixedArray; /** Types for the virtual domain */ - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualImagePointer; using typename Superclass::VirtualPixelType; using typename Superclass::VirtualRegionType; diff --git a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h index b58b9e1499d..3f94bd1d37e 100644 --- a/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h +++ b/Modules/Registration/Metricsv4/include/itkPointSetToPointSetMetricv4.h @@ -156,7 +156,7 @@ class ITK_TEMPLATE_EXPORT PointSetToPointSetMetricv4 using typename Superclass::LocalDerivativeType; /** Types for the virtual domain */ - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualImagePointer; using typename Superclass::VirtualPixelType; using typename Superclass::VirtualRegionType; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h index 88b8044abb2..4a1eff5365b 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkBSplineSyNImageRegistrationMethod.h @@ -94,7 +94,7 @@ class ITK_TEMPLATE_EXPORT BSplineSyNImageRegistrationMethod using MovingMaskImageType = typename ImageMaskSpatialObjectType::ImageType; using typename Superclass::MovingImageMasksContainerType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualImageBaseType; using typename Superclass::VirtualImageBaseConstPointer; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h b/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h index b8cca012b55..f6eb99be803 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkSyNImageRegistrationMethod.h @@ -114,7 +114,7 @@ class ITK_TEMPLATE_EXPORT SyNImageRegistrationMethod using MovingMaskImageType = typename ImageMaskSpatialObjectType::ImageType; using typename Superclass::MovingImageMasksContainerType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualImageBaseType; using typename Superclass::VirtualImageBaseConstPointer; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h index 0078acbcf3d..cbef5e7a17f 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkTimeVaryingBSplineVelocityFieldImageRegistrationMethod.h @@ -127,7 +127,7 @@ class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldImageRegistrationMethod using MeasureType = typename ImageMetricType::MeasureType; using MetricDerivativeType = typename ImageMetricType::DerivativeType; - using typename Superclass::VirtualImageType; + using VirtualImageType = typename Superclass::VirtualImageType; using typename Superclass::VirtualImageBaseType; using typename Superclass::VirtualImageBaseConstPointer; From b18668b639becf9e3dc6324ca68f915ab7bf0a1e Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Sun, 3 Oct 2021 16:35:29 +0200 Subject: [PATCH 2/2] COMP: Use trailing return type instead of `typename` + dependent type Modernized template member function definitions in "itk*.hxx" files by using trailing return types, specifically for return types that are themselves specified in terms of a member type, dependent on the specific class template. These changes appeared to serve as a workaround to VS2017 compile errors (apparently caused by a compiler bug) saying: > error C2244: unable to match function definition to an existing declaration By Notepad++ v8.1.4, Find in Files: Find what: ^typename (\w+<.+>::)(.+)\r\n\1(.+)\r\n{\r\n Replace with: auto\r\n$1$3 -> $2\r\n{\r\n Filter: itk*.hxx [v] Match case (*) Regular expression Manually fixed `PatchBasedDenoisingBaseImageFilter::GetPatchLengthInVoxels()`. Manually added `typename` to trailing return types, where necessary. --- Modules/Bridge/NumPy/include/itkPyBuffer.hxx | 3 +- .../NumPy/include/itkPyVectorContainer.hxx | 5 +- Modules/Bridge/NumPy/include/itkPyVnl.hxx | 8 +- .../Bridge/VTK/include/itkVTKImageExport.hxx | 4 +- .../include/itkImageToVTKImageFilter.hxx | 8 +- .../include/itkVTKImageToImageFilter.hxx | 4 +- .../include/itkChildTreeIterator.hxx | 8 +- .../include/itkImageTransformer.hxx | 12 +-- .../include/itkLevelOrderTreeIterator.hxx | 16 ++-- .../include/itkTreeIteratorBase.hxx | 24 +++--- .../Deprecated/include/itkTreeNode.hxx | 16 ++-- ...tkVectorCentralDifferenceImageFunction.hxx | 3 +- .../Common/include/itkAnnulusOperator.hxx | 4 +- Modules/Core/Common/include/itkArray.hxx | 8 +- ...tkAtanRegularizedHeavisideStepFunction.hxx | 8 +- .../include/itkBackwardDifferenceOperator.hxx | 4 +- .../itkBinaryThresholdSpatialFunction.hxx | 4 +- .../Core/Common/include/itkBoundingBox.hxx | 26 +++--- .../Core/Common/include/itkBresenhamLine.hxx | 8 +- .../Core/Common/include/itkCellInterface.hxx | 16 ++-- .../include/itkCompensatedSummation.hxx | 8 +- ...icShellInteriorExteriorSpatialFunction.hxx | 4 +- .../include/itkConstNeighborhoodIterator.hxx | 14 +-- ...ConstNeighborhoodIteratorWithOnlyIndex.hxx | 8 +- .../include/itkConstantBoundaryCondition.hxx | 7 +- .../Common/include/itkCovariantVector.hxx | 28 +++--- .../Common/include/itkDerivativeOperator.hxx | 4 +- .../Common/include/itkDiffusionTensor3D.hxx | 16 ++-- ...lipsoidInteriorExteriorSpatialFunction.hxx | 4 +- .../itkFiniteCylinderSpatialFunction.hxx | 4 +- Modules/Core/Common/include/itkFixedArray.hxx | 36 ++++---- .../include/itkForwardDifferenceOperator.hxx | 4 +- .../include/itkFrustumSpatialFunction.hxx | 4 +- .../include/itkGaussianDerivativeOperator.hxx | 8 +- .../itkGaussianDerivativeSpatialFunction.hxx | 6 +- .../Common/include/itkGaussianOperator.hxx | 4 +- .../include/itkGaussianSpatialFunction.hxx | 4 +- .../include/itkHeavisideStepFunction.hxx | 8 +- .../Core/Common/include/itkHexahedronCell.hxx | 32 +++---- .../Common/include/itkImageKernelOperator.hxx | 8 +- .../itkImageRandomConstIteratorWithIndex.hxx | 4 +- ...kImageRandomConstIteratorWithOnlyIndex.hxx | 4 +- ...ndomNonRepeatingConstIteratorWithIndex.hxx | 4 +- .../Core/Common/include/itkImageRegion.hxx | 12 +-- Modules/Core/Common/include/itkImageSink.hxx | 12 +-- .../Core/Common/include/itkImageSource.hxx | 12 +-- .../Common/include/itkImageToImageFilter.hxx | 8 +- .../Common/include/itkLaplacianOperator.hxx | 4 +- Modules/Core/Common/include/itkLineCell.hxx | 24 +++--- .../Common/include/itkLoggerThreadWrapper.hxx | 4 +- .../Core/Common/include/itkMapContainer.hxx | 36 ++++---- .../Core/Common/include/itkNeighborhood.hxx | 4 +- .../include/itkNeighborhoodAlgorithm.hxx | 7 +- .../Core/Common/include/itkObjectStore.hxx | 4 +- Modules/Core/Common/include/itkOctree.hxx | 4 +- .../include/itkPeriodicBoundaryCondition.hxx | 3 +- Modules/Core/Common/include/itkPoint.hxx | 4 +- Modules/Core/Common/include/itkPointSet.hxx | 24 +++--- .../include/itkPointSetToImageFilter.hxx | 8 +- .../Core/Common/include/itkPolygonCell.hxx | 28 +++--- .../Common/include/itkQuadraticEdgeCell.hxx | 24 +++--- .../include/itkQuadraticTriangleCell.hxx | 28 +++--- .../Common/include/itkQuadrilateralCell.hxx | 28 +++--- Modules/Core/Common/include/itkRGBAPixel.hxx | 4 +- Modules/Core/Common/include/itkRGBPixel.hxx | 4 +- ...itkSinRegularizedHeavisideStepFunction.hxx | 8 +- .../Common/include/itkSmapsFileParser.hxx | 16 ++-- .../Core/Common/include/itkSobelOperator.hxx | 4 +- .../Common/include/itkSparseFieldLayer.hxx | 4 +- .../include/itkSphereSpatialFunction.hxx | 4 +- ...lipsoidInteriorExteriorSpatialFunction.hxx | 3 +- .../include/itkSymmetricSecondRankTensor.hxx | 20 ++--- .../Common/include/itkTetrahedronCell.hxx | 32 +++---- ...tkTorusInteriorExteriorSpatialFunction.hxx | 4 +- .../Core/Common/include/itkTriangleCell.hxx | 44 +++++----- .../Core/Common/include/itkTriangleHelper.hxx | 24 +++--- .../include/itkVariableLengthVector.hxx | 16 ++-- Modules/Core/Common/include/itkVector.hxx | 20 ++--- .../Common/include/itkVectorContainer.hxx | 24 +++--- Modules/Core/Common/include/itkVersor.hxx | 36 ++++---- Modules/Core/Common/include/itkVertexCell.hxx | 24 +++--- .../itkDenseFiniteDifferenceImageFilter.hxx | 4 +- .../include/itkFiniteDifferenceFunction.hxx | 8 +- .../itkFiniteDifferenceSparseImageFilter.hxx | 4 +- ...itkGPUDenseFiniteDifferenceImageFilter.hxx | 4 +- .../ImageAdaptors/include/itkImageAdaptor.hxx | 40 ++++----- .../itkCentralDifferenceImageFunction.hxx | 6 +- .../include/itkCovarianceImageFunction.hxx | 4 +- .../itkGaussianDerivativeImageFunction.hxx | 8 +- .../itkGaussianInterpolateImageFunction.hxx | 4 +- .../itkLinearInterpolateImageFunction.hxx | 3 +- .../include/itkMeanImageFunction.hxx | 4 +- .../include/itkMedianImageFunction.hxx | 4 +- .../itkRayCastInterpolateImageFunction.hxx | 4 +- .../include/itkScatterMatrixImageFunction.hxx | 4 +- .../include/itkSumOfSquaresImageFunction.hxx | 4 +- .../include/itkVarianceImageFunction.hxx | 4 +- .../include/itkVectorMeanImageFunction.hxx | 4 +- .../itkAutomaticTopologyMeshSource.hxx | 58 +++++++------ .../Mesh/include/itkImageToMeshFilter.hxx | 8 +- Modules/Core/Mesh/include/itkMesh.hxx | 45 +++++----- Modules/Core/Mesh/include/itkMeshSource.hxx | 8 +- .../Core/Mesh/include/itkMeshToMeshFilter.hxx | 8 +- .../include/itkRegularSphereMeshSource.hxx | 4 +- Modules/Core/Mesh/include/itkSimplexMesh.hxx | 23 ++--- .../itkSimplexMeshAdaptTopologyFilter.hxx | 3 +- .../itkTriangleMeshToBinaryImageFilter.hxx | 8 +- .../Core/Mesh/include/itkWarpMeshFilter.hxx | 3 +- .../include/itkGeometricalQuadEdge.hxx | 3 +- .../QuadEdgeMesh/include/itkQuadEdgeMesh.hxx | 69 ++++++++------- ...kQuadEdgeMeshBoundaryEdgesMeshFunction.hxx | 4 +- ...ulerOperatorCreateCenterVertexFunction.hxx | 4 +- ...ulerOperatorDeleteCenterVertexFunction.hxx | 4 +- ...dEdgeMeshEulerOperatorFlipEdgeFunction.hxx | 8 +- ...EdgeMeshEulerOperatorJoinFacetFunction.hxx | 4 +- ...dgeMeshEulerOperatorJoinVertexFunction.hxx | 8 +- ...dgeMeshEulerOperatorSplitFacetFunction.hxx | 4 +- ...geMeshEulerOperatorSplitVertexFunction.hxx | 4 +- .../include/itkQuadEdgeMeshFrontIterator.hxx | 4 +- .../include/itkQuadEdgeMeshLineCell.hxx | 28 +++--- .../include/itkQuadEdgeMeshPolygonCell.hxx | 32 +++---- .../itkQuadEdgeMeshZipMeshFunction.hxx | 4 +- .../include/itkArrowSpatialObject.hxx | 8 +- .../include/itkContourSpatialObjectPoint.hxx | 12 +-- .../include/itkDTITubeSpatialObjectPoint.hxx | 4 +- .../include/itkGaussianSpatialObject.hxx | 8 +- .../include/itkImageMaskSpatialObject.hxx | 8 +- .../include/itkImageSpatialObject.hxx | 4 +- .../include/itkLineSpatialObjectPoint.hxx | 8 +- .../include/itkMeshSpatialObject.hxx | 8 +- .../include/itkMetaArrowConverter.hxx | 12 +-- .../include/itkMetaBlobConverter.hxx | 12 +-- .../include/itkMetaContourConverter.hxx | 12 +-- .../include/itkMetaConverterBase.hxx | 4 +- .../include/itkMetaDTITubeConverter.hxx | 11 +-- .../include/itkMetaEllipseConverter.hxx | 12 +-- .../include/itkMetaGaussianConverter.hxx | 12 +-- .../include/itkMetaGroupConverter.hxx | 12 +-- .../include/itkMetaImageConverter.hxx | 15 ++-- .../include/itkMetaLandmarkConverter.hxx | 12 +-- .../include/itkMetaLineConverter.hxx | 12 +-- .../include/itkMetaMeshConverter.hxx | 10 ++- .../include/itkMetaSceneConverter.hxx | 7 +- .../include/itkMetaSurfaceConverter.hxx | 12 +-- .../include/itkMetaTubeConverter.hxx | 12 +-- .../include/itkMetaVesselTubeConverter.hxx | 12 +-- .../include/itkSpatialObject.hxx | 23 ++--- .../include/itkSpatialObjectPoint.hxx | 8 +- .../include/itkSpatialObjectToImageFilter.hxx | 11 +-- .../itkSpatialObjectToPointSetFilter.hxx | 7 +- .../include/itkSurfaceSpatialObjectPoint.hxx | 12 +-- .../include/itkTubeSpatialObjectPoint.hxx | 16 ++-- .../include/itkRandomImageSource.hxx | 12 +-- .../include/itkTestingHashImageFilter.hxx | 4 +- .../include/itkBSplineBaseTransform.hxx | 10 ++- .../include/itkBSplineDeformableTransform.hxx | 6 +- .../Transform/include/itkBSplineTransform.hxx | 6 +- .../include/itkCenteredAffineTransform.hxx | 8 +- .../include/itkCenteredEuler3DTransform.hxx | 8 +- .../include/itkCenteredRigid2DTransform.hxx | 12 +-- .../itkCenteredSimilarity2DTransform.hxx | 12 +-- .../itkComposeScaleSkewVersor3DTransform.hxx | 4 +- .../include/itkCompositeTransform.hxx | 43 +++++----- .../Transform/include/itkEuler2DTransform.hxx | 4 +- .../Transform/include/itkEuler3DTransform.hxx | 8 +- .../Transform/include/itkKernelTransform.hxx | 11 +-- .../include/itkMatrixOffsetTransformBase.hxx | 6 +- .../Transform/include/itkMultiTransform.hxx | 20 +++-- .../include/itkQuaternionRigidTransform.hxx | 8 +- .../Transform/include/itkRigid2DTransform.hxx | 8 +- .../itkRigid3DPerspectiveTransform.hxx | 8 +- .../include/itkScalableAffineTransform.hxx | 4 +- .../include/itkScaleLogarithmicTransform.hxx | 4 +- .../include/itkScaleSkewVersor3DTransform.hxx | 4 +- .../Transform/include/itkScaleTransform.hxx | 21 +++-- .../include/itkScaleVersor3DTransform.hxx | 4 +- .../include/itkSimilarity2DTransform.hxx | 8 +- .../include/itkSimilarity3DTransform.hxx | 4 +- .../include/itkTranslationTransform.hxx | 17 ++-- .../include/itkVersorRigid3DTransform.hxx | 4 +- .../Transform/include/itkVersorTransform.hxx | 4 +- .../include/itkMRASlabIdentifier.hxx | 4 +- .../itkMRIBiasFieldCorrectionFilter.hxx | 4 +- .../include/itkBinaryPruningImageFilter.hxx | 4 +- .../include/itkBinaryThinningImageFilter.hxx | 4 +- .../include/itkAutumnColormapFunction.hxx | 4 +- .../include/itkBlueColormapFunction.hxx | 4 +- .../include/itkCoolColormapFunction.hxx | 4 +- .../include/itkCopperColormapFunction.hxx | 4 +- .../include/itkCustomColormapFunction.hxx | 4 +- .../include/itkGreenColormapFunction.hxx | 4 +- .../include/itkGreyColormapFunction.hxx | 4 +- .../include/itkHSVColormapFunction.hxx | 4 +- .../include/itkHotColormapFunction.hxx | 4 +- .../include/itkJetColormapFunction.hxx | 4 +- .../include/itkOverUnderColormapFunction.hxx | 4 +- .../include/itkRedColormapFunction.hxx | 4 +- .../include/itkSpringColormapFunction.hxx | 4 +- .../include/itkSummerColormapFunction.hxx | 4 +- .../include/itkWinterColormapFunction.hxx | 4 +- .../include/itkConvolutionImageFilter.hxx | 7 +- .../include/itkConvolutionImageFilterBase.hxx | 4 +- .../include/itkFFTConvolutionImageFilter.hxx | 6 +- .../include/itkCurvatureFlowFunction.hxx | 4 +- .../itkMinMaxCurvatureFlowFunction.hxx | 9 +- .../itkPatchBasedDenoisingBaseImageFilter.hxx | 17 ++-- .../itkPatchBasedDenoisingImageFilter.hxx | 11 +-- .../itkConstantVelocityFieldTransform.hxx | 3 +- .../include/itkDisplacementFieldTransform.hxx | 6 +- .../itkTransformToDisplacementFieldFilter.hxx | 4 +- .../include/itkVelocityFieldTransform.hxx | 4 +- ...ContourDirectedMeanDistanceImageFilter.hxx | 8 +- .../itkContourMeanDistanceImageFilter.hxx | 8 +- .../itkDanielssonDistanceMapImageFilter.hxx | 12 +-- ...tkDirectedHausdorffDistanceImageFilter.hxx | 8 +- .../itkFastChamferDistanceImageFilter.hxx | 8 +- .../itkHausdorffDistanceImageFilter.hxx | 8 +- ...SignedDanielssonDistanceMapImageFilter.hxx | 11 +-- .../itkComplexToComplexFFTImageFilter.hxx | 4 +- .../FFT/include/itkForwardFFTImageFilter.hxx | 4 +- ...lfHermitianToRealInverseFFTImageFilter.hxx | 4 +- .../FFT/include/itkInverseFFTImageFilter.hxx | 4 +- ...alToHalfHermitianForwardFFTImageFilter.hxx | 4 +- .../itkFastMarchingExtensionImageFilter.hxx | 3 +- .../itkFastMarchingImageFilterBase.hxx | 3 +- ...archingImageToNodePairContainerAdaptor.hxx | 12 +-- ...tMarchingUpwindGradientImageFilterBase.hxx | 4 +- .../include/itkSimilarityIndexImageFilter.hxx | 4 +- ...itkHessianRecursiveGaussianImageFilter.hxx | 4 +- .../itkHoughTransform2DCirclesImageFilter.hxx | 3 +- .../itkHoughTransform2DLinesImageFilter.hxx | 4 +- ...kLaplacianRecursiveGaussianImageFilter.hxx | 4 +- ...ltiScaleHessianBasedMeasureImageFilter.hxx | 6 +- .../include/itkBinaryFunctorImageFilter.hxx | 6 +- .../include/itkBinaryGeneratorImageFilter.hxx | 6 +- .../include/itkLabelOverlayImageFilter.hxx | 4 +- .../include/itkScalarToRGBPixelFunctor.hxx | 4 +- ...tMagnitudeRecursiveGaussianImageFilter.hxx | 4 +- ...tkGradientRecursiveGaussianImageFilter.hxx | 8 +- .../itkBSplineControlPointImageFilter.hxx | 5 +- .../itkBSplineControlPointImageFunction.hxx | 17 ++-- .../itkCoxDeBoorBSplineKernelFunction.hxx | 8 +- .../include/itkInterpolateImageFilter.hxx | 4 +- .../include/itkWarpVectorImageFilter.hxx | 4 +- .../include/itkClampImageFilter.hxx | 16 ++-- .../itkIntensityWindowingImageFilter.hxx | 8 +- .../include/itkPolylineMaskImageFilter.hxx | 3 +- .../include/itkNoiseBaseImageFilter.hxx | 4 +- .../include/itkGaussianImageSource.hxx | 4 +- .../include/itkImageMomentsCalculator.hxx | 36 ++++---- .../itkLabelOverlapMeasuresImageFilter.hxx | 48 +++++------ .../include/itkLabelStatisticsImageFilter.hxx | 44 +++++----- .../include/itkChangeLabelLabelMapFilter.hxx | 4 +- .../LabelMap/include/itkLabelMap.hxx | 36 ++++---- .../LabelMap/include/itkLabelObject.hxx | 28 +++--- .../LabelMap/include/itkLabelObjectLine.hxx | 8 +- .../itkRegionFromReferenceLabelMapFilter.hxx | 4 +- .../include/itkFlatStructuringElement.hxx | 3 +- .../itkGrayscaleGeodesicDilateImageFilter.hxx | 8 +- .../itkGrayscaleGeodesicErodeImageFilter.hxx | 8 +- .../itkMaskedMovingHistogramImageFilter.hxx | 3 +- .../Path/include/itkChainCodePath.hxx | 8 +- .../Path/include/itkFourierSeriesPath.hxx | 8 +- .../Filtering/Path/include/itkHilbertPath.hxx | 32 ++++--- .../include/itkImageAndPathToImageFilter.hxx | 16 ++-- .../Path/include/itkImageToPathFilter.hxx | 8 +- .../Path/include/itkParametricPath.hxx | 12 +-- .../include/itkPathAndImageToPathFilter.hxx | 8 +- .../Filtering/Path/include/itkPathSource.hxx | 8 +- .../Path/include/itkPathToImageFilter.hxx | 8 +- .../Path/include/itkPathToPathFilter.hxx | 8 +- .../include/itkPolyLineParametricPath.hxx | 12 +-- .../include/itkBorderQuadEdgeMeshFilter.hxx | 24 +++--- .../include/itkNormalQuadEdgeMeshFilter.hxx | 4 +- ...itkQuadricDecimationQuadEdgeMeshFilter.hxx | 4 +- ...EdgeLengthDecimationQuadEdgeMeshFilter.hxx | 3 +- ...kSmoothingRecursiveGaussianImageFilter.hxx | 8 +- .../include/itkBinaryThresholdImageFilter.hxx | 24 +++--- .../itkKappaSigmaThresholdImageCalculator.hxx | 4 +- .../itkOtsuMultipleThresholdsCalculator.hxx | 4 +- .../CSV/include/itkCSVArray2DDataObject.hxx | 24 +++--- .../CSV/include/itkCSVArray2DFileReader.hxx | 4 +- .../ImageBase/include/itkImageFileWriter.hxx | 8 +- .../include/itkImageSeriesReader.hxx | 4 +- .../include/itkImageSeriesWriter.hxx | 8 +- .../IO/MeshBase/include/itkMeshFileWriter.hxx | 8 +- Modules/IO/XML/include/itkDOMReader.hxx | 8 +- Modules/IO/XML/include/itkDOMWriter.hxx | 4 +- ...iscreteGaussianDerivativeImageFunction.hxx | 7 +- ...GradientMagnitudeGaussianImageFunction.hxx | 6 +- ...tkDiscreteHessianGaussianImageFunction.hxx | 8 +- .../include/itkLabelGeometryImageFilter.hxx | 79 +++++++++-------- .../itkRegionBasedLevelSetFunction.hxx | 15 ++-- .../itkRegionBasedLevelSetFunctionData.hxx | 6 +- .../itkRobustAutomaticThresholdCalculator.hxx | 4 +- ...kStochasticFractalDimensionImageFilter.hxx | 3 +- .../include/itkEigenAnalysis2DImageFilter.hxx | 9 +- .../FEM/include/itkFEMImageMetricLoad.hxx | 24 +++--- Modules/Numerics/FEM/include/itkFEMSolver.hxx | 32 +++---- .../itkImageToRectilinearFEMObjectFilter.hxx | 19 +++-- .../FEM/include/itkMetaFEMObjectConverter.hxx | 12 +-- .../include/itkNarrowBandImageFilterBase.hxx | 3 +- .../itkGradientDescentOptimizerBasev4.hxx | 3 +- .../include/itkLBFGSOptimizerBasev4.hxx | 4 +- .../include/itkMultiGradientOptimizerv4.hxx | 10 ++- .../include/itkMultiStartOptimizerv4.hxx | 14 +-- .../include/itkObjectToObjectMetric.hxx | 3 +- .../include/itkObjectToObjectMetricBase.hxx | 4 +- .../itkOnePlusOneEvolutionaryOptimizerv4.hxx | 4 +- ...tkRegistrationParameterScalesEstimator.hxx | 12 +-- ...egistrationParameterScalesFromJacobian.hxx | 4 +- ...gistrationParameterScalesFromShiftBase.hxx | 7 +- ...itkWindowConvergenceMonitoringFunction.hxx | 4 +- .../include/itkCovarianceSampleFilter.hxx | 24 +++--- ...tkDistanceToCentroidMembershipFunction.hxx | 4 +- ...ationMaximizationMixtureModelEstimator.hxx | 22 ++--- .../Statistics/include/itkHistogram.hxx | 50 ++++++----- .../include/itkHistogramToImageFilter.hxx | 4 +- .../itkHistogramToRunLengthFeaturesFilter.hxx | 85 ++++++++++--------- .../itkHistogramToTextureFeaturesFilter.hxx | 75 ++++++++-------- .../include/itkImageToHistogramFilter.hxx | 8 +- .../include/itkImageToListSampleAdaptor.hxx | 12 +-- .../include/itkImageToListSampleFilter.hxx | 7 +- .../itkImageToNeighborhoodSampleAdaptor.hxx | 19 +++-- ...itkJointDomainImageToListSampleAdaptor.hxx | 11 +-- .../include/itkKdTreeBasedKmeansEstimator.hxx | 4 +- .../Statistics/include/itkListSample.hxx | 15 ++-- .../include/itkMahalanobisDistanceMetric.hxx | 4 +- .../include/itkMeanSampleFilter.hxx | 16 ++-- .../include/itkMembershipSample.hxx | 8 +- .../include/itkMixtureModelComponentBase.hxx | 4 +- .../itkPointSetToListSampleAdaptor.hxx | 8 +- .../include/itkSampleClassifierFilter.hxx | 4 +- .../include/itkSampleToHistogramFilter.hxx | 8 +- .../include/itkSampleToSubsampleFilter.hxx | 8 +- ...larImageToCooccurrenceListSampleFilter.hxx | 4 +- ...kScalarImageToCooccurrenceMatrixFilter.hxx | 3 +- .../itkScalarImageToHistogramGenerator.hxx | 4 +- .../itkScalarImageToRunLengthMatrixFilter.hxx | 4 +- ...ndardDeviationPerComponentSampleFilter.hxx | 20 +++-- .../Statistics/include/itkSubsample.hxx | 12 +-- .../itkVectorContainerToListSampleAdaptor.hxx | 8 +- ...elocityFieldTransformParametersAdaptor.hxx | 16 ++-- ...CoefficientHistogramImageToImageMetric.hxx | 12 ++- ...acementFieldTransformParametersAdaptor.hxx | 16 ++-- .../itkHistogramImageToImageMetric.hxx | 11 +-- .../include/itkImageRegistrationMethod.hxx | 4 +- ...ImageToSpatialObjectRegistrationMethod.hxx | 3 +- .../itkKappaStatisticImageToImageMetric.hxx | 3 +- ...tesMutualInformationImageToImageMetric.hxx | 3 +- ...MeanSquaresHistogramImageToImageMetric.hxx | 3 +- .../itkMeanSquaresImageToImageMetric.hxx | 3 +- ...MultiResolutionImageRegistrationMethod.hxx | 4 +- ...itkMutualInformationImageToImageMetric.hxx | 3 +- .../itkPointSetToImageRegistrationMethod.hxx | 4 +- ...tkPointSetToPointSetRegistrationMethod.hxx | 4 +- .../Common/include/itkPointsLocator.hxx | 4 +- ...elocityFieldTransformParametersAdaptor.hxx | 16 ++-- .../itkFEMFiniteDifferenceFunctionLoad.hxx | 7 +- .../FEM/include/itkFEMRegistrationFilter.hxx | 4 +- ...kManifoldParzenWindowsPointSetFunction.hxx | 3 +- ...kDiffeomorphicDemonsRegistrationFilter.hxx | 3 +- ...ymmetricForcesDemonsRegistrationFilter.hxx | 3 +- .../itkDeformableSimplexMesh3DFilter.hxx | 4 +- .../include/itkKLMRegionGrowImageFilter.hxx | 7 +- .../include/itkLabelVotingImageFilter.hxx | 4 +- .../itkExtensionVelocitiesImageFilter.hxx | 6 +- .../LevelSets/include/itkLevelSetFunction.hxx | 8 +- .../itkLevelSetFunctionWithRefitTerm.hxx | 3 +- ...ParallelSparseFieldLevelSetImageFilter.hxx | 3 +- .../include/itkShapePriorMAPCostFunction.hxx | 6 +- .../itkShapePriorMAPCostFunctionBase.hxx | 3 +- ...ShapePriorSegmentationLevelSetFunction.hxx | 3 +- .../itkSparseFieldLevelSetImageFilter.hxx | 4 +- .../include/itkDiscreteLevelSetImage.hxx | 24 +++--- .../LevelSetsv4/include/itkLevelSetBase.hxx | 8 +- .../include/itkLevelSetContainerBase.hxx | 28 +++--- .../include/itkLevelSetDenseImage.hxx | 4 +- .../itkLevelSetDomainMapImageFilter.hxx | 4 +- .../itkLevelSetDomainPartitionImage.hxx | 4 +- .../itkLevelSetEquationAdvectionTerm.hxx | 6 +- .../itkLevelSetEquationBinaryMaskTerm.hxx | 3 +- ...evelSetEquationChanAndVeseInternalTerm.hxx | 3 +- .../include/itkLevelSetEquationContainer.hxx | 24 +++--- .../itkLevelSetEquationCurvatureTerm.hxx | 3 +- .../itkLevelSetEquationLaplacianTerm.hxx | 3 +- .../itkLevelSetEquationOverlapPenaltyTerm.hxx | 3 +- .../itkLevelSetEquationPropagationTerm.hxx | 3 +- .../include/itkLevelSetEquationTermBase.hxx | 7 +- .../itkLevelSetEquationTermContainer.hxx | 31 +++---- .../include/itkLevelSetQuadEdgeMesh.hxx | 12 +-- .../include/itkLevelSetSparseImage.hxx | 12 +-- .../include/itkMalcolmSparseLevelSetImage.hxx | 16 ++-- .../include/itkShiSparseLevelSetImage.hxx | 15 ++-- .../itkWhitakerSparseLevelSetImage.hxx | 4 +- .../test/itkLevelSetTestFunction.hxx | 8 +- .../itkConfidenceConnectedImageFilter.hxx | 4 +- .../itkConnectedThresholdImageFilter.hxx | 20 ++--- .../itkIsolatedConnectedImageFilter.hxx | 8 +- ...tkVectorConfidenceConnectedImageFilter.hxx | 12 +-- .../itkPCAShapeSignedDistanceFunction.hxx | 3 +- .../itkSphereSignedDistanceFunction.hxx | 4 +- .../Voronoi/include/itkVoronoiDiagram2D.hxx | 32 +++---- .../include/itkVoronoiDiagram2DGenerator.hxx | 24 +++--- .../include/itkWatershedRelabeler.hxx | 4 +- .../itkWatershedSegmentTreeGenerator.hxx | 4 +- .../include/itkWatershedSegmenter.hxx | 4 +- Modules/Video/Core/include/itkRingBuffer.hxx | 8 +- Modules/Video/Core/include/itkVideoSource.hxx | 4 +- Modules/Video/Core/include/itkVideoStream.hxx | 11 +-- .../Video/IO/include/itkVideoFileReader.hxx | 20 ++--- .../Video/IO/include/itkVideoFileWriter.hxx | 4 +- 412 files changed, 2212 insertions(+), 2027 deletions(-) diff --git a/Modules/Bridge/NumPy/include/itkPyBuffer.hxx b/Modules/Bridge/NumPy/include/itkPyBuffer.hxx index 651c37de12e..7ed80529bca 100644 --- a/Modules/Bridge/NumPy/include/itkPyBuffer.hxx +++ b/Modules/Bridge/NumPy/include/itkPyBuffer.hxx @@ -70,8 +70,9 @@ PyBuffer::_GetArrayViewFromImage(ImageType * image) } template -const typename PyBuffer::OutputImagePointer +auto PyBuffer::_GetImageViewFromArray(PyObject * arr, PyObject * shape, PyObject * numOfComponent) + -> const OutputImagePointer { PyObject * shapeseq = NULL; PyObject * item = NULL; diff --git a/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx b/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx index ca27132ebd7..2fbd9029fb7 100644 --- a/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx +++ b/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx @@ -57,8 +57,9 @@ PyVectorContainer::_array_view_from_vector_contain } template -const typename PyVectorContainer::VectorContainerType::Pointer -PyVectorContainer::_vector_container_from_array(PyObject * arr, PyObject * shape) +auto +PyVectorContainer::_vector_container_from_array(PyObject * arr, PyObject * shape) -> const + typename VectorContainerType::Pointer { PyObject * obj = NULL; PyObject * shapeseq = NULL; diff --git a/Modules/Bridge/NumPy/include/itkPyVnl.hxx b/Modules/Bridge/NumPy/include/itkPyVnl.hxx index 918ba48982e..54b805224d1 100644 --- a/Modules/Bridge/NumPy/include/itkPyVnl.hxx +++ b/Modules/Bridge/NumPy/include/itkPyVnl.hxx @@ -57,8 +57,8 @@ PyVnl::_GetArrayViewFromVnlVector(VectorType * vector) } template -const typename PyVnl::VectorType -PyVnl::_GetVnlVectorFromArray(PyObject * arr, PyObject * shape) +auto +PyVnl::_GetVnlVectorFromArray(PyObject * arr, PyObject * shape) -> const VectorType { PyObject * obj = NULL; PyObject * shapeseq = NULL; @@ -144,8 +144,8 @@ PyVnl::_GetArrayViewFromVnlMatrix(MatrixType * matrix) } template -const typename PyVnl::MatrixType -PyVnl::_GetVnlMatrixFromArray(PyObject * arr, PyObject * shape) +auto +PyVnl::_GetVnlMatrixFromArray(PyObject * arr, PyObject * shape) -> const MatrixType { PyObject * obj = NULL; PyObject * shapeseq = NULL; diff --git a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx index d7f9a2d1498..1a860c1913f 100644 --- a/Modules/Bridge/VTK/include/itkVTKImageExport.hxx +++ b/Modules/Bridge/VTK/include/itkVTKImageExport.hxx @@ -123,8 +123,8 @@ VTKImageExport::SetInput(const InputImageType * input) * Get the current input image. */ template -typename VTKImageExport::InputImageType * -VTKImageExport::GetInput() +auto +VTKImageExport::GetInput() -> InputImageType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(0)); } diff --git a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx index d2c14bdcd42..43335a07919 100644 --- a/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx +++ b/Modules/Bridge/VtkGlue/include/itkImageToVTKImageFilter.hxx @@ -73,8 +73,8 @@ ImageToVTKImageFilter::SetInput(const InputImageType * inputImage) } template -typename ImageToVTKImageFilter::InputImageType * -ImageToVTKImageFilter::GetInput() +auto +ImageToVTKImageFilter::GetInput() -> InputImageType * { return m_Exporter->GetInput(); } @@ -103,8 +103,8 @@ ImageToVTKImageFilter::GetImporter() const * Get the exporter filter */ template -typename ImageToVTKImageFilter::ExporterFilterType * -ImageToVTKImageFilter::GetExporter() const +auto +ImageToVTKImageFilter::GetExporter() const -> ExporterFilterType * { return m_Exporter.GetPointer(); } diff --git a/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx b/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx index bbbef1c6bb9..3aecbc2bb4d 100644 --- a/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx +++ b/Modules/Bridge/VtkGlue/include/itkVTKImageToImageFilter.hxx @@ -93,8 +93,8 @@ VTKImageToImageFilter::GetExporter() const * Get the importer filter */ template -const typename VTKImageToImageFilter::Superclass * -VTKImageToImageFilter::GetImporter() const +auto +VTKImageToImageFilter::GetImporter() const -> const Superclass * { return this; } diff --git a/Modules/Compatibility/Deprecated/include/itkChildTreeIterator.hxx b/Modules/Compatibility/Deprecated/include/itkChildTreeIterator.hxx index c04c0bb5372..1fda06982f9 100644 --- a/Modules/Compatibility/Deprecated/include/itkChildTreeIterator.hxx +++ b/Modules/Compatibility/Deprecated/include/itkChildTreeIterator.hxx @@ -81,8 +81,8 @@ ChildTreeIterator::GoToParent() /** Return the type of the iterator */ template -typename ChildTreeIterator::NodeType -ChildTreeIterator::GetType() const +auto +ChildTreeIterator::GetType() const -> NodeType { return TreeIteratorBaseEnums::TreeIteratorBaseNode::CHILD; } @@ -104,8 +104,8 @@ ChildTreeIterator::HasNext() const /** Return the next node */ template -const typename ChildTreeIterator::ValueType & -ChildTreeIterator::Next() +auto +ChildTreeIterator::Next() -> const ValueType & { m_ListPosition++; this->m_Position = m_ParentNode->GetChild(m_ListPosition); diff --git a/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx b/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx index 53ca9f2e34c..62f137bc6e0 100644 --- a/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx +++ b/Modules/Compatibility/Deprecated/include/itkImageTransformer.hxx @@ -71,8 +71,8 @@ ImageTransformer::SetInput(unsigned int index, const TInputImage * * */ template -const typename ImageTransformer::InputImageType * -ImageTransformer::GetInput() const +auto +ImageTransformer::GetInput() const -> const InputImageType * { if (this->GetNumberOfInputs() < 1) { @@ -86,8 +86,8 @@ ImageTransformer::GetInput() const * */ template -typename ImageTransformer::InputImageType * -ImageTransformer::GetInput() +auto +ImageTransformer::GetInput() -> InputImageType * { if (this->GetNumberOfInputs() < 1) { @@ -101,8 +101,8 @@ ImageTransformer::GetInput() * */ template -const typename ImageTransformer::InputImageType * -ImageTransformer::GetInput(unsigned int idx) const +auto +ImageTransformer::GetInput(unsigned int idx) const -> const InputImageType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Compatibility/Deprecated/include/itkLevelOrderTreeIterator.hxx b/Modules/Compatibility/Deprecated/include/itkLevelOrderTreeIterator.hxx index 112428f5b65..e6aebe3768f 100644 --- a/Modules/Compatibility/Deprecated/include/itkLevelOrderTreeIterator.hxx +++ b/Modules/Compatibility/Deprecated/include/itkLevelOrderTreeIterator.hxx @@ -73,8 +73,8 @@ LevelOrderTreeIterator::LevelOrderTreeIterator(TTreeType * t /** Return the type of iterator */ template -typename LevelOrderTreeIterator::NodeType -LevelOrderTreeIterator::GetType() const +auto +LevelOrderTreeIterator::GetType() const -> NodeType { return TreeIteratorBaseEnums::TreeIteratorBaseNode::LEVELORDER; } @@ -93,8 +93,8 @@ LevelOrderTreeIterator::HasNext() const /** Return the next node */ template -const typename LevelOrderTreeIterator::ValueType & -LevelOrderTreeIterator::Next() +auto +LevelOrderTreeIterator::Next() -> const ValueType & { this->m_Position = const_cast(FindNextNode()); if (this->m_Position == nullptr) @@ -122,8 +122,8 @@ LevelOrderTreeIterator::GetEndLevel() const /** Find the next available node */ template -const typename LevelOrderTreeIterator::TreeNodeType * -LevelOrderTreeIterator::FindNextNode() const +auto +LevelOrderTreeIterator::FindNextNode() const -> const TreeNodeType * { int level; const TreeNodeType * node; @@ -186,8 +186,8 @@ LevelOrderTreeIterator::GetLevel(const TreeNodeType * node) const /** Helper function to find the next node */ template -const typename LevelOrderTreeIterator::TreeNodeType * -LevelOrderTreeIterator::FindNextNodeHelp() const +auto +LevelOrderTreeIterator::FindNextNodeHelp() const -> const TreeNodeType * { if (m_Queue.empty()) { diff --git a/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.hxx b/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.hxx index 6608297b927..e62be08bc1f 100644 --- a/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.hxx +++ b/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.hxx @@ -74,8 +74,8 @@ TreeIteratorBase::TreeIteratorBase(const TTreeType * tree, const Tree /** Return the current value of the node */ template -const typename TreeIteratorBase::ValueType & -TreeIteratorBase::Get() const +auto +TreeIteratorBase::Get() const -> const ValueType & { return m_Position->Get(); } @@ -342,8 +342,8 @@ TreeIteratorBase::Children() /** Return the first parent found */ template -const typename TreeIteratorBase::TreeNodeType * -TreeIteratorBase::GetParent() const +auto +TreeIteratorBase::GetParent() const -> const TreeNodeType * { if (m_Position == nullptr) { @@ -445,32 +445,32 @@ TreeIteratorBase::Count() /** Get the node pointed by the iterator */ template -typename TreeIteratorBase::TreeNodeType * -TreeIteratorBase::GetNode() +auto +TreeIteratorBase::GetNode() -> TreeNodeType * { return const_cast(m_Position); } /** Get the node pointed by the iterator */ template -const typename TreeIteratorBase::TreeNodeType * -TreeIteratorBase::GetNode() const +auto +TreeIteratorBase::GetNode() const -> const TreeNodeType * { return m_Position; } /** Get the root */ template -typename TreeIteratorBase::TreeNodeType * -TreeIteratorBase::GetRoot() +auto +TreeIteratorBase::GetRoot() -> TreeNodeType * { return const_cast(m_Root); } /** Get the root (const) */ template -const typename TreeIteratorBase::TreeNodeType * -TreeIteratorBase::GetRoot() const +auto +TreeIteratorBase::GetRoot() const -> const TreeNodeType * { return m_Root; } diff --git a/Modules/Compatibility/Deprecated/include/itkTreeNode.hxx b/Modules/Compatibility/Deprecated/include/itkTreeNode.hxx index 4296031d0aa..79e41d7f046 100644 --- a/Modules/Compatibility/Deprecated/include/itkTreeNode.hxx +++ b/Modules/Compatibility/Deprecated/include/itkTreeNode.hxx @@ -122,8 +122,8 @@ TreeNode::HasChildren() const /** Return the number of children */ template -typename TreeNode::ChildIdentifier -TreeNode::CountChildren() const +auto +TreeNode::CountChildren() const -> ChildIdentifier { return static_cast(m_Children.size()); } @@ -183,8 +183,8 @@ TreeNode::ChildPosition(const Self * node) const /** Return the child position given an element, the first child found. */ template -typename TreeNode::ChildIdentifier -TreeNode::ChildPosition(TValue element) const +auto +TreeNode::ChildPosition(TValue element) const -> ChildIdentifier { const auto numberOfChildren = static_cast(m_Children.size()); @@ -233,8 +233,8 @@ TreeNode::AddChild(ChildIdentifier number, Self * node) /** Get the number of children given a name and a depth */ template -typename TreeNode::ChildIdentifier -TreeNode::GetNumberOfChildren(unsigned int depth, char * name) const +auto +TreeNode::GetNumberOfChildren(unsigned int depth, char * name) const -> ChildIdentifier { auto it = m_Children.begin(); auto itEnd = m_Children.end(); @@ -266,8 +266,8 @@ TreeNode::GetNumberOfChildren(unsigned int depth, char * name) const /** Get children given a name and a depth */ #if !defined(ITK_WRAPPING_PARSER) template -typename TreeNode::ChildrenListType * -TreeNode::GetChildren(unsigned int depth, char * name) const +auto +TreeNode::GetChildren(unsigned int depth, char * name) const -> ChildrenListType * { auto * children = new ChildrenListType; diff --git a/Modules/Compatibility/Deprecated/include/itkVectorCentralDifferenceImageFunction.hxx b/Modules/Compatibility/Deprecated/include/itkVectorCentralDifferenceImageFunction.hxx index cd2f79a7877..265a0b35618 100644 --- a/Modules/Compatibility/Deprecated/include/itkVectorCentralDifferenceImageFunction.hxx +++ b/Modules/Compatibility/Deprecated/include/itkVectorCentralDifferenceImageFunction.hxx @@ -46,8 +46,9 @@ VectorCentralDifferenceImageFunction::PrintSelf(std::ost * */ template -typename VectorCentralDifferenceImageFunction::OutputType +auto VectorCentralDifferenceImageFunction::EvaluateAtIndex(const IndexType & index) const + -> OutputType { OutputType derivative; diff --git a/Modules/Core/Common/include/itkAnnulusOperator.hxx b/Modules/Core/Common/include/itkAnnulusOperator.hxx index 9c2eed92b1e..c2d77b62865 100644 --- a/Modules/Core/Common/include/itkAnnulusOperator.hxx +++ b/Modules/Core/Common/include/itkAnnulusOperator.hxx @@ -57,8 +57,8 @@ AnnulusOperator::Fill(const CoefficientVector & } template -typename AnnulusOperator::CoefficientVector -AnnulusOperator::GenerateCoefficients() +auto +AnnulusOperator::GenerateCoefficients() -> CoefficientVector { // Determine the initial kernel values... double interiorV, annulusV, exteriorV; diff --git a/Modules/Core/Common/include/itkArray.hxx b/Modules/Core/Common/include/itkArray.hxx index b67ce715dfd..ee7d6f06db7 100644 --- a/Modules/Core/Common/include/itkArray.hxx +++ b/Modules/Core/Common/include/itkArray.hxx @@ -148,8 +148,8 @@ Array::SetSize(SizeValueType sz) } template -const typename Array::Self & -Array::operator=(const Self & rhs) +auto +Array::operator=(const Self & rhs) -> const Self & { if (this != &rhs) { @@ -167,8 +167,8 @@ Array::operator=(const Self & rhs) } template -const typename Array::Self & -Array::operator=(const VnlVectorType & rhs) +auto +Array::operator=(const VnlVectorType & rhs) -> const Self & { if (this != &rhs) { diff --git a/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx b/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx index 48d98ed2268..a5b625b045a 100644 --- a/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx +++ b/Modules/Core/Common/include/itkAtanRegularizedHeavisideStepFunction.hxx @@ -25,8 +25,8 @@ namespace itk { template -typename AtanRegularizedHeavisideStepFunction::OutputType -AtanRegularizedHeavisideStepFunction::Evaluate(const InputType & input) const +auto +AtanRegularizedHeavisideStepFunction::Evaluate(const InputType & input) const -> OutputType { const RealType t = static_cast(input) * this->GetOneOverEpsilon(); return 0.5 + static_cast(itk::Math::one_over_pi * std::atan(t)); @@ -34,8 +34,8 @@ AtanRegularizedHeavisideStepFunction::Evaluate(const InputType /** Evaluate the derivative at the specified input position */ template -typename AtanRegularizedHeavisideStepFunction::OutputType -AtanRegularizedHeavisideStepFunction::EvaluateDerivative(const InputType & input) const +auto +AtanRegularizedHeavisideStepFunction::EvaluateDerivative(const InputType & input) const -> OutputType { const RealType oneOverEpsilon = this->GetOneOverEpsilon(); const RealType t = static_cast(input) * oneOverEpsilon; diff --git a/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx b/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx index b6f57abc064..143c7c63cb9 100644 --- a/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx +++ b/Modules/Core/Common/include/itkBackwardDifferenceOperator.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename BackwardDifferenceOperator::CoefficientVector -BackwardDifferenceOperator::GenerateCoefficients() +auto +BackwardDifferenceOperator::GenerateCoefficients() -> CoefficientVector { CoefficientVector coeff(3); diff --git a/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx b/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx index bc277749b01..c9e32cf8a42 100644 --- a/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkBinaryThresholdSpatialFunction.hxx @@ -41,8 +41,8 @@ BinaryThresholdSpatialFunction::PrintSelf(std::ostream & os, Indent i } template -typename BinaryThresholdSpatialFunction::OutputType -BinaryThresholdSpatialFunction::Evaluate(const InputType & point) const +auto +BinaryThresholdSpatialFunction::Evaluate(const InputType & point) const -> OutputType { FunctionOutputType value = m_Function->Evaluate(point); diff --git a/Modules/Core/Common/include/itkBoundingBox.hxx b/Modules/Core/Common/include/itkBoundingBox.hxx index 85663052889..45e2bfef5f5 100644 --- a/Modules/Core/Common/include/itkBoundingBox.hxx +++ b/Modules/Core/Common/include/itkBoundingBox.hxx @@ -66,8 +66,9 @@ BoundingBox::Set /** Access routine to get the points container. */ template -const typename BoundingBox::PointsContainer * +auto BoundingBox::GetPoints() const + -> const PointsContainer * { itkDebugMacro("returning Points container of " << m_PointsContainer); @@ -107,8 +108,8 @@ BoundingBox::Com #if !defined(ITK_LEGACY_REMOVE) /** Compute and get the corners of the bounding box */ template -const typename BoundingBox::PointsContainer * -BoundingBox::GetCorners() +auto +BoundingBox::GetCorners() -> const PointsContainer * { m_CornersContainer->clear(); m_CornersContainer->Reserve(NumberOfCorners); @@ -191,8 +192,8 @@ BoundingBox::Com } template -typename BoundingBox::PointType -BoundingBox::GetCenter() const +auto +BoundingBox::GetCenter() const -> PointType { this->ComputeBoundingBox(); @@ -206,8 +207,8 @@ BoundingBox::Get } template -typename BoundingBox::PointType -BoundingBox::GetMinimum() const +auto +BoundingBox::GetMinimum() const -> PointType { this->ComputeBoundingBox(); @@ -233,8 +234,8 @@ BoundingBox::Set } template -typename BoundingBox::PointType -BoundingBox::GetMaximum() const +auto +BoundingBox::GetMaximum() const -> PointType { this->ComputeBoundingBox(); @@ -286,8 +287,9 @@ BoundingBox::Con } template -typename BoundingBox::AccumulateType +auto BoundingBox::GetDiagonalLength2() const + -> AccumulateType { typename NumericTraits::AccumulateType dist2 = NumericTraits::ZeroValue(); @@ -341,8 +343,8 @@ BoundingBox::Get } template -typename BoundingBox::Pointer -BoundingBox::DeepCopy() const +auto +BoundingBox::DeepCopy() const -> Pointer { Pointer clone = Self::New(); diff --git a/Modules/Core/Common/include/itkBresenhamLine.hxx b/Modules/Core/Common/include/itkBresenhamLine.hxx index 5734f76bb59..719a1021703 100644 --- a/Modules/Core/Common/include/itkBresenhamLine.hxx +++ b/Modules/Core/Common/include/itkBresenhamLine.hxx @@ -26,8 +26,8 @@ namespace itk { template -typename BresenhamLine::OffsetArray -BresenhamLine::BuildLine(LType Direction, unsigned int length) +auto +BresenhamLine::BuildLine(LType Direction, unsigned int length) -> OffsetArray { // copied from the line iterator /** Variables that drive the Bresenham-Algorithm */ @@ -113,8 +113,8 @@ BresenhamLine::BuildLine(LType Direction, unsigned int length) } template -typename BresenhamLine::IndexArray -BresenhamLine::BuildLine(IndexType p0, IndexType p1) +auto +BresenhamLine::BuildLine(IndexType p0, IndexType p1) -> IndexArray { itk::Point point0; itk::Point point1; diff --git a/Modules/Core/Common/include/itkCellInterface.hxx b/Modules/Core/Common/include/itkCellInterface.hxx index 51b3615e70d..0d778991abb 100644 --- a/Modules/Core/Common/include/itkCellInterface.hxx +++ b/Modules/Core/Common/include/itkCellInterface.hxx @@ -38,15 +38,15 @@ CellInterface::GetInterpolationOrder() const * PointIdsBegin() const. */ template -typename CellInterface::PointIdConstIterator -CellInterface::GetPointIds() const +auto +CellInterface::GetPointIds() const -> PointIdConstIterator { return this->PointIdsBegin(); } template -typename CellInterface::PointIdentifierContainerType -CellInterface::GetPointIdsContainer() const +auto +CellInterface::GetPointIdsContainer() const -> PointIdentifierContainerType { PointIdentifierContainerType res; res.SetSize(this->GetNumberOfPoints()); @@ -136,8 +136,8 @@ CellInterface::GetNumberOfUsingCells() * Get a begin iterator for the UsingCellsContainer. */ template -typename CellInterface::UsingCellsContainerIterator -CellInterface::UsingCellsBegin() +auto +CellInterface::UsingCellsBegin() -> UsingCellsContainerIterator { return m_UsingCells.begin(); } @@ -146,8 +146,8 @@ CellInterface::UsingCellsBegin() * Get an end iterator for the UsingCellsContainer. */ template -typename CellInterface::UsingCellsContainerIterator -CellInterface::UsingCellsEnd() +auto +CellInterface::UsingCellsEnd() -> UsingCellsContainerIterator { return m_UsingCells.end(); } diff --git a/Modules/Core/Common/include/itkCompensatedSummation.hxx b/Modules/Core/Common/include/itkCompensatedSummation.hxx index 94856788912..472cd8ad19e 100644 --- a/Modules/Core/Common/include/itkCompensatedSummation.hxx +++ b/Modules/Core/Common/include/itkCompensatedSummation.hxx @@ -80,8 +80,8 @@ CompensatedSummation::CompensatedSummation(const Self & rhs) } template -typename CompensatedSummation::Self & -CompensatedSummation::operator=(const Self & rhs) +auto +CompensatedSummation::operator=(const Self & rhs) -> Self & { if (this != &rhs) { @@ -161,8 +161,8 @@ CompensatedSummation::operator=(const FloatType & rhs) } template -const typename CompensatedSummation::AccumulateType & -CompensatedSummation::GetSum() const +auto +CompensatedSummation::GetSum() const -> const AccumulateType & { return this->m_Sum; } diff --git a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx index 2f9268dfd8d..a49310f61ec 100644 --- a/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkConicShellInteriorExteriorSpatialFunction.hxx @@ -41,8 +41,8 @@ ConicShellInteriorExteriorSpatialFunction::SetOriginGradient } template -typename ConicShellInteriorExteriorSpatialFunction::OutputType -ConicShellInteriorExteriorSpatialFunction::Evaluate(const InputType & position) const +auto +ConicShellInteriorExteriorSpatialFunction::Evaluate(const InputType & position) const -> OutputType { using VectorType = Vector; diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx index 75dbda219ef..3086026e19d 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx +++ b/Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx @@ -144,8 +144,9 @@ ConstNeighborhoodIterator::IndexInBounds(const Neigh } template -typename ConstNeighborhoodIterator::PixelType +auto ConstNeighborhoodIterator::GetPixel(NeighborIndexType n, bool & IsInBounds) const + -> PixelType { // If the region the iterator is walking (padded by the neighborhood size) // never bumps up against the bounds of the buffered region, then don't @@ -182,8 +183,9 @@ ConstNeighborhoodIterator::GetPixel(NeighborIndexTyp } template -typename ConstNeighborhoodIterator::OffsetType +auto ConstNeighborhoodIterator::ComputeInternalIndex(const NeighborIndexType n) const + -> OffsetType { OffsetType ans; auto r = (unsigned long)n; @@ -196,8 +198,8 @@ ConstNeighborhoodIterator::ComputeInternalIndex(cons } template -typename ConstNeighborhoodIterator::RegionType -ConstNeighborhoodIterator::GetBoundingBoxAsImageRegion() const +auto +ConstNeighborhoodIterator::GetBoundingBoxAsImageRegion() const -> RegionType { const IndexValueType zero = NumericTraits::ZeroValue(); RegionType ans; @@ -297,8 +299,8 @@ ConstNeighborhoodIterator::SetEndIndex() } template -typename ConstNeighborhoodIterator::NeighborhoodType -ConstNeighborhoodIterator::GetNeighborhood() const +auto +ConstNeighborhoodIterator::GetNeighborhood() const -> NeighborhoodType { OffsetType OverlapLow, OverlapHigh, temp, offset; diff --git a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx index 976f6ddac16..a39df2ef029 100644 --- a/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx +++ b/Modules/Core/Common/include/itkConstNeighborhoodIteratorWithOnlyIndex.hxx @@ -104,8 +104,8 @@ ConstNeighborhoodIteratorWithOnlyIndex::IndexInBounds(const NeighborInde } template -typename ConstNeighborhoodIteratorWithOnlyIndex::OffsetType -ConstNeighborhoodIteratorWithOnlyIndex::ComputeInternalIndex(NeighborIndexType n) const +auto +ConstNeighborhoodIteratorWithOnlyIndex::ComputeInternalIndex(NeighborIndexType n) const -> OffsetType { OffsetType ans; auto r = (unsigned long)n; @@ -118,8 +118,8 @@ ConstNeighborhoodIteratorWithOnlyIndex::ComputeInternalIndex(NeighborInd } template -typename ConstNeighborhoodIteratorWithOnlyIndex::RegionType -ConstNeighborhoodIteratorWithOnlyIndex::GetBoundingBoxAsImageRegion() const +auto +ConstNeighborhoodIteratorWithOnlyIndex::GetBoundingBoxAsImageRegion() const -> RegionType { const IndexValueType zero = NumericTraits::ZeroValue(); RegionType ans; diff --git a/Modules/Core/Common/include/itkConstantBoundaryCondition.hxx b/Modules/Core/Common/include/itkConstantBoundaryCondition.hxx index 219b1bc67fa..28071ff914b 100644 --- a/Modules/Core/Common/include/itkConstantBoundaryCondition.hxx +++ b/Modules/Core/Common/include/itkConstantBoundaryCondition.hxx @@ -57,8 +57,8 @@ ConstantBoundaryCondition::SetConstant(const OutputPi } template -const typename ConstantBoundaryCondition::OutputPixelType & -ConstantBoundaryCondition::GetConstant() const +auto +ConstantBoundaryCondition::GetConstant() const -> const OutputPixelType & { return m_Constant; } @@ -86,8 +86,9 @@ ConstantBoundaryCondition::GetInputRequestedRegion( } template -typename ConstantBoundaryCondition::OutputPixelType +auto ConstantBoundaryCondition::GetPixel(const IndexType & index, const TInputImage * image) const + -> OutputPixelType { RegionType imageRegion = image->GetLargestPossibleRegion(); if (imageRegion.IsInside(index)) diff --git a/Modules/Core/Common/include/itkCovariantVector.hxx b/Modules/Core/Common/include/itkCovariantVector.hxx index 3fb13f5899f..44f0f76a286 100644 --- a/Modules/Core/Common/include/itkCovariantVector.hxx +++ b/Modules/Core/Common/include/itkCovariantVector.hxx @@ -38,8 +38,8 @@ CovariantVector::operator=(const ValueType r[NVectorDimensi } template -const typename CovariantVector::Self & -CovariantVector::operator+=(const Self & vec) +auto +CovariantVector::operator+=(const Self & vec) -> const Self & { for (unsigned int i = 0; i < NVectorDimension; ++i) { @@ -49,8 +49,8 @@ CovariantVector::operator+=(const Self & vec) } template -const typename CovariantVector::Self & -CovariantVector::operator-=(const Self & vec) +auto +CovariantVector::operator-=(const Self & vec) -> const Self & { for (unsigned int i = 0; i < NVectorDimension; ++i) { @@ -73,8 +73,8 @@ CovariantVector::operator-() const } template -typename CovariantVector::Self -CovariantVector::operator+(const Self & vec) const +auto +CovariantVector::operator+(const Self & vec) const -> Self { Self result; @@ -86,8 +86,8 @@ CovariantVector::operator+(const Self & vec) const } template -typename CovariantVector::Self -CovariantVector::operator-(const Self & vec) const +auto +CovariantVector::operator-(const Self & vec) const -> Self { Self result; @@ -123,8 +123,8 @@ typename CovariantVector::ValueType CovariantVector -typename CovariantVector::RealValueType -CovariantVector::GetSquaredNorm() const +auto +CovariantVector::GetSquaredNorm() const -> RealValueType { RealValueType sum = NumericTraits::ZeroValue(); @@ -137,15 +137,15 @@ CovariantVector::GetSquaredNorm() const } template -typename CovariantVector::RealValueType -CovariantVector::GetNorm() const +auto +CovariantVector::GetNorm() const -> RealValueType { return std::sqrt(this->GetSquaredNorm()); } template -typename CovariantVector::RealValueType -CovariantVector::Normalize() +auto +CovariantVector::Normalize() -> RealValueType { const RealValueType norm = this->GetNorm(); diff --git a/Modules/Core/Common/include/itkDerivativeOperator.hxx b/Modules/Core/Common/include/itkDerivativeOperator.hxx index 3a5a181925c..c6d281eb6a6 100644 --- a/Modules/Core/Common/include/itkDerivativeOperator.hxx +++ b/Modules/Core/Common/include/itkDerivativeOperator.hxx @@ -24,8 +24,8 @@ namespace itk { template -typename DerivativeOperator::CoefficientVector -DerivativeOperator::GenerateCoefficients() +auto +DerivativeOperator::GenerateCoefficients() -> CoefficientVector { unsigned int i; unsigned int j; diff --git a/Modules/Core/Common/include/itkDiffusionTensor3D.hxx b/Modules/Core/Common/include/itkDiffusionTensor3D.hxx index 36b6f9c9898..72bf0c1e3da 100644 --- a/Modules/Core/Common/include/itkDiffusionTensor3D.hxx +++ b/Modules/Core/Common/include/itkDiffusionTensor3D.hxx @@ -96,8 +96,8 @@ DiffusionTensor3D::operator=(const Superclass & r) * */ template -typename DiffusionTensor3D::AccumulateValueType -DiffusionTensor3D::GetTrace() const +auto +DiffusionTensor3D::GetTrace() const -> AccumulateValueType { AccumulateValueType trace = (*this)[0]; @@ -110,8 +110,8 @@ DiffusionTensor3D::GetTrace() const * Compute the value of fractional anisotropy */ template -typename DiffusionTensor3D::RealValueType -DiffusionTensor3D::GetFractionalAnisotropy() const +auto +DiffusionTensor3D::GetFractionalAnisotropy() const -> RealValueType { // Computed as // FA = std::sqrt(1.5*sum(sum(N.*N))/sum((sum(D.*D)))) @@ -144,8 +144,8 @@ DiffusionTensor3D::GetFractionalAnisotropy() const * Compute the value of relative anisotropy */ template -typename DiffusionTensor3D::RealValueType -DiffusionTensor3D::GetRelativeAnisotropy() const +auto +DiffusionTensor3D::GetRelativeAnisotropy() const -> RealValueType { const RealValueType trace = this->GetTrace(); const RealValueType isp = this->GetInnerScalarProduct(); @@ -175,8 +175,8 @@ DiffusionTensor3D::GetRelativeAnisotropy() const * Compute the inner scalar product */ template -typename DiffusionTensor3D::RealValueType -DiffusionTensor3D::GetInnerScalarProduct() const +auto +DiffusionTensor3D::GetInnerScalarProduct() const -> RealValueType { const RealValueType xx = (*this)[0]; const RealValueType xy = (*this)[1]; diff --git a/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx b/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx index 7d9f42d9040..c72d884d7c8 100644 --- a/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkEllipsoidInteriorExteriorSpatialFunction.hxx @@ -47,8 +47,8 @@ EllipsoidInteriorExteriorSpatialFunction::~EllipsoidInterior } template -typename EllipsoidInteriorExteriorSpatialFunction::OutputType -EllipsoidInteriorExteriorSpatialFunction::Evaluate(const InputType & position) const +auto +EllipsoidInteriorExteriorSpatialFunction::Evaluate(const InputType & position) const -> OutputType { double distanceSquared = 0; diff --git a/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx b/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx index aad2b4472c9..a5f71c8d2cf 100644 --- a/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkFiniteCylinderSpatialFunction.hxx @@ -67,8 +67,8 @@ FiniteCylinderSpatialFunction::SetOrientation(const InputTyp } template -typename FiniteCylinderSpatialFunction::OutputType -FiniteCylinderSpatialFunction::Evaluate(const InputType & position) const +auto +FiniteCylinderSpatialFunction::Evaluate(const InputType & position) const -> OutputType { const double halfAxisLength = 0.5 * m_AxisLength; diff --git a/Modules/Core/Common/include/itkFixedArray.hxx b/Modules/Core/Common/include/itkFixedArray.hxx index 05f934d5ce7..d85ea97dac3 100644 --- a/Modules/Core/Common/include/itkFixedArray.hxx +++ b/Modules/Core/Common/include/itkFixedArray.hxx @@ -72,8 +72,8 @@ FixedArray::operator==(const FixedArray & r) const * Get an Iterator for the beginning of the FixedArray. */ template -typename FixedArray::Iterator -FixedArray::Begin() +auto +FixedArray::Begin() -> Iterator { return Iterator(m_InternalArray); } @@ -82,8 +82,8 @@ FixedArray::Begin() * Get a ConstIterator for the beginning of the FixedArray. */ template -typename FixedArray::ConstIterator -FixedArray::Begin() const +auto +FixedArray::Begin() const -> ConstIterator { return ConstIterator(m_InternalArray); } @@ -92,8 +92,8 @@ FixedArray::Begin() const * Get an Iterator for the end of the FixedArray. */ template -typename FixedArray::Iterator -FixedArray::End() +auto +FixedArray::End() -> Iterator { return Iterator(m_InternalArray + VLength); } @@ -102,8 +102,8 @@ FixedArray::End() * Get a ConstIterator for the end of the FixedArray. */ template -typename FixedArray::ConstIterator -FixedArray::End() const +auto +FixedArray::End() const -> ConstIterator { return ConstIterator(m_InternalArray + VLength); } @@ -114,8 +114,8 @@ FixedArray::End() const * Get a begin ReverseIterator. */ template -typename FixedArray::ReverseIterator -FixedArray::rBegin() +auto +FixedArray::rBegin() -> ReverseIterator { return ReverseIterator(m_InternalArray + VLength); } @@ -124,8 +124,8 @@ FixedArray::rBegin() * Get a begin ConstReverseIterator. */ template -typename FixedArray::ConstReverseIterator -FixedArray::rBegin() const +auto +FixedArray::rBegin() const -> ConstReverseIterator { return ConstReverseIterator(m_InternalArray + VLength); } @@ -134,8 +134,8 @@ FixedArray::rBegin() const * Get an end ReverseIterator. */ template -typename FixedArray::ReverseIterator -FixedArray::rEnd() +auto +FixedArray::rEnd() -> ReverseIterator { return ReverseIterator(m_InternalArray); } @@ -144,8 +144,8 @@ FixedArray::rEnd() * Get an end ConstReverseIterator. */ template -typename FixedArray::ConstReverseIterator -FixedArray::rEnd() const +auto +FixedArray::rEnd() const -> ConstReverseIterator { return ConstReverseIterator(m_InternalArray); } @@ -156,8 +156,8 @@ FixedArray::rEnd() const * Get the size of the FixedArray. */ template -typename FixedArray::SizeType -FixedArray::Size() const +auto +FixedArray::Size() const -> SizeType { return VLength; } diff --git a/Modules/Core/Common/include/itkForwardDifferenceOperator.hxx b/Modules/Core/Common/include/itkForwardDifferenceOperator.hxx index 1e9abf0b2c7..32d88bbc45d 100644 --- a/Modules/Core/Common/include/itkForwardDifferenceOperator.hxx +++ b/Modules/Core/Common/include/itkForwardDifferenceOperator.hxx @@ -24,8 +24,8 @@ namespace itk { template -typename ForwardDifferenceOperator::CoefficientVector -ForwardDifferenceOperator::GenerateCoefficients() +auto +ForwardDifferenceOperator::GenerateCoefficients() -> CoefficientVector { CoefficientVector coeff(3); diff --git a/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx b/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx index a75db0141eb..b94ee78bb0d 100644 --- a/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkFrustumSpatialFunction.hxx @@ -29,8 +29,8 @@ FrustumSpatialFunction::FrustumSpatialFunction() } template -typename FrustumSpatialFunction::OutputType -FrustumSpatialFunction::Evaluate(const InputType & position) const +auto +FrustumSpatialFunction::Evaluate(const InputType & position) const -> OutputType { using PointType = InputType; using VectorType = typename PointType::VectorType; diff --git a/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx b/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx index 836ba5e752e..6ef938a89c5 100644 --- a/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx +++ b/Modules/Core/Common/include/itkGaussianDerivativeOperator.hxx @@ -28,8 +28,8 @@ namespace itk { template -typename GaussianDerivativeOperator::CoefficientVector -GaussianDerivativeOperator::GenerateCoefficients() +auto +GaussianDerivativeOperator::GenerateCoefficients() -> CoefficientVector { // compute gaussian kernel of 0-order @@ -101,8 +101,8 @@ GaussianDerivativeOperator::GenerateCoefficients } template -typename GaussianDerivativeOperator::CoefficientVector -GaussianDerivativeOperator::GenerateGaussianCoefficients() const +auto +GaussianDerivativeOperator::GenerateGaussianCoefficients() const -> CoefficientVector { CoefficientVector coeff; diff --git a/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx b/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx index 188bc2b21d9..9af5c0a2b76 100644 --- a/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkGaussianDerivativeSpatialFunction.hxx @@ -35,8 +35,9 @@ GaussianDerivativeSpatialFunction::GaussianDer } template -typename GaussianDerivativeSpatialFunction::OutputType +auto GaussianDerivativeSpatialFunction::Evaluate(const TInput & position) const + -> OutputType { // Normalizing the Gaussian is important for statistical applications // but is generally not desirable for creating images because of the @@ -75,8 +76,9 @@ GaussianDerivativeSpatialFunction::Evaluate(co /** Evaluate the function at a given position and return a vector */ template -typename GaussianDerivativeSpatialFunction::VectorType +auto GaussianDerivativeSpatialFunction::EvaluateVector(const TInput & position) const + -> VectorType { VectorType gradient; diff --git a/Modules/Core/Common/include/itkGaussianOperator.hxx b/Modules/Core/Common/include/itkGaussianOperator.hxx index 610fb22590f..d83b7460945 100644 --- a/Modules/Core/Common/include/itkGaussianOperator.hxx +++ b/Modules/Core/Common/include/itkGaussianOperator.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename GaussianOperator::CoefficientVector -GaussianOperator::GenerateCoefficients() +auto +GaussianOperator::GenerateCoefficients() -> CoefficientVector { CoefficientVector coeff; double sum; diff --git a/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx b/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx index 26f7d638f9d..89058c2dc7c 100644 --- a/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkGaussianSpatialFunction.hxx @@ -33,8 +33,8 @@ GaussianSpatialFunction::GaussianSpatialFuncti } template -typename GaussianSpatialFunction::OutputType -GaussianSpatialFunction::Evaluate(const TInput & position) const +auto +GaussianSpatialFunction::Evaluate(const TInput & position) const -> OutputType { // We have to compute the Gaussian in several stages, because of the // n-dimensional generalization diff --git a/Modules/Core/Common/include/itkHeavisideStepFunction.hxx b/Modules/Core/Common/include/itkHeavisideStepFunction.hxx index 008a47c054c..58b6dce5d0c 100644 --- a/Modules/Core/Common/include/itkHeavisideStepFunction.hxx +++ b/Modules/Core/Common/include/itkHeavisideStepFunction.hxx @@ -29,16 +29,16 @@ HeavisideStepFunction::HeavisideStepFunction() {} template -typename HeavisideStepFunction::OutputType -HeavisideStepFunction::Evaluate(const InputType & input) const +auto +HeavisideStepFunction::Evaluate(const InputType & input) const -> OutputType { return (input >= NumericTraits::ZeroValue()) ? NumericTraits::OneValue() : NumericTraits::ZeroValue(); } template -typename HeavisideStepFunction::OutputType -HeavisideStepFunction::EvaluateDerivative(const InputType & input) const +auto +HeavisideStepFunction::EvaluateDerivative(const InputType & input) const -> OutputType { return (Math::ExactlyEquals(input, NumericTraits::ZeroValue())) ? NumericTraits::OneValue() : NumericTraits::ZeroValue(); diff --git a/Modules/Core/Common/include/itkHexahedronCell.hxx b/Modules/Core/Common/include/itkHexahedronCell.hxx index ca2aaf16a6b..c4b82849d90 100644 --- a/Modules/Core/Common/include/itkHexahedronCell.hxx +++ b/Modules/Core/Common/include/itkHexahedronCell.hxx @@ -71,8 +71,8 @@ HexahedronCell::GetNumberOfPoints() const * Get the number of boundary features of the given dimension. */ template -typename HexahedronCell::CellFeatureCount -HexahedronCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +HexahedronCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -192,8 +192,8 @@ HexahedronCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename HexahedronCell::PointIdIterator -HexahedronCell::PointIdsBegin() +auto +HexahedronCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -204,8 +204,8 @@ HexahedronCell::PointIdsBegin() * by the cell. */ template -typename HexahedronCell::PointIdConstIterator -HexahedronCell::PointIdsBegin() const +auto +HexahedronCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -215,8 +215,8 @@ HexahedronCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename HexahedronCell::PointIdIterator -HexahedronCell::PointIdsEnd() +auto +HexahedronCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -227,8 +227,8 @@ HexahedronCell::PointIdsEnd() * by the cell. */ template -typename HexahedronCell::PointIdConstIterator -HexahedronCell::PointIdsEnd() const +auto +HexahedronCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -238,8 +238,8 @@ HexahedronCell::PointIdsEnd() const * Get the number of vertices defining the hexahedron. */ template -typename HexahedronCell::CellFeatureCount -HexahedronCell::GetNumberOfVertices() const +auto +HexahedronCell::GetNumberOfVertices() const -> CellFeatureCount { return Self::NumberOfVertices; } @@ -249,8 +249,8 @@ HexahedronCell::GetNumberOfVertices() const * Get the number of edges defined for the hexahedron. */ template -typename HexahedronCell::CellFeatureCount -HexahedronCell::GetNumberOfEdges() const +auto +HexahedronCell::GetNumberOfEdges() const -> CellFeatureCount { return Self::NumberOfEdges; } @@ -260,8 +260,8 @@ HexahedronCell::GetNumberOfEdges() const * Get the number of faces defined for the hexahedron. */ template -typename HexahedronCell::CellFeatureCount -HexahedronCell::GetNumberOfFaces() const +auto +HexahedronCell::GetNumberOfFaces() const -> CellFeatureCount { return Self::NumberOfFaces; } diff --git a/Modules/Core/Common/include/itkImageKernelOperator.hxx b/Modules/Core/Common/include/itkImageKernelOperator.hxx index c40c4729217..fc6821ccea2 100644 --- a/Modules/Core/Common/include/itkImageKernelOperator.hxx +++ b/Modules/Core/Common/include/itkImageKernelOperator.hxx @@ -44,15 +44,15 @@ ImageKernelOperator::SetImageKernel(const ImageT } template -const typename ImageKernelOperator::ImageType * -ImageKernelOperator::GetImageKernel() const +auto +ImageKernelOperator::GetImageKernel() const -> const ImageType * { return m_ImageKernel; } template -typename ImageKernelOperator::CoefficientVector -ImageKernelOperator::GenerateCoefficients() +auto +ImageKernelOperator::GenerateCoefficients() -> CoefficientVector { // Check that the input image is fully buffered. if (m_ImageKernel->GetBufferedRegion() != m_ImageKernel->GetLargestPossibleRegion()) diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx index f6c74cd1e52..875e9f3014c 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithIndex.hxx @@ -56,8 +56,8 @@ ImageRandomConstIteratorWithIndex::SetNumberOfSamples(SizeValueType numb /** Set the number of samples to extract from the region */ template -typename ImageRandomConstIteratorWithIndex::SizeValueType -ImageRandomConstIteratorWithIndex::GetNumberOfSamples() const +auto +ImageRandomConstIteratorWithIndex::GetNumberOfSamples() const -> SizeValueType { return m_NumberOfSamplesRequested; } diff --git a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx index 1086df36dca..4e799509d25 100644 --- a/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomConstIteratorWithOnlyIndex.hxx @@ -56,8 +56,8 @@ ImageRandomConstIteratorWithOnlyIndex::SetNumberOfSamples(SizeValueType /** Set the number of samples to extract from the region */ template -typename ImageRandomConstIteratorWithOnlyIndex::SizeValueType -ImageRandomConstIteratorWithOnlyIndex::GetNumberOfSamples() const +auto +ImageRandomConstIteratorWithOnlyIndex::GetNumberOfSamples() const -> SizeValueType { return m_NumberOfSamplesRequested; } diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx index dda2f2e8974..27e947f9824 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.hxx @@ -87,8 +87,8 @@ ImageRandomNonRepeatingConstIteratorWithIndex::SetNumberOfSamples(SizeVa /** Set the number of samples to extract from the region */ template -typename ImageRandomNonRepeatingConstIteratorWithIndex::SizeValueType -ImageRandomNonRepeatingConstIteratorWithIndex::GetNumberOfSamples() const +auto +ImageRandomNonRepeatingConstIteratorWithIndex::GetNumberOfSamples() const -> SizeValueType { return m_NumberOfSamplesRequested; } diff --git a/Modules/Core/Common/include/itkImageRegion.hxx b/Modules/Core/Common/include/itkImageRegion.hxx index 9b8d5a89299..a8a2e8c67d8 100644 --- a/Modules/Core/Common/include/itkImageRegion.hxx +++ b/Modules/Core/Common/include/itkImageRegion.hxx @@ -33,8 +33,8 @@ namespace itk { template -typename ImageRegion::IndexType -ImageRegion::GetUpperIndex() const +auto +ImageRegion::GetUpperIndex() const -> IndexType { IndexType idx; for (unsigned int i = 0; i < VImageDimension; ++i) @@ -70,8 +70,8 @@ ImageRegion::ComputeOffsetTable(OffsetTableType offsetTable) co } template -typename ImageRegion::SizeValueType -ImageRegion::GetNumberOfPixels() const +auto +ImageRegion::GetNumberOfPixels() const -> SizeValueType { SizeValueType numPixels = 1; @@ -245,8 +245,8 @@ ImageRegion::Crop(const Self & region) } template -typename ImageRegion::SliceRegion -ImageRegion::Slice(const unsigned int dim) const +auto +ImageRegion::Slice(const unsigned int dim) const -> SliceRegion { if (dim >= VImageDimension) { diff --git a/Modules/Core/Common/include/itkImageSink.hxx b/Modules/Core/Common/include/itkImageSink.hxx index 1a9fa115622..d6159b52e67 100644 --- a/Modules/Core/Common/include/itkImageSink.hxx +++ b/Modules/Core/Common/include/itkImageSink.hxx @@ -47,16 +47,16 @@ ImageSink::SetInput(const InputImageType * input) template -const typename ImageSink::InputImageType * -ImageSink::GetInput() const +auto +ImageSink::GetInput() const -> const InputImageType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetPrimaryInput()); } template -const typename ImageSink::InputImageType * -ImageSink::GetInput(unsigned int idx) const +auto +ImageSink::GetInput(unsigned int idx) const -> const InputImageType * { const auto * in = dynamic_cast(this->ProcessObject::GetInput(idx)); @@ -69,8 +69,8 @@ ImageSink::GetInput(unsigned int idx) const template -const typename ImageSink::InputImageType * -ImageSink::GetInput(const DataObjectIdentifierType & key) const +auto +ImageSink::GetInput(const DataObjectIdentifierType & key) const -> const InputImageType * { const auto * in = dynamic_cast(this->ProcessObject::GetInput(key)); diff --git a/Modules/Core/Common/include/itkImageSource.hxx b/Modules/Core/Common/include/itkImageSource.hxx index 42681bb250f..c65b4c49adb 100644 --- a/Modules/Core/Common/include/itkImageSource.hxx +++ b/Modules/Core/Common/include/itkImageSource.hxx @@ -72,24 +72,24 @@ ImageSource::MakeOutput(const ProcessObject::DataObjectIdentifierT } template -typename ImageSource::OutputImageType * -ImageSource::GetOutput() +auto +ImageSource::GetOutput() -> OutputImageType * { // we assume that the first output is of the templated type return itkDynamicCastInDebugMode(this->GetPrimaryOutput()); } template -const typename ImageSource::OutputImageType * -ImageSource::GetOutput() const +auto +ImageSource::GetOutput() const -> const OutputImageType * { // we assume that the first output is of the templated type return itkDynamicCastInDebugMode(this->GetPrimaryOutput()); } template -typename ImageSource::OutputImageType * -ImageSource::GetOutput(unsigned int idx) +auto +ImageSource::GetOutput(unsigned int idx) -> OutputImageType * { auto * out = dynamic_cast(this->ProcessObject::GetOutput(idx)); diff --git a/Modules/Core/Common/include/itkImageToImageFilter.hxx b/Modules/Core/Common/include/itkImageToImageFilter.hxx index 918d2ab9cc7..1baf0d36291 100644 --- a/Modules/Core/Common/include/itkImageToImageFilter.hxx +++ b/Modules/Core/Common/include/itkImageToImageFilter.hxx @@ -64,16 +64,16 @@ ImageToImageFilter::SetInput(unsigned int index, cons template -const typename ImageToImageFilter::InputImageType * -ImageToImageFilter::GetInput() const +auto +ImageToImageFilter::GetInput() const -> const InputImageType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } template -const typename ImageToImageFilter::InputImageType * -ImageToImageFilter::GetInput(unsigned int idx) const +auto +ImageToImageFilter::GetInput(unsigned int idx) const -> const InputImageType * { const auto * in = dynamic_cast(this->ProcessObject::GetInput(idx)); diff --git a/Modules/Core/Common/include/itkLaplacianOperator.hxx b/Modules/Core/Common/include/itkLaplacianOperator.hxx index d4d291bcbb7..25dca0e2cfe 100644 --- a/Modules/Core/Common/include/itkLaplacianOperator.hxx +++ b/Modules/Core/Common/include/itkLaplacianOperator.hxx @@ -66,8 +66,8 @@ LaplacianOperator::Fill(const CoefficientVector } template -typename LaplacianOperator::CoefficientVector -LaplacianOperator::GenerateCoefficients() +auto +LaplacianOperator::GenerateCoefficients() -> CoefficientVector { unsigned int i, w; diff --git a/Modules/Core/Common/include/itkLineCell.hxx b/Modules/Core/Common/include/itkLineCell.hxx index 8ffaa99a20d..b9799af44de 100644 --- a/Modules/Core/Common/include/itkLineCell.hxx +++ b/Modules/Core/Common/include/itkLineCell.hxx @@ -59,8 +59,8 @@ LineCell::GetNumberOfPoints() const * Get the number of boundary entities of the given dimension. */ template -typename LineCell::CellFeatureCount -LineCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +LineCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -148,8 +148,8 @@ LineCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename LineCell::PointIdIterator -LineCell::PointIdsBegin() +auto +LineCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -160,8 +160,8 @@ LineCell::PointIdsBegin() * by the cell. */ template -typename LineCell::PointIdConstIterator -LineCell::PointIdsBegin() const +auto +LineCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -171,8 +171,8 @@ LineCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename LineCell::PointIdIterator -LineCell::PointIdsEnd() +auto +LineCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -183,8 +183,8 @@ LineCell::PointIdsEnd() * by the cell. */ template -typename LineCell::PointIdConstIterator -LineCell::PointIdsEnd() const +auto +LineCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -194,8 +194,8 @@ LineCell::PointIdsEnd() const * Get the number of vertices for this line. */ template -typename LineCell::CellFeatureCount -LineCell::GetNumberOfVertices() const +auto +LineCell::GetNumberOfVertices() const -> CellFeatureCount { return Self::NumberOfPoints; } diff --git a/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx b/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx index ab509d2c5d8..fa754a1fa7e 100644 --- a/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx +++ b/Modules/Core/Common/include/itkLoggerThreadWrapper.hxx @@ -81,8 +81,8 @@ LoggerThreadWrapper::SetDelay(DelayType delay) } template -typename LoggerThreadWrapper::DelayType -LoggerThreadWrapper::GetDelay() const +auto +LoggerThreadWrapper::GetDelay() const -> DelayType { this->m_Mutex.lock(); DelayType delay = this->m_Delay; diff --git a/Modules/Core/Common/include/itkMapContainer.hxx b/Modules/Core/Common/include/itkMapContainer.hxx index 132884668fd..b6b4155f00d 100644 --- a/Modules/Core/Common/include/itkMapContainer.hxx +++ b/Modules/Core/Common/include/itkMapContainer.hxx @@ -29,8 +29,8 @@ namespace itk * reference. */ template -typename MapContainer::Element & -MapContainer::ElementAt(ElementIdentifier id) +auto +MapContainer::ElementAt(ElementIdentifier id) -> Element & { this->Modified(); return this->MapType::operator[](id); @@ -41,8 +41,8 @@ MapContainer::ElementAt(ElementIdentifier id) * */ template -const typename MapContainer::Element & -MapContainer::ElementAt(ElementIdentifier id) const +auto +MapContainer::ElementAt(ElementIdentifier id) const -> const Element & { return this->MapType::find(id)->second; } @@ -55,8 +55,8 @@ MapContainer::ElementAt(ElementIdentifier id) cons * reference. */ template -typename MapContainer::Element & -MapContainer::CreateElementAt(ElementIdentifier id) +auto +MapContainer::CreateElementAt(ElementIdentifier id) -> Element & { this->Modified(); return this->MapType::operator[](id); @@ -67,8 +67,8 @@ MapContainer::CreateElementAt(ElementIdentifier id * existence performed. */ template -typename MapContainer::Element -MapContainer::GetElement(ElementIdentifier id) const +auto +MapContainer::GetElement(ElementIdentifier id) const -> Element { return this->MapType::find(id)->second; } @@ -158,8 +158,8 @@ MapContainer::DeleteIndex(ElementIdentifier id) * Get a begin const iterator for the map. */ template -typename MapContainer::ConstIterator -MapContainer::Begin() const +auto +MapContainer::Begin() const -> ConstIterator { return ConstIterator(this->MapType::begin()); } @@ -168,8 +168,8 @@ MapContainer::Begin() const * Get an end const iterator for the map. */ template -typename MapContainer::ConstIterator -MapContainer::End() const +auto +MapContainer::End() const -> ConstIterator { return ConstIterator(this->MapType::end()); } @@ -178,8 +178,8 @@ MapContainer::End() const * Get a begin const iterator for the map. */ template -typename MapContainer::Iterator -MapContainer::Begin() +auto +MapContainer::Begin() -> Iterator { return Iterator(this->MapType::begin()); } @@ -188,8 +188,8 @@ MapContainer::Begin() * Get an end const iterator for the map. */ template -typename MapContainer::Iterator -MapContainer::End() +auto +MapContainer::End() -> Iterator { return Iterator(this->MapType::end()); } @@ -198,8 +198,8 @@ MapContainer::End() * Get the number of elements currently stored in the map. */ template -typename MapContainer::ElementIdentifier -MapContainer::Size() const +auto +MapContainer::Size() const -> ElementIdentifier { return static_cast(this->MapType::size()); } diff --git a/Modules/Core/Common/include/itkNeighborhood.hxx b/Modules/Core/Common/include/itkNeighborhood.hxx index 1ad9e338f64..41418773736 100644 --- a/Modules/Core/Common/include/itkNeighborhood.hxx +++ b/Modules/Core/Common/include/itkNeighborhood.hxx @@ -137,8 +137,8 @@ Neighborhood::GetSlice(unsigned int d) const } template -typename Neighborhood::NeighborIndexType -Neighborhood::GetNeighborhoodIndex(const OffsetType & o) const +auto +Neighborhood::GetNeighborhoodIndex(const OffsetType & o) const -> NeighborIndexType { unsigned int idx = (this->Size() / 2); diff --git a/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx b/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx index 75aec3324fb..a4040dfbc72 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx +++ b/Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx @@ -166,8 +166,9 @@ ImageBoundaryFacesCalculator::Compute(const TImage & img, RegionType reg template -typename ImageBoundaryFacesCalculator::FaceListType +auto ImageBoundaryFacesCalculator::operator()(const TImage * img, RegionType regionToProcess, RadiusType radius) + -> FaceListType { const auto result = Compute(*img, regionToProcess, radius); @@ -185,8 +186,8 @@ ImageBoundaryFacesCalculator::operator()(const TImage * img, RegionType template -typename CalculateOutputWrapOffsetModifiers::OffsetType -CalculateOutputWrapOffsetModifiers::operator()(TImage * input, TImage * output) const +auto +CalculateOutputWrapOffsetModifiers::operator()(TImage * input, TImage * output) const -> OffsetType { OffsetType ans; diff --git a/Modules/Core/Common/include/itkObjectStore.hxx b/Modules/Core/Common/include/itkObjectStore.hxx index 7bcb916d706..8b4a773d077 100644 --- a/Modules/Core/Common/include/itkObjectStore.hxx +++ b/Modules/Core/Common/include/itkObjectStore.hxx @@ -60,8 +60,8 @@ ObjectStore::Reserve(SizeValueType n) } template -typename ObjectStore::ObjectType * -ObjectStore::Borrow() +auto +ObjectStore::Borrow() -> ObjectType * { ObjectType * p; diff --git a/Modules/Core/Common/include/itkOctree.hxx b/Modules/Core/Common/include/itkOctree.hxx index a1fbd0cb4e8..4296b8cb55e 100644 --- a/Modules/Core/Common/include/itkOctree.hxx +++ b/Modules/Core/Common/include/itkOctree.hxx @@ -257,8 +257,8 @@ Octree::BuildFromImage(ImageType * } template -typename Octree::ImageTypePointer -Octree::GetImage() +auto +Octree::GetImage() -> ImageTypePointer { typename ImageType::SizeType imageSize = { { 0, 0, 0 } }; SizeValueType sizes[3]; diff --git a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx index 83671cfae51..df58bf08777 100644 --- a/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx +++ b/Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx @@ -180,8 +180,9 @@ PeriodicBoundaryCondition::GetInputRequestedRegion( template -typename PeriodicBoundaryCondition::OutputPixelType +auto PeriodicBoundaryCondition::GetPixel(const IndexType & index, const TInputImage * image) const + -> OutputPixelType { RegionType imageRegion = image->GetLargestPossibleRegion(); IndexType imageIndex = imageRegion.GetIndex(); diff --git a/Modules/Core/Common/include/itkPoint.hxx b/Modules/Core/Common/include/itkPoint.hxx index c07441cad61..152ed038153 100644 --- a/Modules/Core/Common/include/itkPoint.hxx +++ b/Modules/Core/Common/include/itkPoint.hxx @@ -136,8 +136,8 @@ Point::GetVnlVector() const } template -typename Point::VectorType -Point::GetVectorFromOrigin() const +auto +Point::GetVectorFromOrigin() const -> VectorType { // VectorType knows how to construct from ValueType*. return &(*this)[0]; diff --git a/Modules/Core/Common/include/itkPointSet.hxx b/Modules/Core/Common/include/itkPointSet.hxx index a242e6ca19c..38ee5ecb1f7 100644 --- a/Modules/Core/Common/include/itkPointSet.hxx +++ b/Modules/Core/Common/include/itkPointSet.hxx @@ -71,8 +71,8 @@ PointSet::SetPoints(PointsContainer * point * Access routine to get the points container. */ template -typename PointSet::PointsContainer * -PointSet::GetPoints() +auto +PointSet::GetPoints() -> PointsContainer * { itkDebugMacro("Starting GetPoints()"); if (!m_PointsContainer) @@ -87,8 +87,8 @@ PointSet::GetPoints() * Access routine to get the points container. */ template -const typename PointSet::PointsContainer * -PointSet::GetPoints() const +auto +PointSet::GetPoints() const -> const PointsContainer * { itkDebugMacro("returning Points container of " << m_PointsContainer); return m_PointsContainer.GetPointer(); @@ -113,8 +113,8 @@ PointSet::SetPointData(PointDataContainer * * Access routine to get the point data container. */ template -typename PointSet::PointDataContainer * -PointSet::GetPointData() +auto +PointSet::GetPointData() -> PointDataContainer * { if (!m_PointDataContainer) { @@ -128,8 +128,8 @@ PointSet::GetPointData() * Access routine to get the point data container. */ template -const typename PointSet::PointDataContainer * -PointSet::GetPointData() const +auto +PointSet::GetPointData() const -> const PointDataContainer * { itkDebugMacro("returning PointData container of " << m_PointDataContainer); return m_PointDataContainer.GetPointer(); @@ -183,8 +183,8 @@ PointSet::GetPoint(PointIdentifier ptId, Po } template -typename PointSet::PointType -PointSet::GetPoint(PointIdentifier ptId) const +auto +PointSet::GetPoint(PointIdentifier ptId) const -> PointType { /** * If the points container doesn't exist, then the point doesn't either. @@ -270,8 +270,8 @@ PointSet::PassStructure(Self *) * Get the number of points in the PointsContainer. */ template -typename PointSet::PointIdentifier -PointSet::GetNumberOfPoints() const +auto +PointSet::GetNumberOfPoints() const -> PointIdentifier { if (m_PointsContainer) { diff --git a/Modules/Core/Common/include/itkPointSetToImageFilter.hxx b/Modules/Core/Common/include/itkPointSetToImageFilter.hxx index 6e329ceefd0..06d5956e75b 100644 --- a/Modules/Core/Common/include/itkPointSetToImageFilter.hxx +++ b/Modules/Core/Common/include/itkPointSetToImageFilter.hxx @@ -59,16 +59,16 @@ PointSetToImageFilter::SetInput(unsigned int index /** Get the input point-set */ template -const typename PointSetToImageFilter::InputPointSetType * -PointSetToImageFilter::GetInput() +auto +PointSetToImageFilter::GetInput() -> const InputPointSetType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } /** Get the input point-set */ template -const typename PointSetToImageFilter::InputPointSetType * -PointSetToImageFilter::GetInput(unsigned int idx) +auto +PointSetToImageFilter::GetInput(unsigned int idx) -> const InputPointSetType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Core/Common/include/itkPolygonCell.hxx b/Modules/Core/Common/include/itkPolygonCell.hxx index 7f890888e05..60d6fcea94a 100644 --- a/Modules/Core/Common/include/itkPolygonCell.hxx +++ b/Modules/Core/Common/include/itkPolygonCell.hxx @@ -80,8 +80,8 @@ PolygonCell::GetNumberOfPoints() const * Get the number of boundary features of the given dimension. */ template -typename PolygonCell::CellFeatureCount -PolygonCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +PolygonCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -275,8 +275,8 @@ PolygonCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename PolygonCell::PointIdIterator -PolygonCell::PointIdsBegin() +auto +PolygonCell::PointIdsBegin() -> PointIdIterator { if (!m_PointIds.empty()) { @@ -294,8 +294,8 @@ PolygonCell::PointIdsBegin() * by the cell. */ template -typename PolygonCell::PointIdConstIterator -PolygonCell::PointIdsBegin() const +auto +PolygonCell::PointIdsBegin() const -> PointIdConstIterator { if (!m_PointIds.empty()) { @@ -312,8 +312,8 @@ PolygonCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename PolygonCell::PointIdIterator -PolygonCell::PointIdsEnd() +auto +PolygonCell::PointIdsEnd() -> PointIdIterator { if (!m_PointIds.empty()) { @@ -331,8 +331,8 @@ PolygonCell::PointIdsEnd() * by the cell. */ template -typename PolygonCell::PointIdConstIterator -PolygonCell::PointIdsEnd() const +auto +PolygonCell::PointIdsEnd() const -> PointIdConstIterator { if (!m_PointIds.empty()) { @@ -349,8 +349,8 @@ PolygonCell::PointIdsEnd() const * Get the number of vertices defining the Polygon. */ template -typename PolygonCell::CellFeatureCount -PolygonCell::GetNumberOfVertices() const +auto +PolygonCell::GetNumberOfVertices() const -> CellFeatureCount { return static_cast(m_PointIds.size()); } @@ -360,8 +360,8 @@ PolygonCell::GetNumberOfVertices() const * Get the number of edges defined for the Polygon. */ template -typename PolygonCell::CellFeatureCount -PolygonCell::GetNumberOfEdges() const +auto +PolygonCell::GetNumberOfEdges() const -> CellFeatureCount { return static_cast(m_Edges.size()); } diff --git a/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx b/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx index e530d40946d..9670938e485 100644 --- a/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx +++ b/Modules/Core/Common/include/itkQuadraticEdgeCell.hxx @@ -59,8 +59,8 @@ QuadraticEdgeCell::GetNumberOfPoints() const * Get the number of boundary entities of the given dimension. */ template -typename QuadraticEdgeCell::CellFeatureCount -QuadraticEdgeCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +QuadraticEdgeCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -156,8 +156,8 @@ QuadraticEdgeCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename QuadraticEdgeCell::PointIdIterator -QuadraticEdgeCell::PointIdsBegin() +auto +QuadraticEdgeCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -168,8 +168,8 @@ QuadraticEdgeCell::PointIdsBegin() * by the cell. */ template -typename QuadraticEdgeCell::PointIdConstIterator -QuadraticEdgeCell::PointIdsBegin() const +auto +QuadraticEdgeCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -179,8 +179,8 @@ QuadraticEdgeCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename QuadraticEdgeCell::PointIdIterator -QuadraticEdgeCell::PointIdsEnd() +auto +QuadraticEdgeCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -191,8 +191,8 @@ QuadraticEdgeCell::PointIdsEnd() * by the cell. */ template -typename QuadraticEdgeCell::PointIdConstIterator -QuadraticEdgeCell::PointIdsEnd() const +auto +QuadraticEdgeCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -202,8 +202,8 @@ QuadraticEdgeCell::PointIdsEnd() const * Get the number of vertices for this line. */ template -typename QuadraticEdgeCell::CellFeatureCount -QuadraticEdgeCell::GetNumberOfVertices() const +auto +QuadraticEdgeCell::GetNumberOfVertices() const -> CellFeatureCount { return Self::NumberOfVertices; } diff --git a/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx b/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx index e767ce243e6..eb8f306a2e0 100644 --- a/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx +++ b/Modules/Core/Common/include/itkQuadraticTriangleCell.hxx @@ -59,8 +59,8 @@ QuadraticTriangleCell::GetNumberOfPoints() const * Get the number of boundary features of the given dimension. */ template -typename QuadraticTriangleCell::CellFeatureCount -QuadraticTriangleCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +QuadraticTriangleCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -168,8 +168,8 @@ QuadraticTriangleCell::SetPointId(int localId, PointIdentifier p * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename QuadraticTriangleCell::PointIdIterator -QuadraticTriangleCell::PointIdsBegin() +auto +QuadraticTriangleCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -180,8 +180,8 @@ QuadraticTriangleCell::PointIdsBegin() * by the cell. */ template -typename QuadraticTriangleCell::PointIdConstIterator -QuadraticTriangleCell::PointIdsBegin() const +auto +QuadraticTriangleCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -191,8 +191,8 @@ QuadraticTriangleCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename QuadraticTriangleCell::PointIdIterator -QuadraticTriangleCell::PointIdsEnd() +auto +QuadraticTriangleCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -203,8 +203,8 @@ QuadraticTriangleCell::PointIdsEnd() * by the cell. */ template -typename QuadraticTriangleCell::PointIdConstIterator -QuadraticTriangleCell::PointIdsEnd() const +auto +QuadraticTriangleCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -214,8 +214,8 @@ QuadraticTriangleCell::PointIdsEnd() const * Get the number of vertices defining the triangle. */ template -typename QuadraticTriangleCell::CellFeatureCount -QuadraticTriangleCell::GetNumberOfVertices() const +auto +QuadraticTriangleCell::GetNumberOfVertices() const -> CellFeatureCount { return Self::NumberOfVertices; } @@ -225,8 +225,8 @@ QuadraticTriangleCell::GetNumberOfVertices() const * Get the number of edges defined for the triangle. */ template -typename QuadraticTriangleCell::CellFeatureCount -QuadraticTriangleCell::GetNumberOfEdges() const +auto +QuadraticTriangleCell::GetNumberOfEdges() const -> CellFeatureCount { return Self::NumberOfEdges; } diff --git a/Modules/Core/Common/include/itkQuadrilateralCell.hxx b/Modules/Core/Common/include/itkQuadrilateralCell.hxx index 65de0dd86b3..86e8ee99121 100644 --- a/Modules/Core/Common/include/itkQuadrilateralCell.hxx +++ b/Modules/Core/Common/include/itkQuadrilateralCell.hxx @@ -61,8 +61,8 @@ QuadrilateralCell::GetNumberOfPoints() const * Get the number of boundary features of the given dimension. */ template -typename QuadrilateralCell::CellFeatureCount -QuadrilateralCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +QuadrilateralCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -170,8 +170,8 @@ QuadrilateralCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename QuadrilateralCell::PointIdIterator -QuadrilateralCell::PointIdsBegin() +auto +QuadrilateralCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -182,8 +182,8 @@ QuadrilateralCell::PointIdsBegin() * by the cell. */ template -typename QuadrilateralCell::PointIdConstIterator -QuadrilateralCell::PointIdsBegin() const +auto +QuadrilateralCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -193,8 +193,8 @@ QuadrilateralCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename QuadrilateralCell::PointIdIterator -QuadrilateralCell::PointIdsEnd() +auto +QuadrilateralCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -205,8 +205,8 @@ QuadrilateralCell::PointIdsEnd() * by the cell. */ template -typename QuadrilateralCell::PointIdConstIterator -QuadrilateralCell::PointIdsEnd() const +auto +QuadrilateralCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -216,8 +216,8 @@ QuadrilateralCell::PointIdsEnd() const * Get the number of vertices defining the quadrilateral. */ template -typename QuadrilateralCell::CellFeatureCount -QuadrilateralCell::GetNumberOfVertices() const +auto +QuadrilateralCell::GetNumberOfVertices() const -> CellFeatureCount { return NumberOfVertices; } @@ -227,8 +227,8 @@ QuadrilateralCell::GetNumberOfVertices() const * Get the number of edges defined for the quadrilateral. */ template -typename QuadrilateralCell::CellFeatureCount -QuadrilateralCell::GetNumberOfEdges() const +auto +QuadrilateralCell::GetNumberOfEdges() const -> CellFeatureCount { return Self::NumberOfEdges; } diff --git a/Modules/Core/Common/include/itkRGBAPixel.hxx b/Modules/Core/Common/include/itkRGBAPixel.hxx index cf89409e89b..4222e24900c 100644 --- a/Modules/Core/Common/include/itkRGBAPixel.hxx +++ b/Modules/Core/Common/include/itkRGBAPixel.hxx @@ -150,8 +150,8 @@ RGBAPixel::operator<(const Self & r) const } template -typename RGBAPixel::LuminanceType -RGBAPixel::GetLuminance() const +auto +RGBAPixel::GetLuminance() const -> LuminanceType { const LuminanceType luminance = 0.30 * static_cast(this->GetRed()) + 0.59 * static_cast(this->GetGreen()) + diff --git a/Modules/Core/Common/include/itkRGBPixel.hxx b/Modules/Core/Common/include/itkRGBPixel.hxx index 481f1a12c47..25f9409d3bc 100644 --- a/Modules/Core/Common/include/itkRGBPixel.hxx +++ b/Modules/Core/Common/include/itkRGBPixel.hxx @@ -150,8 +150,8 @@ RGBPixel::operator<(const Self & r) const } template -typename RGBPixel::LuminanceType -RGBPixel::GetLuminance() const +auto +RGBPixel::GetLuminance() const -> LuminanceType { const LuminanceType luminance = 0.30 * static_cast(this->GetRed()) + 0.59 * static_cast(this->GetGreen()) + diff --git a/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx b/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx index 1aca42a2d98..bd6e3501504 100644 --- a/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx +++ b/Modules/Core/Common/include/itkSinRegularizedHeavisideStepFunction.hxx @@ -24,8 +24,8 @@ namespace itk { template -typename SinRegularizedHeavisideStepFunction::OutputType -SinRegularizedHeavisideStepFunction::Evaluate(const InputType & input) const +auto +SinRegularizedHeavisideStepFunction::Evaluate(const InputType & input) const -> OutputType { if (static_cast(input) >= this->GetEpsilon()) { @@ -48,8 +48,8 @@ SinRegularizedHeavisideStepFunction::Evaluate(const InputType & } template -typename SinRegularizedHeavisideStepFunction::OutputType -SinRegularizedHeavisideStepFunction::EvaluateDerivative(const InputType & input) const +auto +SinRegularizedHeavisideStepFunction::EvaluateDerivative(const InputType & input) const -> OutputType { if (itk::Math::abs(static_cast(input)) >= this->GetEpsilon()) { diff --git a/Modules/Core/Common/include/itkSmapsFileParser.hxx b/Modules/Core/Common/include/itkSmapsFileParser.hxx index 8e59ae3c179..2587b8fa9a0 100644 --- a/Modules/Core/Common/include/itkSmapsFileParser.hxx +++ b/Modules/Core/Common/include/itkSmapsFileParser.hxx @@ -43,8 +43,8 @@ MapFileParser::Update() } template -typename MapFileParser::MemoryLoadType -MapFileParser::GetHeapUsage() +auto +MapFileParser::GetHeapUsage() -> MemoryLoadType { if (m_MapData.Empty()) { @@ -54,8 +54,8 @@ MapFileParser::GetHeapUsage() } template -typename MapFileParser::MemoryLoadType -MapFileParser::GetStackUsage() +auto +MapFileParser::GetStackUsage() -> MemoryLoadType { if (m_MapData.Empty()) { @@ -65,8 +65,8 @@ MapFileParser::GetStackUsage() } template -typename MapFileParser::MemoryLoadType -MapFileParser::GetTotalMemoryUsage() +auto +MapFileParser::GetTotalMemoryUsage() -> MemoryLoadType { if (m_MapData.Empty()) { @@ -76,8 +76,8 @@ MapFileParser::GetTotalMemoryUsage() } template -typename MapFileParser::MemoryLoadType -MapFileParser::GetMemoryUsage(const char * filter, const char * token) +auto +MapFileParser::GetMemoryUsage(const char * filter, const char * token) -> MemoryLoadType { if (m_MapData.Empty()) { diff --git a/Modules/Core/Common/include/itkSobelOperator.hxx b/Modules/Core/Common/include/itkSobelOperator.hxx index 4e500883494..97ecc0ee72c 100644 --- a/Modules/Core/Common/include/itkSobelOperator.hxx +++ b/Modules/Core/Common/include/itkSobelOperator.hxx @@ -74,8 +74,8 @@ SobelOperator::Fill(const CoefficientVector & co } template -typename SobelOperator::CoefficientVector -SobelOperator::GenerateCoefficients() +auto +SobelOperator::GenerateCoefficients() -> CoefficientVector { std::vector coeff; if (VDimension == 2 && this->GetDirection() == 0) diff --git a/Modules/Core/Common/include/itkSparseFieldLayer.hxx b/Modules/Core/Common/include/itkSparseFieldLayer.hxx index 1e7eb76fbd7..47ba8a5d71c 100644 --- a/Modules/Core/Common/include/itkSparseFieldLayer.hxx +++ b/Modules/Core/Common/include/itkSparseFieldLayer.hxx @@ -55,8 +55,8 @@ SparseFieldLayer::Size() const } template -typename SparseFieldLayer::RegionListType -SparseFieldLayer::SplitRegions(int num) const +auto +SparseFieldLayer::SplitRegions(int num) const -> RegionListType { std::vector regionlist; unsigned int size, regionsize; diff --git a/Modules/Core/Common/include/itkSphereSpatialFunction.hxx b/Modules/Core/Common/include/itkSphereSpatialFunction.hxx index 2302f35c2cc..d886fc8c544 100644 --- a/Modules/Core/Common/include/itkSphereSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkSphereSpatialFunction.hxx @@ -31,8 +31,8 @@ SphereSpatialFunction::SphereSpatialFunction() } template -typename SphereSpatialFunction::OutputType -SphereSpatialFunction::Evaluate(const InputType & position) const +auto +SphereSpatialFunction::Evaluate(const InputType & position) const -> OutputType { double acc = 0; diff --git a/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx b/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx index b4afcc456fc..4232d0e60ac 100644 --- a/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkSymmetricEllipsoidInteriorExteriorSpatialFunction.hxx @@ -32,8 +32,9 @@ SymmetricEllipsoidInteriorExteriorSpatialFunction -typename SymmetricEllipsoidInteriorExteriorSpatialFunction::OutputType +auto SymmetricEllipsoidInteriorExteriorSpatialFunction::Evaluate(const InputType & position) const + -> OutputType { double uniqueTerm; // Term in ellipsoid equation for unique axis double symmetricTerm; // Term in ellipsoid equation for symmetric axes diff --git a/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx b/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx index daee9257b81..e24b9fd1ed3 100644 --- a/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx +++ b/Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx @@ -168,8 +168,8 @@ SymmetricSecondRankTensor::operator/(const RealValueType & r) con * Matrix notation access to elements */ template -const typename SymmetricSecondRankTensor::ValueType & -SymmetricSecondRankTensor::operator()(unsigned int row, unsigned int col) const +auto +SymmetricSecondRankTensor::operator()(unsigned int row, unsigned int col) const -> const ValueType & { unsigned int k; @@ -194,8 +194,8 @@ SymmetricSecondRankTensor::operator()(unsigned int row, unsigned * Matrix notation access to elements */ template -typename SymmetricSecondRankTensor::ValueType & -SymmetricSecondRankTensor::operator()(unsigned int row, unsigned int col) +auto +SymmetricSecondRankTensor::operator()(unsigned int row, unsigned int col) -> ValueType & { unsigned int k; @@ -235,8 +235,8 @@ SymmetricSecondRankTensor::SetIdentity() * Get the Trace */ template -typename SymmetricSecondRankTensor::AccumulateValueType -SymmetricSecondRankTensor::GetTrace() const +auto +SymmetricSecondRankTensor::GetTrace() const -> AccumulateValueType { AccumulateValueType trace = NumericTraits::ZeroValue(); unsigned int k = 0; @@ -340,8 +340,8 @@ SymmetricSecondRankTensor::Rotate(const Matrix -typename SymmetricSecondRankTensor::MatrixType -SymmetricSecondRankTensor::PreMultiply(const MatrixType & m) const +auto +SymmetricSecondRankTensor::PreMultiply(const MatrixType & m) const -> MatrixType { MatrixType result; @@ -365,8 +365,8 @@ SymmetricSecondRankTensor::PreMultiply(const MatrixType & m) cons * Post-multiply the Tensor by a Matrix */ template -typename SymmetricSecondRankTensor::MatrixType -SymmetricSecondRankTensor::PostMultiply(const MatrixType & m) const +auto +SymmetricSecondRankTensor::PostMultiply(const MatrixType & m) const -> MatrixType { MatrixType result; diff --git a/Modules/Core/Common/include/itkTetrahedronCell.hxx b/Modules/Core/Common/include/itkTetrahedronCell.hxx index c5850ec5a2a..e81548258f2 100644 --- a/Modules/Core/Common/include/itkTetrahedronCell.hxx +++ b/Modules/Core/Common/include/itkTetrahedronCell.hxx @@ -60,8 +60,8 @@ TetrahedronCell::GetNumberOfPoints() const * Get the number of boundary features of the given dimension. */ template -typename TetrahedronCell::CellFeatureCount -TetrahedronCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +TetrahedronCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -324,8 +324,8 @@ TetrahedronCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename TetrahedronCell::PointIdIterator -TetrahedronCell::PointIdsBegin() +auto +TetrahedronCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -336,8 +336,8 @@ TetrahedronCell::PointIdsBegin() * by the cell. */ template -typename TetrahedronCell::PointIdConstIterator -TetrahedronCell::PointIdsBegin() const +auto +TetrahedronCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -347,8 +347,8 @@ TetrahedronCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename TetrahedronCell::PointIdIterator -TetrahedronCell::PointIdsEnd() +auto +TetrahedronCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -359,8 +359,8 @@ TetrahedronCell::PointIdsEnd() * by the cell. */ template -typename TetrahedronCell::PointIdConstIterator -TetrahedronCell::PointIdsEnd() const +auto +TetrahedronCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -370,8 +370,8 @@ TetrahedronCell::PointIdsEnd() const * Get the number of vertices defining the tetrahedron. */ template -typename TetrahedronCell::CellFeatureCount -TetrahedronCell::GetNumberOfVertices() const +auto +TetrahedronCell::GetNumberOfVertices() const -> CellFeatureCount { return Self::NumberOfVertices; } @@ -381,8 +381,8 @@ TetrahedronCell::GetNumberOfVertices() const * Get the number of edges defined for the tetrahedron. */ template -typename TetrahedronCell::CellFeatureCount -TetrahedronCell::GetNumberOfEdges() const +auto +TetrahedronCell::GetNumberOfEdges() const -> CellFeatureCount { return Self::NumberOfEdges; } @@ -392,8 +392,8 @@ TetrahedronCell::GetNumberOfEdges() const * Get the number of faces defined for the tetrahedron. */ template -typename TetrahedronCell::CellFeatureCount -TetrahedronCell::GetNumberOfFaces() const +auto +TetrahedronCell::GetNumberOfFaces() const -> CellFeatureCount { return Self::NumberOfFaces; } diff --git a/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx b/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx index 843f725f21f..be40dabac73 100644 --- a/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx +++ b/Modules/Core/Common/include/itkTorusInteriorExteriorSpatialFunction.hxx @@ -30,8 +30,8 @@ TorusInteriorExteriorSpatialFunction::TorusInteriorExteriorS } template -typename TorusInteriorExteriorSpatialFunction::OutputType -TorusInteriorExteriorSpatialFunction::Evaluate(const InputType & position) const +auto +TorusInteriorExteriorSpatialFunction::Evaluate(const InputType & position) const -> OutputType { double x = position[0] - m_Origin[0]; double y = position[1] - m_Origin[1]; diff --git a/Modules/Core/Common/include/itkTriangleCell.hxx b/Modules/Core/Common/include/itkTriangleCell.hxx index 3db3ffe9332..458b873d307 100644 --- a/Modules/Core/Common/include/itkTriangleCell.hxx +++ b/Modules/Core/Common/include/itkTriangleCell.hxx @@ -60,8 +60,8 @@ TriangleCell::GetNumberOfPoints() const * Get the number of boundary features of the given dimension. */ template -typename TriangleCell::CellFeatureCount -TriangleCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +TriangleCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -169,8 +169,8 @@ TriangleCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the cell. */ template -typename TriangleCell::PointIdIterator -TriangleCell::PointIdsBegin() +auto +TriangleCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -181,8 +181,8 @@ TriangleCell::PointIdsBegin() * by the cell. */ template -typename TriangleCell::PointIdConstIterator -TriangleCell::PointIdsBegin() const +auto +TriangleCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -192,8 +192,8 @@ TriangleCell::PointIdsBegin() const * Get an end iterator to the list of point identifiers used by the cell. */ template -typename TriangleCell::PointIdIterator -TriangleCell::PointIdsEnd() +auto +TriangleCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -204,8 +204,8 @@ TriangleCell::PointIdsEnd() * by the cell. */ template -typename TriangleCell::PointIdConstIterator -TriangleCell::PointIdsEnd() const +auto +TriangleCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -215,8 +215,8 @@ TriangleCell::PointIdsEnd() const * Get the number of vertices defining the triangle. */ template -typename TriangleCell::CellFeatureCount -TriangleCell::GetNumberOfVertices() const +auto +TriangleCell::GetNumberOfVertices() const -> CellFeatureCount { return Self::NumberOfVertices; } @@ -226,8 +226,8 @@ TriangleCell::GetNumberOfVertices() const * Get the number of edges defined for the triangle. */ template -typename TriangleCell::CellFeatureCount -TriangleCell::GetNumberOfEdges() const +auto +TriangleCell::GetNumberOfEdges() const -> CellFeatureCount { return Self::NumberOfEdges; } @@ -348,8 +348,8 @@ TriangleCell::DistanceToLine(PointType x, } template -typename TriangleCell::CoordRepType -TriangleCell::ComputeArea(PointsContainer * iPoints) +auto +TriangleCell::ComputeArea(PointsContainer * iPoints) -> CoordRepType { PointType p[3]; @@ -367,8 +367,8 @@ TriangleCell::ComputeArea(PointsContainer * iPoints) } template -typename TriangleCell::PointType -TriangleCell::ComputeBarycenter(CoordRepType * iWeights, PointsContainer * iPoints) +auto +TriangleCell::ComputeBarycenter(CoordRepType * iWeights, PointsContainer * iPoints) -> PointType { PointType p[3]; CoordRepType sum_weights(0.); @@ -398,16 +398,16 @@ TriangleCell::ComputeBarycenter(CoordRepType * iWeights, PointsC } template -typename TriangleCell::PointType -TriangleCell::ComputeCenterOfGravity(PointsContainer * iPoints) +auto +TriangleCell::ComputeCenterOfGravity(PointsContainer * iPoints) -> PointType { std::vector weights(3, 1. / 3.); return ComputeBarycenter(&weights[0], iPoints); } template -typename TriangleCell::PointType -TriangleCell::ComputeCircumCenter(PointsContainer * iPoints) +auto +TriangleCell::ComputeCircumCenter(PointsContainer * iPoints) -> PointType { std::vector weights(3, 0.); diff --git a/Modules/Core/Common/include/itkTriangleHelper.hxx b/Modules/Core/Common/include/itkTriangleHelper.hxx index 4c7a706b165..22574979c3a 100644 --- a/Modules/Core/Common/include/itkTriangleHelper.hxx +++ b/Modules/Core/Common/include/itkTriangleHelper.hxx @@ -56,8 +56,8 @@ TriangleHelper::IsObtuse(const PointType & iA, const PointType & iB, con } template -typename TriangleHelper::VectorType -TriangleHelper::ComputeNormal(const PointType & iA, const PointType & iB, const PointType & iC) +auto +TriangleHelper::ComputeNormal(const PointType & iA, const PointType & iB, const PointType & iC) -> VectorType { CrossVectorType cross; VectorType w = cross(iB - iA, iC - iA); @@ -72,8 +72,8 @@ TriangleHelper::ComputeNormal(const PointType & iA, const PointType & iB } template -typename TriangleHelper::CoordRepType -TriangleHelper::Cotangent(const PointType & iA, const PointType & iB, const PointType & iC) +auto +TriangleHelper::Cotangent(const PointType & iA, const PointType & iB, const PointType & iC) -> CoordRepType { VectorType v21 = iA - iB; @@ -132,8 +132,9 @@ TriangleHelper::ComputeBarycenter(const CoordRepType & iA1, } template -typename TriangleHelper::CoordRepType +auto TriangleHelper::ComputeAngle(const PointType & iP1, const PointType & iP2, const PointType & iP3) + -> CoordRepType { VectorType v21 = iP1 - iP2; VectorType v23 = iP3 - iP2; @@ -158,15 +159,17 @@ TriangleHelper::ComputeAngle(const PointType & iP1, const PointType & iP } template -typename TriangleHelper::PointType +auto TriangleHelper::ComputeGravityCenter(const PointType & iP1, const PointType & iP2, const PointType & iP3) + -> PointType { return ComputeBarycenter(1., iP1, 1., iP2, 1., iP3); } template -typename TriangleHelper::PointType +auto TriangleHelper::ComputeCircumCenter(const PointType & iP1, const PointType & iP2, const PointType & iP3) + -> PointType { PointType oPt; @@ -208,8 +211,8 @@ TriangleHelper::ComputeConstrainedCircumCenter(const PointType & iP1, } template -typename TriangleHelper::CoordRepType -TriangleHelper::ComputeArea(const PointType & iP1, const PointType & iP2, const PointType & iP3) +auto +TriangleHelper::ComputeArea(const PointType & iP1, const PointType & iP2, const PointType & iP3) -> CoordRepType { CoordRepType a = iP2.EuclideanDistanceTo(iP3); CoordRepType b = iP1.EuclideanDistanceTo(iP3); @@ -221,8 +224,9 @@ TriangleHelper::ComputeArea(const PointType & iP1, const PointType & iP2 } template -typename TriangleHelper::CoordRepType +auto TriangleHelper::ComputeMixedArea(const PointType & iP1, const PointType & iP2, const PointType & iP3) + -> CoordRepType { using TriangleType = TriangleHelper; diff --git a/Modules/Core/Common/include/itkVariableLengthVector.hxx b/Modules/Core/Common/include/itkVariableLengthVector.hxx index 3a5ea935489..95f3134b4ab 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.hxx +++ b/Modules/Core/Common/include/itkVariableLengthVector.hxx @@ -411,8 +411,8 @@ VariableLengthVector::operator==(const Self & v) const * Returns vector's Euclidean Norm */ template -typename VariableLengthVector::RealValueType -VariableLengthVector::GetNorm() const +auto +VariableLengthVector::GetNorm() const -> RealValueType { using std::sqrt; return static_cast(sqrt(this->GetSquaredNorm())); @@ -422,8 +422,8 @@ VariableLengthVector::GetNorm() const * Returns vector's Squared Euclidean Norm */ template -typename VariableLengthVector::RealValueType -VariableLengthVector::GetSquaredNorm() const +auto +VariableLengthVector::GetSquaredNorm() const -> RealValueType { RealValueType sum = 0.0; @@ -436,15 +436,15 @@ VariableLengthVector::GetSquaredNorm() const } template -typename VariableLengthVectorExpression::RealValueType -VariableLengthVectorExpression::GetNorm() const +auto +VariableLengthVectorExpression::GetNorm() const -> RealValueType { return itk::GetNorm(*this); } template -typename VariableLengthVectorExpression::RealValueType -VariableLengthVectorExpression::GetSquaredNorm() const +auto +VariableLengthVectorExpression::GetSquaredNorm() const -> RealValueType { return itk::GetSquaredNorm(*this); } diff --git a/Modules/Core/Common/include/itkVector.hxx b/Modules/Core/Common/include/itkVector.hxx index c708314bc5e..d1e64191760 100644 --- a/Modules/Core/Common/include/itkVector.hxx +++ b/Modules/Core/Common/include/itkVector.hxx @@ -39,8 +39,8 @@ Vector::operator=(const ValueType r[TVectorDimension]) } template -const typename Vector::Self & -Vector::operator+=(const Self & vec) +auto +Vector::operator+=(const Self & vec) -> const Self & { for (unsigned int i = 0; i < TVectorDimension; ++i) { @@ -50,8 +50,8 @@ Vector::operator+=(const Self & vec) } template -const typename Vector::Self & -Vector::operator-=(const Self & vec) +auto +Vector::operator-=(const Self & vec) -> const Self & { for (unsigned int i = 0; i < TVectorDimension; ++i) { @@ -100,8 +100,8 @@ Vector::operator-(const Self & vec) const } template -typename Vector::RealValueType -Vector::GetSquaredNorm() const +auto +Vector::GetSquaredNorm() const -> RealValueType { typename NumericTraits::AccumulateType sum = NumericTraits::ZeroValue(); for (unsigned int i = 0; i < TVectorDimension; ++i) @@ -113,15 +113,15 @@ Vector::GetSquaredNorm() const } template -typename Vector::RealValueType -Vector::GetNorm() const +auto +Vector::GetNorm() const -> RealValueType { return RealValueType(std::sqrt(double(this->GetSquaredNorm()))); } template -typename Vector::RealValueType -Vector::Normalize() +auto +Vector::Normalize() -> RealValueType { const RealValueType norm = this->GetNorm(); if (norm < NumericTraits::epsilon()) diff --git a/Modules/Core/Common/include/itkVectorContainer.hxx b/Modules/Core/Common/include/itkVectorContainer.hxx index 7765566ea7d..9a51ad97188 100644 --- a/Modules/Core/Common/include/itkVectorContainer.hxx +++ b/Modules/Core/Common/include/itkVectorContainer.hxx @@ -77,8 +77,8 @@ VectorContainer::CreateElementAt(ElementIdentifier * It is assumed that the index exists. */ template -typename VectorContainer::Element -VectorContainer::GetElement(ElementIdentifier id) const +auto +VectorContainer::GetElement(ElementIdentifier id) const -> Element { return this->VectorType::operator[](id); } @@ -193,8 +193,8 @@ VectorContainer::DeleteIndex(ElementIdentifier id) * Get a begin const iterator for the vector. */ template -typename VectorContainer::ConstIterator -VectorContainer::Begin() const +auto +VectorContainer::Begin() const -> ConstIterator { return ConstIterator(0, this->VectorType::begin()); } @@ -203,8 +203,8 @@ VectorContainer::Begin() const * Get an end const iterator for the vector. */ template -typename VectorContainer::ConstIterator -VectorContainer::End() const +auto +VectorContainer::End() const -> ConstIterator { return ConstIterator(this->VectorType::size() - 1, this->VectorType::end()); } @@ -213,8 +213,8 @@ VectorContainer::End() const * Get a begin iterator for the vector. */ template -typename VectorContainer::Iterator -VectorContainer::Begin() +auto +VectorContainer::Begin() -> Iterator { return Iterator(0, this->VectorType::begin()); } @@ -223,8 +223,8 @@ VectorContainer::Begin() * Get an end iterator for the vector. */ template -typename VectorContainer::Iterator -VectorContainer::End() +auto +VectorContainer::End() -> Iterator { return Iterator(this->VectorType::size() - 1, this->VectorType::end()); } @@ -233,8 +233,8 @@ VectorContainer::End() * Get the number of elements currently stored in the vector. */ template -typename VectorContainer::ElementIdentifier -VectorContainer::Size() const +auto +VectorContainer::Size() const -> ElementIdentifier { return static_cast(this->VectorType::size()); } diff --git a/Modules/Core/Common/include/itkVersor.hxx b/Modules/Core/Common/include/itkVersor.hxx index 22e32aed821..df6ffc1ad54 100644 --- a/Modules/Core/Common/include/itkVersor.hxx +++ b/Modules/Core/Common/include/itkVersor.hxx @@ -192,8 +192,8 @@ Versor::GetReciprocal() const /** Get Tensor part */ template -typename Versor::ValueType -Versor::GetTensor() const +auto +Versor::GetTensor() const -> ValueType { const auto tensor = static_cast(std::sqrt(m_X * m_X + m_Y * m_Y + m_Z * m_Z + m_W * m_W)); @@ -223,8 +223,8 @@ Versor::Normalize() /** Get Axis */ template -typename Versor::VectorType -Versor::GetAxis() const +auto +Versor::GetAxis() const -> VectorType { VectorType axis; @@ -252,8 +252,8 @@ Versor::GetAxis() const /** Get Right part */ template -typename Versor::VectorType -Versor::GetRight() const +auto +Versor::GetRight() const -> VectorType { VectorType axis; @@ -266,16 +266,16 @@ Versor::GetRight() const /** Get Scalar part */ template -typename Versor::ValueType -Versor::GetScalar() const +auto +Versor::GetScalar() const -> ValueType { return m_W; } /** Get Angle (in radians) */ template -typename Versor::ValueType -Versor::GetAngle() const +auto +Versor::GetAngle() const -> ValueType { const auto ax = static_cast(m_X); const auto ay = static_cast(m_Y); @@ -581,8 +581,8 @@ localTransformVectorMath(const InputVectorType & VectorObject, /** Transform a Vector */ template -typename Versor::VectorType -Versor::Transform(const VectorType & v) const +auto +Versor::Transform(const VectorType & v) const -> VectorType { return localTransformVectorMath::VectorType>( v, this->m_X, this->m_Y, this->m_Z, this->m_W); @@ -592,8 +592,8 @@ Versor::Transform(const VectorType & v) const * given that this is an orthogonal transformation * CovariantVectors are transformed as vectors. */ template -typename Versor::CovariantVectorType -Versor::Transform(const CovariantVectorType & v) const +auto +Versor::Transform(const CovariantVectorType & v) const -> CovariantVectorType { return localTransformVectorMath::CovariantVectorType>( v, this->m_X, this->m_Y, this->m_Z, this->m_W); @@ -601,8 +601,8 @@ Versor::Transform(const CovariantVectorType & v) const /** Transform a Point */ template -typename Versor::PointType -Versor::Transform(const PointType & v) const +auto +Versor::Transform(const PointType & v) const -> PointType { return localTransformVectorMath::PointType>( v, this->m_X, this->m_Y, this->m_Z, this->m_W); @@ -610,8 +610,8 @@ Versor::Transform(const PointType & v) const /** Transform a VnlVector */ template -typename Versor::VnlVectorType -Versor::Transform(const VnlVectorType & v) const +auto +Versor::Transform(const VnlVectorType & v) const -> VnlVectorType { return localTransformVectorMath::VnlVectorType>( v, this->m_X, this->m_Y, this->m_Z, this->m_W); diff --git a/Modules/Core/Common/include/itkVertexCell.hxx b/Modules/Core/Common/include/itkVertexCell.hxx index a82eeb562c4..772219b799e 100644 --- a/Modules/Core/Common/include/itkVertexCell.hxx +++ b/Modules/Core/Common/include/itkVertexCell.hxx @@ -51,8 +51,8 @@ VertexCell::GetNumberOfPoints() const /** Standard CellInterface: * A vertex has no boundary entities of any dimension. */ template -typename VertexCell::CellFeatureCount -VertexCell::GetNumberOfBoundaryFeatures(int) const +auto +VertexCell::GetNumberOfBoundaryFeatures(int) const -> CellFeatureCount { return 0; } @@ -114,8 +114,8 @@ VertexCell::SetPointId(int localId, PointIdentifier ptId) * Get a begin iterator to the list of point identifiers used by the * cell. */ template -typename VertexCell::PointIdIterator -VertexCell::PointIdsBegin() +auto +VertexCell::PointIdsBegin() -> PointIdIterator { return &m_PointIds[0]; } @@ -124,8 +124,8 @@ VertexCell::PointIdsBegin() * Get a const begin iterator to the list of point identifiers used * by the cell. */ template -typename VertexCell::PointIdConstIterator -VertexCell::PointIdsBegin() const +auto +VertexCell::PointIdsBegin() const -> PointIdConstIterator { return &m_PointIds[0]; } @@ -133,8 +133,8 @@ VertexCell::PointIdsBegin() const /** Standard CellInterface: * Get an end iterator to the list of point identifiers used by the cell. */ template -typename VertexCell::PointIdIterator -VertexCell::PointIdsEnd() +auto +VertexCell::PointIdsEnd() -> PointIdIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -143,8 +143,8 @@ VertexCell::PointIdsEnd() * Get a const end iterator to the list of point identifiers used * by the cell. */ template -typename VertexCell::PointIdConstIterator -VertexCell::PointIdsEnd() const +auto +VertexCell::PointIdsEnd() const -> PointIdConstIterator { return &m_PointIds[Self::NumberOfPoints - 1] + 1; } @@ -161,8 +161,8 @@ VertexCell::SetPointId(PointIdentifier ptId) /** Vertex-specific: * Get the identifier of the point defining the vertex. */ template -typename VertexCell::PointIdentifier -VertexCell::GetPointId() +auto +VertexCell::GetPointId() -> PointIdentifier { return m_PointIds[0]; } diff --git a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx index cf0d5636958..084b983bb52 100644 --- a/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx @@ -121,8 +121,8 @@ DenseFiniteDifferenceImageFilter::ApplyUpdateThreader } template -typename DenseFiniteDifferenceImageFilter::TimeStepType -DenseFiniteDifferenceImageFilter::CalculateChange() +auto +DenseFiniteDifferenceImageFilter::CalculateChange() -> TimeStepType { // Set up for multithreaded processing. DenseFDThreadStruct str; diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx index 4aa60462188..0e83013ecd9 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceFunction.hxx @@ -41,8 +41,8 @@ FiniteDifferenceFunction::SetRadius(const RadiusType & r) } template -const typename FiniteDifferenceFunction::RadiusType & -FiniteDifferenceFunction::GetRadius() const +auto +FiniteDifferenceFunction::GetRadius() const -> const RadiusType & { return m_Radius; } @@ -77,8 +77,8 @@ FiniteDifferenceFunction::PrintSelf(std::ostream & os, Indent indent } template -const typename FiniteDifferenceFunction::NeighborhoodScalesType -FiniteDifferenceFunction::ComputeNeighborhoodScales() const +auto +FiniteDifferenceFunction::ComputeNeighborhoodScales() const -> const NeighborhoodScalesType { NeighborhoodScalesType neighborhoodScales; diff --git a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx index 68d02378be5..7ec907b29db 100644 --- a/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx +++ b/Modules/Core/FiniteDifference/include/itkFiniteDifferenceSparseImageFilter.hxx @@ -148,8 +148,8 @@ FiniteDifferenceSparseImageFilter::Prec } template -typename FiniteDifferenceSparseImageFilter::TimeStepType -FiniteDifferenceSparseImageFilter::CalculateChange() +auto +FiniteDifferenceSparseImageFilter::CalculateChange() -> TimeStepType { if (m_PrecomputeFlag == true) { diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx index c471850af83..087b09011c5 100644 --- a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx +++ b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.hxx @@ -152,8 +152,8 @@ GPUDenseFiniteDifferenceImageFilter -typename GPUDenseFiniteDifferenceImageFilter::TimeStepType -GPUDenseFiniteDifferenceImageFilter::GPUCalculateChange() +auto +GPUDenseFiniteDifferenceImageFilter::GPUCalculateChange() -> TimeStepType { typename OutputImageType::Pointer output = this->GetOutput(); diff --git a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx index 7d7b0bb34ef..72a753a8166 100644 --- a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx +++ b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.hxx @@ -125,16 +125,16 @@ ImageAdaptor::PrintSelf(std::ostream & os, Indent indent) con //---------------------------------------------------------------------------- template -const typename ImageAdaptor::OffsetValueType * -ImageAdaptor::GetOffsetTable() const +auto +ImageAdaptor::GetOffsetTable() const -> const OffsetValueType * { return m_Image->GetOffsetTable(); } //---------------------------------------------------------------------------- template -typename ImageAdaptor::IndexType -ImageAdaptor::ComputeIndex(OffsetValueType offset) const +auto +ImageAdaptor::ComputeIndex(OffsetValueType offset) const -> IndexType { return m_Image->ComputeIndex(offset); } @@ -220,8 +220,8 @@ ImageAdaptor::CopyInformation(const DataObject * data) //---------------------------------------------------------------------------- template -const typename ImageAdaptor::SpacingType & -ImageAdaptor::GetSpacing() const +auto +ImageAdaptor::GetSpacing() const -> const SpacingType & { return m_Image->GetSpacing(); } @@ -282,8 +282,8 @@ ImageAdaptor::SetOrigin(const float * origin /*[Self::ImageDi //---------------------------------------------------------------------------- template -const typename ImageAdaptor::PointType & -ImageAdaptor::GetOrigin() const +auto +ImageAdaptor::GetOrigin() const -> const PointType & { return m_Image->GetOrigin(); } @@ -299,8 +299,8 @@ ImageAdaptor::SetDirection(const DirectionType & direction) //---------------------------------------------------------------------------- template -const typename ImageAdaptor::DirectionType & -ImageAdaptor::GetDirection() const +auto +ImageAdaptor::GetDirection() const -> const DirectionType & { return m_Image->GetDirection(); } @@ -320,16 +320,16 @@ ImageAdaptor::SetImage(TImage * image) //---------------------------------------------------------------------------- template -const typename ImageAdaptor::InternalPixelType * -ImageAdaptor::GetBufferPointer() const +auto +ImageAdaptor::GetBufferPointer() const -> const InternalPixelType * { return m_Image->GetBufferPointer(); } //---------------------------------------------------------------------------- template -typename ImageAdaptor::InternalPixelType * -ImageAdaptor::GetBufferPointer() +auto +ImageAdaptor::GetBufferPointer() -> InternalPixelType * { return m_Image->GetBufferPointer(); } @@ -371,8 +371,8 @@ ImageAdaptor::SetBufferedRegion(const RegionType & region) //---------------------------------------------------------------------------- template -const typename ImageAdaptor::RegionType & -ImageAdaptor::GetBufferedRegion() const +auto +ImageAdaptor::GetBufferedRegion() const -> const RegionType & { // delegation to internal image return m_Image->GetBufferedRegion(); @@ -392,8 +392,8 @@ ImageAdaptor::SetLargestPossibleRegion(const RegionType & reg //---------------------------------------------------------------------------- template -const typename ImageAdaptor::RegionType & -ImageAdaptor::GetLargestPossibleRegion() const +auto +ImageAdaptor::GetLargestPossibleRegion() const -> const RegionType & { // delegation to internal image return m_Image->GetLargestPossibleRegion(); @@ -437,8 +437,8 @@ ImageAdaptor::VerifyRequestedRegion() //---------------------------------------------------------------------------- template -const typename ImageAdaptor::RegionType & -ImageAdaptor::GetRequestedRegion() const +auto +ImageAdaptor::GetRequestedRegion() const -> const RegionType & { // delegation to internal image return m_Image->GetRequestedRegion(); diff --git a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx index 3d6e973c1dc..b7a4a442f37 100644 --- a/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkCentralDifferenceImageFunction.hxx @@ -102,8 +102,9 @@ CentralDifferenceImageFunction::PrintSelf(s * EvaluateAtIndex */ template -typename CentralDifferenceImageFunction::OutputType +auto CentralDifferenceImageFunction::EvaluateAtIndex(const IndexType & index) const + -> OutputType { OutputType derivative; @@ -260,8 +261,9 @@ CentralDifferenceImageFunction::EvaluateAtI * */ template -typename CentralDifferenceImageFunction::OutputType +auto CentralDifferenceImageFunction::Evaluate(const PointType & point) const + -> OutputType { OutputType derivative; diff --git a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx index edeb5eeecb9..a96533ec98d 100644 --- a/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkCovarianceImageFunction.hxx @@ -31,8 +31,8 @@ CovarianceImageFunction::CovarianceImageFunction() = default; template -typename CovarianceImageFunction::RealType -CovarianceImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +CovarianceImageFunction::EvaluateAtIndex(const IndexType & index) const -> RealType { using PixelType = typename TInputImage::PixelType; using PixelComponentType = typename PixelType::ValueType; diff --git a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx index 909ee241009..7740e3b71ec 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.hxx @@ -194,8 +194,8 @@ GaussianDerivativeImageFunction::RecomputeGaussianKernel() } template -typename GaussianDerivativeImageFunction::OutputType -GaussianDerivativeImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +GaussianDerivativeImageFunction::EvaluateAtIndex(const IndexType & index) const -> OutputType { OutputType gradient; @@ -227,8 +227,8 @@ GaussianDerivativeImageFunction::EvaluateAtIndex(const Ind } template -typename GaussianDerivativeImageFunction::OutputType -GaussianDerivativeImageFunction::Evaluate(const PointType & point) const +auto +GaussianDerivativeImageFunction::Evaluate(const PointType & point) const -> OutputType { IndexType index; diff --git a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx index 4da6981ec15..db0224d6d6f 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkGaussianInterpolateImageFunction.hxx @@ -215,8 +215,8 @@ GaussianInterpolateImageFunction::ComputeErrorFunctionArr template -typename GaussianInterpolateImageFunction::SizeType -GaussianInterpolateImageFunction::GetRadius() const +auto +GaussianInterpolateImageFunction::GetRadius() const -> SizeType { SizeType radius; diff --git a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx index e76aae8452e..98e84111206 100644 --- a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx @@ -26,8 +26,9 @@ namespace itk { template -typename LinearInterpolateImageFunction::OutputType +auto LinearInterpolateImageFunction::EvaluateUnoptimized(const ContinuousIndexType & index) const + -> OutputType { // Avoid the smartpointer de-reference in the loop for // "return m_InputImage.GetPointer()" diff --git a/Modules/Core/ImageFunction/include/itkMeanImageFunction.hxx b/Modules/Core/ImageFunction/include/itkMeanImageFunction.hxx index 0ce9b4ac5e3..36196cd282f 100644 --- a/Modules/Core/ImageFunction/include/itkMeanImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkMeanImageFunction.hxx @@ -32,8 +32,8 @@ MeanImageFunction::MeanImageFunction() = default; template -typename MeanImageFunction::RealType -MeanImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +MeanImageFunction::EvaluateAtIndex(const IndexType & index) const -> RealType { RealType sum; diff --git a/Modules/Core/ImageFunction/include/itkMedianImageFunction.hxx b/Modules/Core/ImageFunction/include/itkMedianImageFunction.hxx index ceb619f7808..b6905d02baf 100644 --- a/Modules/Core/ImageFunction/include/itkMedianImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkMedianImageFunction.hxx @@ -61,8 +61,8 @@ MedianImageFunction::PrintSelf(std::ostream & os, Indent * */ template -typename MedianImageFunction::OutputType -MedianImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +MedianImageFunction::EvaluateAtIndex(const IndexType & index) const -> OutputType { const InputImageType * const image = this->GetInputImage(); diff --git a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx index 565388d6afc..4d3696ca86f 100644 --- a/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkRayCastInterpolateImageFunction.hxx @@ -1433,8 +1433,8 @@ RayCastInterpolateImageFunction::PrintSelf(std::ostream ----------------------------------------------------------------------- */ template -typename RayCastInterpolateImageFunction::OutputType -RayCastInterpolateImageFunction::Evaluate(const PointType & point) const +auto +RayCastInterpolateImageFunction::Evaluate(const PointType & point) const -> OutputType { double integral = 0; diff --git a/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.hxx b/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.hxx index e67d45747ac..6bafd46aa7f 100644 --- a/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkScatterMatrixImageFunction.hxx @@ -47,8 +47,8 @@ ScatterMatrixImageFunction::PrintSelf(std::ostream & os, * */ template -typename ScatterMatrixImageFunction::RealType -ScatterMatrixImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +ScatterMatrixImageFunction::EvaluateAtIndex(const IndexType & index) const -> RealType { RealType covariance; diff --git a/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.hxx b/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.hxx index 1152627aa92..253b004317e 100644 --- a/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkSumOfSquaresImageFunction.hxx @@ -33,8 +33,8 @@ SumOfSquaresImageFunction::SumOfSquaresImageFunction() } template -typename SumOfSquaresImageFunction::RealType -SumOfSquaresImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +SumOfSquaresImageFunction::EvaluateAtIndex(const IndexType & index) const -> RealType { RealType sumOfSquares; diff --git a/Modules/Core/ImageFunction/include/itkVarianceImageFunction.hxx b/Modules/Core/ImageFunction/include/itkVarianceImageFunction.hxx index 753d54ac515..c0c7a1b3e7e 100644 --- a/Modules/Core/ImageFunction/include/itkVarianceImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkVarianceImageFunction.hxx @@ -48,8 +48,8 @@ VarianceImageFunction::PrintSelf(std::ostream & os, Inde * */ template -typename VarianceImageFunction::RealType -VarianceImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +VarianceImageFunction::EvaluateAtIndex(const IndexType & index) const -> RealType { RealType sum; RealType sumOfSquares; diff --git a/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.hxx b/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.hxx index 56da9bee08c..3b8480fe320 100644 --- a/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkVectorMeanImageFunction.hxx @@ -47,8 +47,8 @@ VectorMeanImageFunction::PrintSelf(std::ostream & os, In * */ template -typename VectorMeanImageFunction::RealType -VectorMeanImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +VectorMeanImageFunction::EvaluateAtIndex(const IndexType & index) const -> RealType { using PixelType = typename TInputImage::PixelType; diff --git a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx index d38c7cc94d1..cebca9f21d4 100644 --- a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.hxx @@ -40,8 +40,8 @@ AutomaticTopologyMeshSource::AutomaticTopologyMeshSource() } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddPoint(const PointType & p0) +auto +AutomaticTopologyMeshSource::AddPoint(const PointType & p0) -> IdentifierType { IdentifierType nextNewPointID = m_OutputMesh->GetNumberOfPoints(); IdentifierType & pointIDPlusOne = m_PointsHashTable[p0]; @@ -61,8 +61,8 @@ AutomaticTopologyMeshSource::AddPoint(const PointType & p0) } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddPoint(const CoordinateType * p0) +auto +AutomaticTopologyMeshSource::AddPoint(const CoordinateType * p0) -> IdentifierType { PointType newPoint; unsigned int i; @@ -100,8 +100,8 @@ AutomaticTopologyMeshSource::AddPoint(CoordinateType x0, } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddVertex(const IdentifierArrayType & pointIDs) +auto +AutomaticTopologyMeshSource::AddVertex(const IdentifierArrayType & pointIDs) -> IdentifierType { // pointIDs is an array with one element; this is for consistency. @@ -133,8 +133,8 @@ AutomaticTopologyMeshSource::AddVertex(const IdentifierArrayType & } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddLine(const IdentifierArrayType & pointIDs) +auto +AutomaticTopologyMeshSource::AddLine(const IdentifierArrayType & pointIDs) -> IdentifierType { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; @@ -181,8 +181,8 @@ AutomaticTopologyMeshSource::AddLine(const IdentifierArrayType & po } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddTriangle(const IdentifierArrayType & pointIDs) +auto +AutomaticTopologyMeshSource::AddTriangle(const IdentifierArrayType & pointIDs) -> IdentifierType { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; @@ -243,8 +243,8 @@ AutomaticTopologyMeshSource::AddTriangle(const IdentifierArrayType } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddQuadrilateral(const IdentifierArrayType & pointIDs) +auto +AutomaticTopologyMeshSource::AddQuadrilateral(const IdentifierArrayType & pointIDs) -> IdentifierType { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; @@ -304,8 +304,8 @@ AutomaticTopologyMeshSource::AddQuadrilateral(const IdentifierArray } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddTetrahedron(const IdentifierArrayType & pointIDs) +auto +AutomaticTopologyMeshSource::AddTetrahedron(const IdentifierArrayType & pointIDs) -> IdentifierType { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; @@ -381,8 +381,8 @@ AutomaticTopologyMeshSource::AddTetrahedron(const IdentifierArrayTy } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddHexahedron(const IdentifierArrayType & pointIDs) +auto +AutomaticTopologyMeshSource::AddHexahedron(const IdentifierArrayType & pointIDs) -> IdentifierType { // Check to see if the cell is already referenced in the hash table. IdentifierType * cellIDPlusOne = &m_CellsHashTable[pointIDs]; @@ -466,8 +466,8 @@ AutomaticTopologyMeshSource::AddHexahedron(const IdentifierArrayTyp } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddVertex(IdentifierType pointId0) +auto +AutomaticTopologyMeshSource::AddVertex(IdentifierType pointId0) -> IdentifierType { Array pointIDs(1); pointIDs[0] = pointId0; @@ -475,8 +475,8 @@ AutomaticTopologyMeshSource::AddVertex(IdentifierType pointId0) } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddLine(IdentifierType pointId0, IdentifierType pointId1) +auto +AutomaticTopologyMeshSource::AddLine(IdentifierType pointId0, IdentifierType pointId1) -> IdentifierType { Array pointIDs(2); pointIDs[0] = pointId0; @@ -551,8 +551,8 @@ AutomaticTopologyMeshSource::AddHexahedron(IdentifierType pointId0, } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddVertex(const PointType & p0) +auto +AutomaticTopologyMeshSource::AddVertex(const PointType & p0) -> IdentifierType { IdentifierType pointId = AddPoint(p0); @@ -560,8 +560,8 @@ AutomaticTopologyMeshSource::AddVertex(const PointType & p0) } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddLine(const PointType & p0, const PointType & p1) +auto +AutomaticTopologyMeshSource::AddLine(const PointType & p0, const PointType & p1) -> IdentifierType { Array pointIDs(2); pointIDs[0] = AddPoint(p0); @@ -570,8 +570,9 @@ AutomaticTopologyMeshSource::AddLine(const PointType & p0, const Po } template -typename AutomaticTopologyMeshSource::IdentifierType +auto AutomaticTopologyMeshSource::AddTriangle(const PointType & p0, const PointType & p1, const PointType & p2) + -> IdentifierType { Array pointIDs(3); pointIDs[0] = AddPoint(p0); @@ -634,8 +635,8 @@ AutomaticTopologyMeshSource::AddHexahedron(const PointType & p0, } template -typename AutomaticTopologyMeshSource::IdentifierType -AutomaticTopologyMeshSource::AddVertex(const CoordinateType * p0) +auto +AutomaticTopologyMeshSource::AddVertex(const CoordinateType * p0) -> IdentifierType { Array pointIDs(1); pointIDs[0] = AddPoint(p0); @@ -643,8 +644,9 @@ AutomaticTopologyMeshSource::AddVertex(const CoordinateType * p0) } template -typename AutomaticTopologyMeshSource::IdentifierType +auto AutomaticTopologyMeshSource::AddLine(const CoordinateType * p0, const CoordinateType * p1) + -> IdentifierType { Array pointIDs(2); pointIDs[0] = AddPoint(p0); diff --git a/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx b/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx index 0db966a30a2..88a4510ec9e 100644 --- a/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx @@ -62,8 +62,8 @@ ImageToMeshFilter::SetInput(unsigned int idx, const In * */ template -const typename ImageToMeshFilter::InputImageType * -ImageToMeshFilter::GetInput(unsigned int idx) +auto +ImageToMeshFilter::GetInput(unsigned int idx) -> const InputImageType * { return dynamic_cast(this->ProcessObject::GetInput(idx)); } @@ -72,8 +72,8 @@ ImageToMeshFilter::GetInput(unsigned int idx) * */ template -typename ImageToMeshFilter::OutputMeshType * -ImageToMeshFilter::GetOutput() +auto +ImageToMeshFilter::GetOutput() -> OutputMeshType * { return dynamic_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Core/Mesh/include/itkMesh.hxx b/Modules/Core/Mesh/include/itkMesh.hxx index 52316ab51b2..26fccaaa757 100644 --- a/Modules/Core/Mesh/include/itkMesh.hxx +++ b/Modules/Core/Mesh/include/itkMesh.hxx @@ -73,16 +73,16 @@ Mesh::SetCellLinks(CellLinksContainer * cel * Access routines to get the cell links container. */ template -typename Mesh::CellLinksContainer * -Mesh::GetCellLinks() +auto +Mesh::GetCellLinks() -> CellLinksContainer * { itkDebugMacro("returning CellLinks container of " << m_CellLinksContainer); return m_CellLinksContainer; } template -const typename Mesh::CellLinksContainer * -Mesh::GetCellLinks() const +auto +Mesh::GetCellLinks() const -> const CellLinksContainer * { itkDebugMacro("returning CellLinks container of " << m_CellLinksContainer); return m_CellLinksContainer; @@ -108,16 +108,16 @@ Mesh::SetCells(CellsContainer * cells) * Access routines to get the cells container. */ template -typename Mesh::CellsContainer * -Mesh::GetCells() +auto +Mesh::GetCells() -> CellsContainer * { itkDebugMacro("returning Cells container of " << m_CellsContainer); return m_CellsContainer; } template -const typename Mesh::CellsContainer * -Mesh::GetCells() const +auto +Mesh::GetCells() const -> const CellsContainer * { itkDebugMacro("returning Cells container of " << m_CellsContainer); return m_CellsContainer; @@ -142,24 +142,24 @@ Mesh::SetCellData(CellDataContainer * cellD * Access routines to get the cell data container. */ template -typename Mesh::CellDataContainer * -Mesh::GetCellData() +auto +Mesh::GetCellData() -> CellDataContainer * { itkDebugMacro("returning CellData container of " << m_CellDataContainer); return m_CellDataContainer; } template -const typename Mesh::CellDataContainer * -Mesh::GetCellData() const +auto +Mesh::GetCellData() const -> const CellDataContainer * { itkDebugMacro("returning CellData container of " << m_CellDataContainer); return m_CellDataContainer; } template -const typename Mesh::BoundingBoxType * -Mesh::GetBoundingBox() const +auto +Mesh::GetBoundingBox() const -> const BoundingBoxType * { m_BoundingBox->SetPoints(this->m_PointsContainer.GetPointer()); if (m_BoundingBox->GetMTime() > this->GetMTime()) @@ -191,8 +191,8 @@ Mesh::SetBoundaryAssignments(int * dimension. */ template -typename Mesh::BoundaryAssignmentsContainerPointer -Mesh::GetBoundaryAssignments(int dimension) +auto +Mesh::GetBoundaryAssignments(int dimension) -> BoundaryAssignmentsContainerPointer { itkDebugMacro("returning BoundaryAssignments[" << dimension << "] container of " << m_BoundaryAssignmentsContainers[dimension]); @@ -200,8 +200,9 @@ Mesh::GetBoundaryAssignments(int dimension) } template -const typename Mesh::BoundaryAssignmentsContainerPointer +auto Mesh::GetBoundaryAssignments(int dimension) const + -> const BoundaryAssignmentsContainerPointer { itkDebugMacro("returning BoundaryAssignments[" << dimension << "] container of " << m_BoundaryAssignmentsContainers[dimension]); @@ -425,8 +426,9 @@ Mesh::RemoveBoundaryAssignment(int * on the cell with the given identifier. */ template -typename Mesh::CellFeatureCount +auto Mesh::GetNumberOfCellBoundaryFeatures(int dimension, CellIdentifier cellId) const + -> CellFeatureCount { /** * Make sure the cell container exists and contains the given cell Id. @@ -461,8 +463,8 @@ Mesh::PassStructure(Self *) * Get the number of cells in the CellsContainer. */ template -typename Mesh::CellIdentifier -Mesh::GetNumberOfCells() const +auto +Mesh::GetNumberOfCells() const -> CellIdentifier { if (!m_CellsContainer) { @@ -716,8 +718,9 @@ Mesh::GetCellBoundaryFeatureNeighbors(int * though, and we are not sure how wide-spread this support is. */ template -typename Mesh::CellIdentifier +auto Mesh::GetCellNeighbors(CellIdentifier cellId, std::set * cellSet) + -> CellIdentifier { /** * Sanity check on mesh status. diff --git a/Modules/Core/Mesh/include/itkMeshSource.hxx b/Modules/Core/Mesh/include/itkMeshSource.hxx index 0994e091ed3..05be52fbecb 100644 --- a/Modules/Core/Mesh/include/itkMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkMeshSource.hxx @@ -52,8 +52,8 @@ typename MeshSource::DataObjectPointer MeshSource::Mak * */ template -typename MeshSource::OutputMeshType * -MeshSource::GetOutput() +auto +MeshSource::GetOutput() -> OutputMeshType * { return itkDynamicCastInDebugMode(this->GetPrimaryOutput()); } @@ -62,8 +62,8 @@ MeshSource::GetOutput() * */ template -typename MeshSource::OutputMeshType * -MeshSource::GetOutput(unsigned int idx) +auto +MeshSource::GetOutput(unsigned int idx) -> OutputMeshType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(idx)); } diff --git a/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx b/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx index 0aa384131a0..241021bca2c 100644 --- a/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkMeshToMeshFilter.hxx @@ -58,8 +58,8 @@ MeshToMeshFilter::SetInput(const TInputMesh * input) * */ template -const typename MeshToMeshFilter::InputMeshType * -MeshToMeshFilter::GetInput() const +auto +MeshToMeshFilter::GetInput() const -> const InputMeshType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } @@ -68,8 +68,8 @@ MeshToMeshFilter::GetInput() const * */ template -const typename MeshToMeshFilter::InputMeshType * -MeshToMeshFilter::GetInput(unsigned int idx) const +auto +MeshToMeshFilter::GetInput(unsigned int idx) const -> const InputMeshType * { return dynamic_cast(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx index 8b038cecbb5..93232097e50 100644 --- a/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkRegularSphereMeshSource.hxx @@ -318,8 +318,8 @@ RegularSphereMeshSource::GenerateData() } template -typename RegularSphereMeshSource::PointType -RegularSphereMeshSource::Divide(const PointType & p1, const PointType & p2) const +auto +RegularSphereMeshSource::Divide(const PointType & p1, const PointType & p2) const -> PointType { PointType p; PointType f; diff --git a/Modules/Core/Mesh/include/itkSimplexMesh.hxx b/Modules/Core/Mesh/include/itkSimplexMesh.hxx index 230f7b3327f..b8bb38f0fba 100644 --- a/Modules/Core/Mesh/include/itkSimplexMesh.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMesh.hxx @@ -93,8 +93,8 @@ SimplexMesh::SetBarycentricCoordinates(Poin } template -typename SimplexMesh::PointType -SimplexMesh::GetBarycentricCoordinates(PointIdentifier idx) const +auto +SimplexMesh::GetBarycentricCoordinates(PointIdentifier idx) const -> PointType { return m_GeometryData->GetElement(idx)->eps; } @@ -109,8 +109,8 @@ SimplexMesh::SetReferenceMetrics(PointIdent } template -typename SimplexMesh::PointType -SimplexMesh::GetReferenceMetrics(PointIdentifier idx) const +auto +SimplexMesh::GetReferenceMetrics(PointIdentifier idx) const -> PointType { return m_GeometryData->GetElement(idx)->referenceMetrics; } @@ -184,8 +184,9 @@ SimplexMesh::GetDistance(PointIdentifier id } template -typename SimplexMesh::CellIdentifier +auto SimplexMesh::AddEdge(PointIdentifier startPointId, PointIdentifier endPointId) + -> CellIdentifier { CellAutoPointer NewCellPointer(new LineType, true); CellIdentifier edgeId = m_LastCellId; @@ -199,8 +200,8 @@ SimplexMesh::AddEdge(PointIdentifier startP } template -typename SimplexMesh::CellIdentifier -SimplexMesh::AddFace(CellAutoPointer & cellPointer) +auto +SimplexMesh::AddFace(CellAutoPointer & cellPointer) -> CellIdentifier { this->SetCell(m_LastCellId, cellPointer); m_LastCellId++; @@ -251,8 +252,8 @@ SimplexMesh::SetGeometryData(PointIdentifie } template -typename SimplexMesh::IndexArray -SimplexMesh::GetNeighbors(PointIdentifier idx) const +auto +SimplexMesh::GetNeighbors(PointIdentifier idx) const -> IndexArray { return m_GeometryData->GetElement(idx)->neighborIndices; } @@ -399,8 +400,8 @@ SimplexMesh::SwapNeighbors(PointIdentifier } template -typename SimplexMesh::CovariantVectorType -SimplexMesh::ComputeNormal(PointIdentifier idx) const +auto +SimplexMesh::ComputeNormal(PointIdentifier idx) const -> CovariantVectorType { PointType p, n1, n2, n3; diff --git a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx index d47c471940e..8b12b1fea7f 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshAdaptTopologyFilter.hxx @@ -388,8 +388,9 @@ SimplexMeshAdaptTopologyFilter::PrintSelf(std::ostream } template -typename SimplexMeshAdaptTopologyFilter::InputPointType +auto SimplexMeshAdaptTopologyFilter::ComputeCellCenter(InputCellAutoPointer & simplexCell) + -> InputPointType { OutputMeshPointer outputMesh = this->GetOutput(); InputPolygonPointIdIterator pointIt = simplexCell->PointIdsBegin(); diff --git a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx index b402702fc64..ff258447e9f 100644 --- a/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx +++ b/Modules/Core/Mesh/include/itkTriangleMeshToBinaryImageFilter.hxx @@ -58,16 +58,16 @@ TriangleMeshToBinaryImageFilter::SetInput(TInputMesh * /** Get the input Mesh */ template -typename TriangleMeshToBinaryImageFilter::InputMeshType * -TriangleMeshToBinaryImageFilter::GetInput() +auto +TriangleMeshToBinaryImageFilter::GetInput() -> InputMeshType * { return static_cast(this->ProcessObject::GetInput(0)); } /** Get the input Mesh */ template -typename TriangleMeshToBinaryImageFilter::InputMeshType * -TriangleMeshToBinaryImageFilter::GetInput(unsigned int idx) +auto +TriangleMeshToBinaryImageFilter::GetInput(unsigned int idx) -> InputMeshType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx b/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx index 52f3e4448ba..98fc38ca362 100644 --- a/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkWarpMeshFilter.hxx @@ -35,8 +35,9 @@ WarpMeshFilter::WarpMeshFilter() } template -const typename WarpMeshFilter::DisplacementFieldType * +auto WarpMeshFilter::GetDisplacementField() const + -> const DisplacementFieldType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx index d11786ff383..8bdd58bb483 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.hxx @@ -214,8 +214,9 @@ GeometricalQuadEdge::IsLnextSh /** */ template -typename GeometricalQuadEdge::Self * +auto GeometricalQuadEdge::GetNextBorderEdgeWithUnsetLeft(Self * edgeTest) + -> Self * { // Definition: an edge is said to be a boundary edge when it is adjacent to // noface i.e. when at least one of the faces edge->GetLeft() or diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx index 71705b3269a..129cf0d2014 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMesh.hxx @@ -97,8 +97,8 @@ QuadEdgeMesh::Graft(const DataObject * data) * \brief The one and only method to modify the edge connectivity. */ template -typename QuadEdgeMesh::PointIdentifier -QuadEdgeMesh::Splice(QEPrimal * a, QEPrimal * b) +auto +QuadEdgeMesh::Splice(QEPrimal * a, QEPrimal * b) -> PointIdentifier { bool SplitingOrigin = a->IsInOnextRing(b); PointIdentifier resultingOriginId; @@ -404,8 +404,8 @@ QuadEdgeMesh::SetCell(CellIdentifier cId, CellAutoP /** */ template -typename QuadEdgeMesh::PointIdentifier -QuadEdgeMesh::FindFirstUnusedPointIndex() +auto +QuadEdgeMesh::FindFirstUnusedPointIndex() -> PointIdentifier { PointIdentifier pid = 0; PointIdentifier maxpid = this->GetNumberOfPoints(); @@ -525,8 +525,8 @@ QuadEdgeMesh::SqueezePointsIds() /** */ template -typename QuadEdgeMesh::PointIdentifier -QuadEdgeMesh::AddPoint(const PointType & p) +auto +QuadEdgeMesh::AddPoint(const PointType & p) -> PointIdentifier { PointIdentifier pid = this->FindFirstUnusedPointIndex(); @@ -571,8 +571,8 @@ QuadEdgeMesh::DeletePoint(const PointIdentifier & p /** */ template -typename QuadEdgeMesh::PointType -QuadEdgeMesh::GetPoint(const PointIdentifier & pid) const +auto +QuadEdgeMesh::GetPoint(const PointIdentifier & pid) const -> PointType { return (this->GetPoints()->GetElement(pid)); } @@ -580,8 +580,8 @@ QuadEdgeMesh::GetPoint(const PointIdentifier & pid) /** */ template -typename QuadEdgeMesh::VectorType -QuadEdgeMesh::GetVector(const PointIdentifier & pid) const +auto +QuadEdgeMesh::GetVector(const PointIdentifier & pid) const -> VectorType { return (this->GetPoint(pid).GetVectorFromOrigin()); } @@ -589,8 +589,8 @@ QuadEdgeMesh::GetVector(const PointIdentifier & pid /** */ template -typename QuadEdgeMesh::CellIdentifier -QuadEdgeMesh::FindFirstUnusedCellIndex() +auto +QuadEdgeMesh::FindFirstUnusedCellIndex() -> CellIdentifier { CellIdentifier cid; @@ -622,8 +622,9 @@ QuadEdgeMesh::FindFirstUnusedCellIndex() * @sa \ref GeometricalQuadEdge::InsertAfterNextBorderEdgeWithUnsetLeft */ template -typename QuadEdgeMesh::QEPrimal * +auto QuadEdgeMesh::AddEdge(const PointIdentifier & orgPid, const PointIdentifier & destPid) + -> QEPrimal * { // Make sure the points are different if (orgPid == destPid) @@ -1068,8 +1069,8 @@ QuadEdgeMesh::DeleteFace(FaceRefType faceToDelete) /** */ template -typename QuadEdgeMesh::QEPrimal * -QuadEdgeMesh::GetEdge() const +auto +QuadEdgeMesh::GetEdge() const -> QEPrimal * { if (this->GetEdgeCells()->empty()) { @@ -1086,8 +1087,8 @@ QuadEdgeMesh::GetEdge() const /** */ template -typename QuadEdgeMesh::QEPrimal * -QuadEdgeMesh::GetEdge(const CellIdentifier & eid) const +auto +QuadEdgeMesh::GetEdge(const CellIdentifier & eid) const -> QEPrimal * { CellType * c; @@ -1104,8 +1105,8 @@ QuadEdgeMesh::GetEdge(const CellIdentifier & eid) c /** */ template -typename QuadEdgeMesh::QEPrimal * -QuadEdgeMesh::FindEdge(const PointIdentifier & pid0) const +auto +QuadEdgeMesh::FindEdge(const PointIdentifier & pid0) const -> QEPrimal * { PointType p = this->GetPoint(pid0); @@ -1115,8 +1116,9 @@ QuadEdgeMesh::FindEdge(const PointIdentifier & pid0 /** */ template -typename QuadEdgeMesh::QEPrimal * +auto QuadEdgeMesh::FindEdge(const PointIdentifier & pid0, const PointIdentifier & pid1) const + -> QEPrimal * { QEPrimal * initialEdge = this->GetPoint(pid0).GetEdge(); @@ -1160,8 +1162,8 @@ QuadEdgeMesh::FindEdgeCell(const PointIdentifier & /** */ template -typename QuadEdgeMesh::QEPrimal * -QuadEdgeMesh::AddFace(const PointIdList & points) +auto +QuadEdgeMesh::AddFace(const PointIdList & points) -> QEPrimal * { size_t N = points.size(); @@ -1226,8 +1228,8 @@ QuadEdgeMesh::AddFace(const PointIdList & points) /** */ template -typename QuadEdgeMesh::QEPrimal * -QuadEdgeMesh::AddFaceWithSecurePointList(const PointIdList & points) +auto +QuadEdgeMesh::AddFaceWithSecurePointList(const PointIdList & points) -> QEPrimal * { return AddFaceWithSecurePointList(points, true); } @@ -1235,8 +1237,9 @@ QuadEdgeMesh::AddFaceWithSecurePointList(const Poin /** */ template -typename QuadEdgeMesh::QEPrimal * +auto QuadEdgeMesh::AddFaceWithSecurePointList(const PointIdList & points, bool CheckEdges) + -> QEPrimal * { const auto numberOfPoints = static_cast(points.size()); @@ -1388,8 +1391,8 @@ QuadEdgeMesh::ClearCellsContainer() /** */ template -typename QuadEdgeMesh::CoordRepType -QuadEdgeMesh::ComputeEdgeLength(QEPrimal * e) +auto +QuadEdgeMesh::ComputeEdgeLength(QEPrimal * e) -> CoordRepType { const PointsContainer * points = this->GetPoints(); @@ -1408,8 +1411,8 @@ QuadEdgeMesh::ComputeEdgeLength(QEPrimal * e) * understanding is not useful at first contact with the class. */ template -typename QuadEdgeMesh::PointIdentifier -QuadEdgeMesh::ComputeNumberOfPoints() const +auto +QuadEdgeMesh::ComputeNumberOfPoints() const -> PointIdentifier { const PointsContainer * points = this->GetPoints(); @@ -1442,8 +1445,8 @@ QuadEdgeMesh::ComputeNumberOfPoints() const * understanding is not useful at first contact with the class. */ template -typename QuadEdgeMesh::CellIdentifier -QuadEdgeMesh::ComputeNumberOfFaces() const +auto +QuadEdgeMesh::ComputeNumberOfFaces() const -> CellIdentifier { CellIdentifier numberOfFaces = NumericTraits::ZeroValue(); CellsContainerConstIterator cellIterator = this->GetCells()->Begin(); @@ -1471,8 +1474,8 @@ QuadEdgeMesh::ComputeNumberOfFaces() const * understanding is not useful at first contact with the class. */ template -typename QuadEdgeMesh::CellIdentifier -QuadEdgeMesh::ComputeNumberOfEdges() const +auto +QuadEdgeMesh::ComputeNumberOfEdges() const -> CellIdentifier { return static_cast(this->GetEdgeCells()->size()); } diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx index 5cbd27d286f..00ae94cffd9 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBoundaryEdgesMeshFunction.hxx @@ -24,8 +24,8 @@ namespace itk { template -typename QuadEdgeMeshBoundaryEdgesMeshFunction::OutputType -QuadEdgeMeshBoundaryEdgesMeshFunction::Evaluate(const InputType & mesh) const +auto +QuadEdgeMeshBoundaryEdgesMeshFunction::Evaluate(const InputType & mesh) const -> OutputType { // Push on a list all the non internal edges: using CellsContainerConstIterator = typename MeshType::CellsContainerConstIterator; diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx index c2da96a128a..b1ce3c9ff8c 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorCreateCenterVertexFunction.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename QuadEdgeMeshEulerOperatorCreateCenterVertexFunction::OutputType -QuadEdgeMeshEulerOperatorCreateCenterVertexFunction::Evaluate(QEType * e) +auto +QuadEdgeMeshEulerOperatorCreateCenterVertexFunction::Evaluate(QEType * e) -> OutputType { // Is there any input ? #ifndef NDEBUG diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx index 22d2fef2557..0336d11cbb0 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorDeleteCenterVertexFunction.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction::OutputType -QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction::Evaluate(QEType * g) +auto +QuadEdgeMeshEulerOperatorDeleteCenterVertexFunction::Evaluate(QEType * g) -> OutputType { if (!g) { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx index e7e77d3a4b0..ed8275d017a 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.hxx @@ -107,8 +107,8 @@ QuadEdgeMeshEulerOperatorFlipEdgeFunction::CheckStatus(QEType * } template -typename QuadEdgeMeshEulerOperatorFlipEdgeFunction::OutputType -QuadEdgeMeshEulerOperatorFlipEdgeFunction::Evaluate(QEType * h) +auto +QuadEdgeMeshEulerOperatorFlipEdgeFunction::Evaluate(QEType * h) -> OutputType { // // X ---<-G---- X X ---<-G---- X @@ -153,8 +153,8 @@ QuadEdgeMeshEulerOperatorFlipEdgeFunction::Evaluate(QEType * h) } template -typename QuadEdgeMeshEulerOperatorFlipEdgeFunction::OutputType -QuadEdgeMeshEulerOperatorFlipEdgeFunction::Process(QEType * h) +auto +QuadEdgeMeshEulerOperatorFlipEdgeFunction::Process(QEType * h) -> OutputType { // The following is not optimum, since we create a new face (with JoinFacet) // that is immediately deleted (with SplitFacet). Still we chose to write it diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx index 52d900855e0..613a66aeaec 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinFacetFunction.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename QuadEdgeMeshEulerOperatorJoinFacetFunction::OutputType -QuadEdgeMeshEulerOperatorJoinFacetFunction::Evaluate(QEType * e) +auto +QuadEdgeMeshEulerOperatorJoinFacetFunction::Evaluate(QEType * e) -> OutputType { #ifndef NDEBUG if (!e) diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx index e913e4eeb81..615ded0eb78 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorJoinVertexFunction.hxx @@ -84,8 +84,8 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction::PrintSelf(std::ostr //-------------------------------------------------------------------------- template -typename QuadEdgeMeshEulerOperatorJoinVertexFunction::OutputType -QuadEdgeMeshEulerOperatorJoinVertexFunction::Evaluate(QEType * e) +auto +QuadEdgeMeshEulerOperatorJoinVertexFunction::Evaluate(QEType * e) -> OutputType { std::stack edges_to_be_deleted; @@ -527,8 +527,8 @@ QuadEdgeMeshEulerOperatorJoinVertexFunction::IsEye(QEType * e) //-------------------------------------------------------------------------- template -typename QuadEdgeMeshEulerOperatorJoinVertexFunction::PointIdentifier -QuadEdgeMeshEulerOperatorJoinVertexFunction::CommonVertexNeighboor(QEType * e) +auto +QuadEdgeMeshEulerOperatorJoinVertexFunction::CommonVertexNeighboor(QEType * e) -> PointIdentifier { QEType * qe = e; QEType * e_it = qe->GetOnext(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx index 604b00dfd84..19b819bad23 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitFacetFunction.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename QuadEdgeMeshEulerOperatorSplitFacetFunction::OutputType -QuadEdgeMeshEulerOperatorSplitFacetFunction::Evaluate(QEType * h, QEType * g) +auto +QuadEdgeMeshEulerOperatorSplitFacetFunction::Evaluate(QEType * h, QEType * g) -> OutputType { // // g->Dest() ---<----- X destPid --------- X // diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx index d25d4bdc606..16bfcc76ecb 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitVertexFunction.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename QuadEdgeMeshEulerOperatorSplitVertexFunction::OutputType -QuadEdgeMeshEulerOperatorSplitVertexFunction::Evaluate(QEType * h, QEType * g) +auto +QuadEdgeMeshEulerOperatorSplitVertexFunction::Evaluate(QEType * h, QEType * g) -> OutputType { if (!this->m_Mesh) { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx index 9d577f53be4..4a1a3fe1fbe 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshFrontIterator.hxx @@ -129,8 +129,8 @@ QuadEdgeMeshFrontBaseIterator::operator++() * QEType. */ template -typename QuadEdgeMeshFrontBaseIterator::QEType * -QuadEdgeMeshFrontBaseIterator::FindDefaultSeed() +auto +QuadEdgeMeshFrontBaseIterator::FindDefaultSeed() -> QEType * { if (auto * edge = dynamic_cast(m_Mesh->GetEdge())) { diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx index f6cc4564274..690cc9a2461 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshLineCell.hxx @@ -117,8 +117,8 @@ QuadEdgeMeshLineCell::Accept(CellIdentifier cellId, MultiVisitor // --------------------------------------------------------------------- template -typename QuadEdgeMeshLineCell::CellFeatureCount -QuadEdgeMeshLineCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +QuadEdgeMeshLineCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { if (dimension == 0) { @@ -211,40 +211,40 @@ QuadEdgeMeshLineCell::SetPointId(int localId, PointIdentifier pI // --------------------------------------------------------------------- template -typename QuadEdgeMeshLineCell::PointIdInternalIterator -QuadEdgeMeshLineCell::InternalPointIdsBegin() +auto +QuadEdgeMeshLineCell::InternalPointIdsBegin() -> PointIdInternalIterator { return (PointIdInternalIterator(this->m_QuadEdgeGeom, PointIdInternalIterator::OperatorSym, true)); } // --------------------------------------------------------------------- template -typename QuadEdgeMeshLineCell::PointIdInternalIterator -QuadEdgeMeshLineCell::InternalPointIdsEnd() +auto +QuadEdgeMeshLineCell::InternalPointIdsEnd() -> PointIdInternalIterator { return (PointIdInternalIterator(this->m_QuadEdgeGeom, PointIdInternalIterator::OperatorSym, false)); } // --------------------------------------------------------------------- template -typename QuadEdgeMeshLineCell::PointIdInternalConstIterator -QuadEdgeMeshLineCell::InternalGetPointIds() const +auto +QuadEdgeMeshLineCell::InternalGetPointIds() const -> PointIdInternalConstIterator { return (PointIdInternalConstIterator(this->m_QuadEdgeGeom, PointIdInternalConstIterator::OperatorSym, true)); } // --------------------------------------------------------------------- template -typename QuadEdgeMeshLineCell::PointIdInternalConstIterator -QuadEdgeMeshLineCell::InternalPointIdsBegin() const +auto +QuadEdgeMeshLineCell::InternalPointIdsBegin() const -> PointIdInternalConstIterator { return (PointIdInternalConstIterator(this->m_QuadEdgeGeom, PointIdInternalConstIterator::OperatorSym, true)); } // --------------------------------------------------------------------- template -typename QuadEdgeMeshLineCell::PointIdInternalConstIterator -QuadEdgeMeshLineCell::InternalPointIdsEnd() const +auto +QuadEdgeMeshLineCell::InternalPointIdsEnd() const -> PointIdInternalConstIterator { return (PointIdInternalConstIterator(this->m_QuadEdgeGeom, PointIdInternalConstIterator::OperatorSym, false)); } @@ -261,8 +261,8 @@ QuadEdgeMeshLineCell::SetIdent(CellIdentifier cid) // --------------------------------------------------------------------- template -typename QuadEdgeMeshLineCell::CellIdentifier -QuadEdgeMeshLineCell::GetIdent() +auto +QuadEdgeMeshLineCell::GetIdent() -> CellIdentifier { return this->m_Identifier; } diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx index a71785065a2..1b358b7ed5c 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshPolygonCell.hxx @@ -94,8 +94,8 @@ QuadEdgeMeshPolygonCell::~QuadEdgeMeshPolygonCell() // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::SelfAutoPointer -QuadEdgeMeshPolygonCell::New() +auto +QuadEdgeMeshPolygonCell::New() -> SelfAutoPointer { SelfAutoPointer ptr(new Self); @@ -144,8 +144,8 @@ QuadEdgeMeshPolygonCell::GetNumberOfPoints() const // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::CellFeatureCount -QuadEdgeMeshPolygonCell::GetNumberOfBoundaryFeatures(int dimension) const +auto +QuadEdgeMeshPolygonCell::GetNumberOfBoundaryFeatures(int dimension) const -> CellFeatureCount { switch (dimension) { @@ -270,8 +270,8 @@ QuadEdgeMeshPolygonCell::SetPointId(int localId, PointIdentifier // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::PointIdentifier -QuadEdgeMeshPolygonCell::GetPointId(int localId) const +auto +QuadEdgeMeshPolygonCell::GetPointId(int localId) const -> PointIdentifier { int n = 0; PointIdInternalConstIterator it = this->InternalPointIdsBegin(); @@ -290,24 +290,24 @@ QuadEdgeMeshPolygonCell::GetPointId(int localId) const // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::PointIdInternalIterator -QuadEdgeMeshPolygonCell::InternalPointIdsBegin() +auto +QuadEdgeMeshPolygonCell::InternalPointIdsBegin() -> PointIdInternalIterator { return m_EdgeRingEntry->BeginGeomLnext(); } // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::PointIdInternalIterator -QuadEdgeMeshPolygonCell::InternalPointIdsEnd() +auto +QuadEdgeMeshPolygonCell::InternalPointIdsEnd() -> PointIdInternalIterator { return m_EdgeRingEntry->EndGeomLnext(); } // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::PointIdInternalConstIterator -QuadEdgeMeshPolygonCell::InternalGetPointIds() const +auto +QuadEdgeMeshPolygonCell::InternalGetPointIds() const -> PointIdInternalConstIterator { const QuadEdgeType * edge = const_cast(m_EdgeRingEntry); PointIdInternalConstIterator iterator(edge->BeginGeomLnext()); @@ -317,8 +317,8 @@ QuadEdgeMeshPolygonCell::InternalGetPointIds() const // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::PointIdInternalConstIterator -QuadEdgeMeshPolygonCell::InternalPointIdsBegin() const +auto +QuadEdgeMeshPolygonCell::InternalPointIdsBegin() const -> PointIdInternalConstIterator { const QuadEdgeType * edge = const_cast(m_EdgeRingEntry); PointIdInternalConstIterator iterator(edge->BeginGeomLnext()); @@ -328,8 +328,8 @@ QuadEdgeMeshPolygonCell::InternalPointIdsBegin() const // --------------------------------------------------------------------- template -typename QuadEdgeMeshPolygonCell::PointIdInternalConstIterator -QuadEdgeMeshPolygonCell::InternalPointIdsEnd() const +auto +QuadEdgeMeshPolygonCell::InternalPointIdsEnd() const -> PointIdInternalConstIterator { const auto * edge = const_cast(m_EdgeRingEntry); PointIdInternalConstIterator iterator = edge->EndGeomLnext(); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx index 1836f63be2c..fab5b92353e 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshZipMeshFunction.hxx @@ -23,8 +23,8 @@ namespace itk { template -typename QuadEdgeMeshZipMeshFunction::OutputType -QuadEdgeMeshZipMeshFunction::Evaluate(QEType * e) +auto +QuadEdgeMeshZipMeshFunction::Evaluate(QEType * e) -> OutputType { if (!this->m_Mesh) { diff --git a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx index 672b0f83742..8f782aeb651 100644 --- a/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkArrowSpatialObject.hxx @@ -92,8 +92,8 @@ ArrowSpatialObject::IsInsideInObjectSpace(const PointType & point) c } template -typename ArrowSpatialObject::PointType -ArrowSpatialObject::GetPositionInWorldSpace() const +auto +ArrowSpatialObject::GetPositionInWorldSpace() const -> PointType { PointType pnt = this->GetPositionInObjectSpace(); @@ -103,8 +103,8 @@ ArrowSpatialObject::GetPositionInWorldSpace() const } template -typename ArrowSpatialObject::VectorType -ArrowSpatialObject::GetDirectionInWorldSpace() const +auto +ArrowSpatialObject::GetDirectionInWorldSpace() const -> VectorType { PointType pnt = this->GetPositionInObjectSpace(); PointType pnt2; diff --git a/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.hxx index 27f6ed41191..0794609f826 100644 --- a/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkContourSpatialObjectPoint.hxx @@ -47,8 +47,8 @@ ContourSpatialObjectPoint::SetPickedPointInObjectSpace(const Po } template -const typename ContourSpatialObjectPoint::PointType & -ContourSpatialObjectPoint::GetPickedPointInObjectSpace() const +auto +ContourSpatialObjectPoint::GetPickedPointInObjectSpace() const -> const PointType & { return m_PickedPointInObjectSpace; } @@ -61,15 +61,15 @@ ContourSpatialObjectPoint::SetNormalInObjectSpace(const Covaria } template -const typename ContourSpatialObjectPoint::CovariantVectorType & -ContourSpatialObjectPoint::GetNormalInObjectSpace() const +auto +ContourSpatialObjectPoint::GetNormalInObjectSpace() const -> const CovariantVectorType & { return m_NormalInObjectSpace; } template -typename ContourSpatialObjectPoint::Self & -ContourSpatialObjectPoint::operator=(const ContourSpatialObjectPoint & rhs) +auto +ContourSpatialObjectPoint::operator=(const ContourSpatialObjectPoint & rhs) -> Self & { if (this != &rhs) { diff --git a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.hxx index 20e4f586efd..e6d034f5fd7 100644 --- a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.hxx @@ -179,8 +179,8 @@ DTITubeSpatialObjectPoint::GetField(DTITubeSpatialObjectPointFi } template -typename DTITubeSpatialObjectPoint::Self & -DTITubeSpatialObjectPoint::operator=(const DTITubeSpatialObjectPoint & rhs) +auto +DTITubeSpatialObjectPoint::operator=(const DTITubeSpatialObjectPoint & rhs) -> Self & { if (this != &rhs) { diff --git a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx index 005f51ef3ce..38c41a5a5a3 100644 --- a/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkGaussianSpatialObject.hxx @@ -51,8 +51,8 @@ GaussianSpatialObject::Clear() /** The z-score is the root mean square of the z-scores along * each principal axis. */ template -typename GaussianSpatialObject::ScalarType -GaussianSpatialObject::SquaredZScoreInObjectSpace(const PointType & point) const +auto +GaussianSpatialObject::SquaredZScoreInObjectSpace(const PointType & point) const -> ScalarType { ScalarType r = 0; for (unsigned int i = 0; i < TDimension; ++i) @@ -65,8 +65,8 @@ GaussianSpatialObject::SquaredZScoreInObjectSpace(const PointType & /** The z-score is the root mean square of the z-scores along * each principal axis. */ template -typename GaussianSpatialObject::ScalarType -GaussianSpatialObject::SquaredZScoreInWorldSpace(const PointType & point) const +auto +GaussianSpatialObject::SquaredZScoreInWorldSpace(const PointType & point) const -> ScalarType { PointType transformedPoint = this->GetObjectToWorldTransformInverse()->TransformPoint(point); diff --git a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx index df90a37a6a7..843b752a73a 100644 --- a/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx @@ -144,8 +144,8 @@ ImageMaskSpatialObject::PrintSelf(std::ostream & os, Indent template -typename ImageMaskSpatialObject::RegionType -ImageMaskSpatialObject::ComputeMyBoundingBoxInIndexSpace() const +auto +ImageMaskSpatialObject::ComputeMyBoundingBoxInIndexSpace() const -> RegionType { const ImagePointer imagePointer = this->GetImage(); @@ -231,8 +231,8 @@ ImageMaskSpatialObject::ComputeMyBoundingBoxInIndexSpace() c #if !defined(ITK_LEGACY_REMOVE) template -typename ImageMaskSpatialObject::RegionType -ImageMaskSpatialObject::GetAxisAlignedBoundingBoxRegion() const +auto +ImageMaskSpatialObject::GetAxisAlignedBoundingBoxRegion() const -> RegionType { return ComputeMyBoundingBoxInIndexSpace(); } diff --git a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx index ea63c300b58..65ee9e2a019 100644 --- a/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkImageSpatialObject.hxx @@ -172,8 +172,8 @@ ImageSpatialObject::SetImage(const ImageType * image) /** Get the image inside the spatial object */ template -const typename ImageSpatialObject::ImageType * -ImageSpatialObject::GetImage() const +auto +ImageSpatialObject::GetImage() const -> const ImageType * { return m_Image.GetPointer(); } diff --git a/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx index 2fa32b639f1..5416a4bc50f 100644 --- a/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkLineSpatialObjectPoint.hxx @@ -46,8 +46,8 @@ LineSpatialObjectPoint::LineSpatialObjectPoint(const LineSpatia /** Get the specified normal */ template -const typename LineSpatialObjectPoint::CovariantVectorType & -LineSpatialObjectPoint::GetNormalInObjectSpace(unsigned int index) const +auto +LineSpatialObjectPoint::GetNormalInObjectSpace(unsigned int index) const -> const CovariantVectorType & { return m_NormalArrayInObjectSpace[index]; } @@ -77,8 +77,8 @@ LineSpatialObjectPoint::SetNormalInObjectSpace(CovariantVectorT /** Copy a point to another */ template -typename LineSpatialObjectPoint::Self & -LineSpatialObjectPoint::operator=(const LineSpatialObjectPoint & rhs) +auto +LineSpatialObjectPoint::operator=(const LineSpatialObjectPoint & rhs) -> Self & { if (this != &rhs) { diff --git a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx index 5224c05cae0..bf90002d8eb 100644 --- a/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkMeshSpatialObject.hxx @@ -127,15 +127,15 @@ MeshSpatialObject::SetMesh(MeshType * mesh) /** Get the Mesh inside the spatial object */ template -typename MeshSpatialObject::MeshType * -MeshSpatialObject::GetMesh() +auto +MeshSpatialObject::GetMesh() -> MeshType * { return m_Mesh.GetPointer(); } template -const typename MeshSpatialObject::MeshType * -MeshSpatialObject::GetMesh() const +auto +MeshSpatialObject::GetMesh() const -> const MeshType * { return m_Mesh.GetPointer(); } diff --git a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx index 3a2c9a2607b..0cb40aa0de8 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaArrowConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaArrowConverter::MetaObjectType * -MetaArrowConverter::CreateMetaObject() +auto +MetaArrowConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new ArrowMetaObjectType); } /** Convert a metaArrow into an arrow SpatialObject */ template -typename MetaArrowConverter::SpatialObjectPointer -MetaArrowConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaArrowConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * metaArrow = dynamic_cast(mo); if (metaArrow == nullptr) @@ -72,8 +72,8 @@ MetaArrowConverter::MetaObjectToSpatialObject(const MetaObjectType /** Convert an arrow SpatialObject into a metaArrow */ template -typename MetaArrowConverter::MetaObjectType * -MetaArrowConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) +auto +MetaArrowConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) -> MetaObjectType * { ArrowSpatialObjectConstPointer arrowSO = dynamic_cast(spatialObject); if (arrowSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx index 8a6c7138d1d..03372343075 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaBlobConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaBlobConverter::MetaObjectType * -MetaBlobConverter::CreateMetaObject() +auto +MetaBlobConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new BlobMetaObjectType); } /** Convert a metaBlob into an Blob SpatialObject */ template -typename MetaBlobConverter::SpatialObjectPointer -MetaBlobConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaBlobConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * Blob = dynamic_cast(mo); if (Blob == nullptr) @@ -85,8 +85,8 @@ MetaBlobConverter::MetaObjectToSpatialObject(const MetaObjectType * /** Convert a Blob SpatialObject into a metaBlob */ template -typename MetaBlobConverter::MetaObjectType * -MetaBlobConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) +auto +MetaBlobConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) -> MetaObjectType * { BlobSpatialObjectConstPointer blobSO = dynamic_cast(spatialObject); if (blobSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx index 978083473c2..6d20c27c727 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaContourConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaContourConverter::MetaObjectType * -MetaContourConverter::CreateMetaObject() +auto +MetaContourConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new ContourMetaObjectType); } /** Convert a metaContour into an Contour SpatialObject */ template -typename MetaContourConverter::SpatialObjectPointer -MetaContourConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaContourConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * contourMO = dynamic_cast(mo); if (contourMO == nullptr) @@ -130,8 +130,8 @@ MetaContourConverter::MetaObjectToSpatialObject(const MetaObjectTyp /** Convert a Contour SpatialObject into a metaContour */ template -typename MetaContourConverter::MetaObjectType * -MetaContourConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaContourConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { ContourSpatialObjectConstPointer contourSO = dynamic_cast(so); if (contourSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx b/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx index e353d999187..76ea7bd487b 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaConverterBase.hxx @@ -25,8 +25,8 @@ namespace itk { template -typename MetaConverterBase::SpatialObjectPointer -MetaConverterBase::ReadMeta(const char * name) +auto +MetaConverterBase::ReadMeta(const char * name) -> SpatialObjectPointer { SpatialObjectPointer rval; MetaObjectType * mo = this->CreateMetaObject(); diff --git a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx index 7e2ec1e919f..61a6598c6f6 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaDTITubeConverter.hxx @@ -25,16 +25,16 @@ namespace itk { template -typename MetaDTITubeConverter::MetaObjectType * -MetaDTITubeConverter::CreateMetaObject() +auto +MetaDTITubeConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new DTITubeMetaObjectType); } /** Convert a MetaDTITube into an Tube SpatialObject */ template -typename MetaDTITubeConverter::SpatialObjectPointer -MetaDTITubeConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaDTITubeConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * tube = dynamic_cast(mo); if (tube == nullptr) @@ -180,8 +180,9 @@ MetaDTITubeConverter::MetaObjectToSpatialObject(const MetaObjectTyp /** Convert a Tube SpatialObject into a MetaDTITube */ template -typename MetaDTITubeConverter::MetaObjectType * +auto MetaDTITubeConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) + -> MetaObjectType * { DTITubeSpatialObjectConstPointer DTITubeSO = dynamic_cast(spatialObject); if (DTITubeSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx index c1c1882247b..0d05bdbab9c 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaEllipseConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaEllipseConverter::MetaObjectType * -MetaEllipseConverter::CreateMetaObject() +auto +MetaEllipseConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new EllipseMetaObjectType); } /** Convert a metaEllipse into an ellipse SpatialObject */ template -typename MetaEllipseConverter::SpatialObjectPointer -MetaEllipseConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaEllipseConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * ellipseMO = dynamic_cast(mo); if (ellipseMO == nullptr) @@ -63,8 +63,8 @@ MetaEllipseConverter::MetaObjectToSpatialObject(const MetaObjectTyp /** Convert an ellipse SpatialObject into a metaEllipse */ template -typename MetaEllipseConverter::MetaObjectType * -MetaEllipseConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaEllipseConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { EllipseSpatialObjectConstPointer ellipseSO = dynamic_cast(so); if (ellipseSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx index 15b38db9f00..570baa72780 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaGaussianConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaGaussianConverter::MetaObjectType * -MetaGaussianConverter::CreateMetaObject() +auto +MetaGaussianConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new GaussianMetaObjectType); } /** Convert a metaGaussian into a gaussian SpatialObject */ template -typename MetaGaussianConverter::SpatialObjectPointer -MetaGaussianConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaGaussianConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * metaGaussian = dynamic_cast(mo); if (metaGaussian == nullptr) @@ -59,8 +59,8 @@ MetaGaussianConverter::MetaObjectToSpatialObject(const MetaObjectTy /** Convert a gaussian SpatialObject into a metaGaussian */ template -typename MetaGaussianConverter::MetaObjectType * -MetaGaussianConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaGaussianConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { GaussianSpatialObjectConstPointer gaussianSO = dynamic_cast(so); auto * metaGaussian = new GaussianMetaObjectType; diff --git a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx index ebc65a2cf02..9f698793bd8 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaGroupConverter.hxx @@ -23,16 +23,16 @@ namespace itk { template -typename MetaGroupConverter::MetaObjectType * -MetaGroupConverter::CreateMetaObject() +auto +MetaGroupConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new GroupMetaObjectType); } /** Convert a metaGroup into an group SpatialObject */ template -typename MetaGroupConverter::SpatialObjectPointer -MetaGroupConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaGroupConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * group = dynamic_cast(mo); if (group == nullptr) @@ -54,8 +54,8 @@ MetaGroupConverter::MetaObjectToSpatialObject(const MetaObjectType /** Convert a group SpatialObject into a metaGroup */ template -typename MetaGroupConverter::MetaObjectType * -MetaGroupConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaGroupConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { GroupSpatialObjectConstPointer groupSO = dynamic_cast(so); if (groupSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx index 8867a1d0449..c383d14c8e5 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx @@ -26,8 +26,8 @@ namespace itk { template -typename MetaImageConverter::MetaObjectType * -MetaImageConverter::CreateMetaObject() +auto +MetaImageConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new ImageMetaObjectType); } @@ -40,8 +40,9 @@ MetaImageConverter::GetMetaObjectSub } template -typename MetaImageConverter::ImageType::Pointer -MetaImageConverter::AllocateImage(const ImageMetaObjectType * image) +auto +MetaImageConverter::AllocateImage(const ImageMetaObjectType * image) -> + typename ImageType::Pointer { typename ImageType::Pointer rval = ImageType::New(); @@ -80,8 +81,9 @@ MetaImageConverter::AllocateImage(co /** Convert a metaImage into an ImageMaskSpatialObject */ template -typename MetaImageConverter::SpatialObjectPointer +auto MetaImageConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) + -> SpatialObjectPointer { const auto * imageMO = dynamic_cast(mo); @@ -112,8 +114,9 @@ MetaImageConverter::MetaObjectToSpat /** Convert an Image SpatialObject into a metaImage */ template -typename MetaImageConverter::MetaObjectType * +auto MetaImageConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) + -> MetaObjectType * { const ImageSpatialObjectConstPointer imageSO = dynamic_cast(so); diff --git a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx index d522daba041..c2a5a341c9a 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaLandmarkConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaLandmarkConverter::MetaObjectType * -MetaLandmarkConverter::CreateMetaObject() +auto +MetaLandmarkConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new LandmarkMetaObjectType); } /** Convert a metaLandmark into an Landmark SpatialObject */ template -typename MetaLandmarkConverter::SpatialObjectPointer -MetaLandmarkConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaLandmarkConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * landmarkMO = dynamic_cast(mo); if (landmarkMO == nullptr) @@ -83,8 +83,8 @@ MetaLandmarkConverter::MetaObjectToSpatialObject(const MetaObjectTy /** Convert a Landmark SpatialObject into a metaLandmark */ template -typename MetaLandmarkConverter::MetaObjectType * -MetaLandmarkConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaLandmarkConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { const LandmarkSpatialObjectConstPointer landmarkSO = dynamic_cast(so); diff --git a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx index 2c7bad7c9db..2c1ab720199 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaLineConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaLineConverter::MetaObjectType * -MetaLineConverter::CreateMetaObject() +auto +MetaLineConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new LineMetaObjectType); } /** Convert a metaLine into an Line SpatialObject */ template -typename MetaLineConverter::SpatialObjectPointer -MetaLineConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaLineConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * lineMO = dynamic_cast(mo); if (lineMO == nullptr) @@ -93,8 +93,8 @@ MetaLineConverter::MetaObjectToSpatialObject(const MetaObjectType * /** Convert a Line SpatialObject into a metaLine */ template -typename MetaLineConverter::MetaObjectType * -MetaLineConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) +auto +MetaLineConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) -> MetaObjectType * { LineSpatialObjectConstPointer lineSO = dynamic_cast(spatialObject); if (lineSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx index 7a1fb6ff052..f87737f9e38 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaMeshConverter.hxx @@ -29,16 +29,17 @@ namespace itk { template -typename MetaMeshConverter::MetaObjectType * -MetaMeshConverter::CreateMetaObject() +auto +MetaMeshConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new MeshMetaObjectType); } /** Convert a metaMesh into an Mesh SpatialObject */ template -typename MetaMeshConverter::SpatialObjectPointer +auto MetaMeshConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) + -> SpatialObjectPointer { const auto * _mesh = dynamic_cast(mo); if (_mesh == nullptr) @@ -202,8 +203,9 @@ MetaMeshConverter::MetaObjectToSpatialObjec /** Convert a Mesh SpatialObject into a metaMesh */ template -typename MetaMeshConverter::MetaObjectType * +auto MetaMeshConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) + -> MetaObjectType * { const MeshSpatialObjectConstPointer meshSO = dynamic_cast(so); diff --git a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx index 54a4ba9340b..c4e9a87c730 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSceneConverter.hxx @@ -112,8 +112,9 @@ MetaSceneConverter::SetTransform(SpatialObj /** Convert a metaScene into a Composite Spatial Object * Also Managed Composite Spatial Object to keep a hierarchy */ template -typename MetaSceneConverter::SpatialObjectPointer +auto MetaSceneConverter::CreateSpatialObjectScene(MetaScene * mScene) + -> SpatialObjectPointer { SpatialObjectPointer soScene = nullptr; @@ -232,8 +233,8 @@ MetaSceneConverter::CreateSpatialObjectScen /** Read a meta file give the type */ template -typename MetaSceneConverter::SpatialObjectPointer -MetaSceneConverter::ReadMeta(const std::string & name) +auto +MetaSceneConverter::ReadMeta(const std::string & name) -> SpatialObjectPointer { auto * mScene = new MetaScene; diff --git a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx index afade288344..f9bb47719f9 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaSurfaceConverter.hxx @@ -23,16 +23,16 @@ namespace itk { template -typename MetaSurfaceConverter::MetaObjectType * -MetaSurfaceConverter::CreateMetaObject() +auto +MetaSurfaceConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new SurfaceMetaObjectType); } /** Convert a metaSurface into an Surface SpatialObject */ template -typename MetaSurfaceConverter::SpatialObjectPointer -MetaSurfaceConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaSurfaceConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * surfaceMO = dynamic_cast(mo); if (surfaceMO == nullptr) @@ -89,8 +89,8 @@ MetaSurfaceConverter::MetaObjectToSpatialObject(const MetaObjectTyp /** Convert a Surface SpatialObject into a metaSurface */ template -typename MetaSurfaceConverter::MetaObjectType * -MetaSurfaceConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaSurfaceConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { SurfaceSpatialObjectConstPointer surfaceSO = dynamic_cast(so); diff --git a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx index 561cb338512..e5bd55ab018 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaTubeConverter.hxx @@ -23,16 +23,16 @@ namespace itk { template -typename MetaTubeConverter::MetaObjectType * -MetaTubeConverter::CreateMetaObject() +auto +MetaTubeConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new TubeMetaObjectType); } /** Convert a metaTube into an Tube SpatialObject */ template -typename MetaTubeConverter::SpatialObjectPointer -MetaTubeConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaTubeConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * tubeMO = dynamic_cast(mo); if (tubeMO == nullptr) @@ -123,8 +123,8 @@ MetaTubeConverter::MetaObjectToSpatialObject(const MetaObjectType * /** Convert a Tube SpatialObject into a metaTube */ template -typename MetaTubeConverter::MetaObjectType * -MetaTubeConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) +auto +MetaTubeConverter::SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) -> MetaObjectType * { TubeSpatialObjectConstPointer tubeSO = dynamic_cast(spatialObject); if (tubeSO.IsNull()) diff --git a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx index 1beebfa38b4..cd00b8539e8 100644 --- a/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx +++ b/Modules/Core/SpatialObjects/include/itkMetaVesselTubeConverter.hxx @@ -24,16 +24,16 @@ namespace itk { template -typename MetaVesselTubeConverter::MetaObjectType * -MetaVesselTubeConverter::CreateMetaObject() +auto +MetaVesselTubeConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new VesselTubeMetaObjectType); } /** Convert a MetaVesselTube into an Tube SpatialObject */ template -typename MetaVesselTubeConverter::SpatialObjectPointer -MetaVesselTubeConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaVesselTubeConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * vesselTubeMO = dynamic_cast(mo); if (vesselTubeMO == nullptr) @@ -134,8 +134,8 @@ MetaVesselTubeConverter::MetaObjectToSpatialObject(const MetaObject /** Convert a Tube SpatialObject into a MetaVesselTube */ template -typename MetaVesselTubeConverter::MetaObjectType * -MetaVesselTubeConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaVesselTubeConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { const typename VesselTubeSpatialObjectType::ConstPointer vesselTubeSO = dynamic_cast(so); diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx index c6821d6c4e6..24baeafb93a 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObject.hxx @@ -411,8 +411,8 @@ SpatialObject::PrintSelf(std::ostream & os, Indent indent) const /** Get the bounds of the object */ template -const typename SpatialObject::BoundingBoxType * -SpatialObject::GetFamilyBoundingBoxInWorldSpace() const +auto +SpatialObject::GetFamilyBoundingBoxInWorldSpace() const -> const BoundingBoxType * { // Next Transform the corners of the bounding box using PointsContainer = typename BoundingBoxType::PointsContainer; @@ -522,8 +522,8 @@ SpatialObject::SetObjectToParentTransform(const TransformType * tran /** Set the local to global transformation */ template -const typename SpatialObject::TransformType * -SpatialObject::GetObjectToParentTransformInverse() const +auto +SpatialObject::GetObjectToParentTransformInverse() const -> const TransformType * { if (m_ObjectToParentTransform->GetMTime() > m_ObjectToParentTransformInverse->GetMTime()) { @@ -579,8 +579,8 @@ SpatialObject::SetObjectToWorldTransform(const TransformType * trans /** Set the local to global transformation */ template -const typename SpatialObject::TransformType * -SpatialObject::GetObjectToWorldTransformInverse() const +auto +SpatialObject::GetObjectToWorldTransformInverse() const -> const TransformType * { if (m_ObjectToWorldTransform->GetMTime() > m_ObjectToWorldTransformInverse->GetMTime()) { @@ -659,8 +659,8 @@ SpatialObject::ComputeMyBoundingBox() /** Get the bounds of the object */ template -const typename SpatialObject::BoundingBoxType * -SpatialObject::GetMyBoundingBoxInWorldSpace() const +auto +SpatialObject::GetMyBoundingBoxInWorldSpace() const -> const BoundingBoxType * { // Next Transform the corners of the bounding box using PointsContainer = typename BoundingBoxType::PointsContainer; @@ -755,8 +755,8 @@ SpatialObject::ComputeFamilyBoundingBox(unsigned int depth, const st * User is responsible for freeing the list, but not the elements of * the list. */ template -typename SpatialObject::ChildrenListType * -SpatialObject::GetChildren(unsigned int depth, const std::string & name) const +auto +SpatialObject::GetChildren(unsigned int depth, const std::string & name) const -> ChildrenListType * { auto * childrenSO = new ChildrenListType; @@ -787,8 +787,9 @@ SpatialObject::GetChildren(unsigned int depth, const std::string & n * User is responsible for freeing the list, but not the elements of * the list. */ template -typename SpatialObject::ChildrenConstListType * +auto SpatialObject::GetConstChildren(unsigned int depth, const std::string & name) const + -> ChildrenConstListType * { auto * childrenSO = new ChildrenConstListType; diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx index 3d732cf629d..493ba7b36f9 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectPoint.hxx @@ -64,8 +64,8 @@ SpatialObjectPoint::SetPositionInWorldSpace(const PointType & p } template -typename SpatialObjectPoint::PointType -SpatialObjectPoint::GetPositionInWorldSpace() const +auto +SpatialObjectPoint::GetPositionInWorldSpace() const -> PointType { if (m_SpatialObject == nullptr) { @@ -87,8 +87,8 @@ SpatialObjectPoint::SetColor(double r, double g, double b, doub } template -typename SpatialObjectPoint::Self & -SpatialObjectPoint::operator=(const SpatialObjectPoint & rhs) +auto +SpatialObjectPoint::operator=(const SpatialObjectPoint & rhs) -> Self & { if (this != &rhs) { diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.hxx index 894c61aa37b..ff729b3cf10 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.hxx @@ -66,16 +66,17 @@ SpatialObjectToImageFilter::SetInput(unsigned /** Get the input Spatial Object */ template -const typename SpatialObjectToImageFilter::InputSpatialObjectType * -SpatialObjectToImageFilter::GetInput() +auto +SpatialObjectToImageFilter::GetInput() -> const InputSpatialObjectType * { return static_cast(this->GetPrimaryInput()); } /** Get the input Spatial Object */ template -const typename SpatialObjectToImageFilter::InputSpatialObjectType * +auto SpatialObjectToImageFilter::GetInput(unsigned int idx) + -> const InputSpatialObjectType * { return static_cast(this->ProcessObject::GetInput(idx)); } @@ -255,8 +256,8 @@ SpatialObjectToImageFilter::SetDirection(cons } template -const typename SpatialObjectToImageFilter::DirectionType & -SpatialObjectToImageFilter::GetDirection() const +auto +SpatialObjectToImageFilter::GetDirection() const -> const DirectionType & { return m_Direction; } diff --git a/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx b/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx index 500094e891e..d1b6d665156 100644 --- a/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx +++ b/Modules/Core/SpatialObjects/include/itkSpatialObjectToPointSetFilter.hxx @@ -48,15 +48,16 @@ SpatialObjectToPointSetFilter::SetInp } template -const typename SpatialObjectToPointSetFilter::SpatialObjectType * -SpatialObjectToPointSetFilter::GetInput() +auto +SpatialObjectToPointSetFilter::GetInput() -> const SpatialObjectType * { return static_cast(this->GetPrimaryInput()); } template -const typename SpatialObjectToPointSetFilter::SpatialObjectType * +auto SpatialObjectToPointSetFilter::GetInput(unsigned int idx) + -> const SpatialObjectType * { return static_cast(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx index c4c3c8c4ac1..1426478edb6 100644 --- a/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkSurfaceSpatialObjectPoint.hxx @@ -61,16 +61,16 @@ SurfaceSpatialObjectPoint::SetNormalInWorldSpace(const Covarian /** Get the normal at one point */ template -const typename SurfaceSpatialObjectPoint::CovariantVectorType & -SurfaceSpatialObjectPoint::GetNormalInObjectSpace() const +auto +SurfaceSpatialObjectPoint::GetNormalInObjectSpace() const -> const CovariantVectorType & { return m_NormalInObjectSpace; } /** Get the normal at one point */ template -const typename SurfaceSpatialObjectPoint::CovariantVectorType -SurfaceSpatialObjectPoint::GetNormalInWorldSpace() const +auto +SurfaceSpatialObjectPoint::GetNormalInWorldSpace() const -> const CovariantVectorType { if (this->m_SpatialObject == nullptr) { @@ -93,8 +93,8 @@ SurfaceSpatialObjectPoint::PrintSelf(std::ostream & os, Indent /** Copy a surface point to another */ template -typename SurfaceSpatialObjectPoint::Self & -SurfaceSpatialObjectPoint::operator=(const SurfaceSpatialObjectPoint & rhs) +auto +SurfaceSpatialObjectPoint::operator=(const SurfaceSpatialObjectPoint & rhs) -> Self & { if (this != &rhs) { diff --git a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx index e447ebd3cbe..2b0cef7c435 100644 --- a/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx +++ b/Modules/Core/SpatialObjects/include/itkTubeSpatialObjectPoint.hxx @@ -110,8 +110,8 @@ TubeSpatialObjectPoint::SetRadiusInWorldSpace(double newR) } template -const typename TubeSpatialObjectPoint::VectorType -TubeSpatialObjectPoint::GetTangentInWorldSpace() const +auto +TubeSpatialObjectPoint::GetTangentInWorldSpace() const -> const VectorType { if (this->m_SpatialObject == nullptr) { @@ -135,8 +135,8 @@ TubeSpatialObjectPoint::SetTangentInWorldSpace(const VectorType } template -const typename TubeSpatialObjectPoint::CovariantVectorType -TubeSpatialObjectPoint::GetNormal1InWorldSpace() const +auto +TubeSpatialObjectPoint::GetNormal1InWorldSpace() const -> const CovariantVectorType { if (this->m_SpatialObject == nullptr) { @@ -160,8 +160,8 @@ TubeSpatialObjectPoint::SetNormal1InWorldSpace(const CovariantV } template -const typename TubeSpatialObjectPoint::CovariantVectorType -TubeSpatialObjectPoint::GetNormal2InWorldSpace() const +auto +TubeSpatialObjectPoint::GetNormal2InWorldSpace() const -> const CovariantVectorType { if (this->m_SpatialObject == nullptr) { @@ -206,8 +206,8 @@ TubeSpatialObjectPoint::PrintSelf(std::ostream & os, Indent ind } template -typename TubeSpatialObjectPoint::Self & -TubeSpatialObjectPoint::operator=(const TubeSpatialObjectPoint & rhs) +auto +TubeSpatialObjectPoint::operator=(const TubeSpatialObjectPoint & rhs) -> Self & { if (this != &rhs) { diff --git a/Modules/Core/TestKernel/include/itkRandomImageSource.hxx b/Modules/Core/TestKernel/include/itkRandomImageSource.hxx index 9cc19319310..7384aa980cd 100644 --- a/Modules/Core/TestKernel/include/itkRandomImageSource.hxx +++ b/Modules/Core/TestKernel/include/itkRandomImageSource.hxx @@ -80,8 +80,8 @@ RandomImageSource::SetSize(SizeValueArrayType sizeArray) } template -const typename RandomImageSource::SizeValueType * -RandomImageSource::GetSize() const +auto +RandomImageSource::GetSize() const -> const SizeValueType * { return this->m_Size.GetSize(); } @@ -135,8 +135,8 @@ RandomImageSource::SetOrigin(PointValueArrayType originArray) } template -const typename RandomImageSource::PointValueType * -RandomImageSource::GetOrigin() const +auto +RandomImageSource::GetOrigin() const -> const PointValueType * { for (unsigned int i = 0; i < TOutputImage::ImageDimension; ++i) { @@ -146,8 +146,8 @@ RandomImageSource::GetOrigin() const } template -const typename RandomImageSource::SpacingValueType * -RandomImageSource::GetSpacing() const +auto +RandomImageSource::GetSpacing() const -> const SpacingValueType * { for (unsigned int i = 0; i < TOutputImage::ImageDimension; ++i) { diff --git a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx index 9a016e3c6d1..d41054001b5 100644 --- a/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx +++ b/Modules/Core/TestKernel/include/itkTestingHashImageFilter.hxx @@ -39,8 +39,8 @@ HashImageFilter::HashImageFilter() template -typename HashImageFilter::DataObjectPointer -HashImageFilter::MakeOutput(DataObjectPointerArraySizeType idx) +auto +HashImageFilter::MakeOutput(DataObjectPointerArraySizeType idx) -> DataObjectPointer { if (idx == 1) { diff --git a/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx b/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx index e5a2c035600..50f296f4ef0 100644 --- a/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineBaseTransform.hxx @@ -207,16 +207,17 @@ BSplineBaseTransform::WrapAsIma // Get the parameters template -const typename BSplineBaseTransform::ParametersType & -BSplineBaseTransform::GetParameters() const +auto +BSplineBaseTransform::GetParameters() const -> const ParametersType & { return this->m_InternalParametersBuffer; } // Get the parameters template -const typename BSplineBaseTransform::FixedParametersType & +auto BSplineBaseTransform::GetFixedParameters() const + -> const FixedParametersType & { // HACK: This should not be necessary if the // class is kept in a consistent state @@ -297,8 +298,9 @@ BSplineBaseTransform::GetNumber // This helper class is used to work around a race condition where the dynamically // generated images must exist before the references to the sub-sections are created. template -typename BSplineBaseTransform::CoefficientImageArray +auto BSplineBaseTransform::ArrayOfImagePointerGeneratorHelper() + -> CoefficientImageArray { CoefficientImageArray tempArrayOfPointers; diff --git a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx index 31d4a3c3691..b9eeba7da02 100644 --- a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx @@ -75,8 +75,9 @@ BSplineDeformableTransform::BSp // Get the number of parameters template -typename BSplineDeformableTransform::NumberOfParametersType +auto BSplineDeformableTransform::GetNumberOfParameters() const + -> NumberOfParametersType { // The number of parameters equal SpaceDimension * number of // of pixels in the grid region. @@ -85,8 +86,9 @@ BSplineDeformableTransform::Get // Get the number of parameters per dimension template -typename BSplineDeformableTransform::NumberOfParametersType +auto BSplineDeformableTransform::GetNumberOfParametersPerDimension() const + -> NumberOfParametersType { // The number of parameters per dimension equal number of // of pixels in the grid region. diff --git a/Modules/Core/Transform/include/itkBSplineTransform.hxx b/Modules/Core/Transform/include/itkBSplineTransform.hxx index 8d84b096401..fbfc3df0572 100644 --- a/Modules/Core/Transform/include/itkBSplineTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineTransform.hxx @@ -81,8 +81,9 @@ BSplineTransform::GetTransformT template -typename BSplineTransform::NumberOfParametersType +auto BSplineTransform::GetNumberOfParameters() const + -> NumberOfParametersType { // The number of parameters equals SpaceDimension * number of // of pixels in the grid region. @@ -91,8 +92,9 @@ BSplineTransform::GetNumberOfPa template -typename BSplineTransform::NumberOfParametersType +auto BSplineTransform::GetNumberOfParametersPerDimension() const + -> NumberOfParametersType { // The number of parameters per dimension equals the number of // of pixels in the grid region. diff --git a/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx b/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx index 0a35ce90d47..4ff50166523 100644 --- a/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredAffineTransform.hxx @@ -32,8 +32,8 @@ CenteredAffineTransform::CenteredAffineTransf // Get parameters template -const typename CenteredAffineTransform::ParametersType & -CenteredAffineTransform::GetParameters() const +auto +CenteredAffineTransform::GetParameters() const -> const ParametersType & { // Transfer the linear part unsigned int par = 0; @@ -168,8 +168,8 @@ CenteredAffineTransform::GetInverse(Self * in // Return an inverse of this transform template -typename CenteredAffineTransform::InverseTransformBasePointer -CenteredAffineTransform::GetInverseTransform() const +auto +CenteredAffineTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx index 76fb0c96ab3..6090379876b 100644 --- a/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredEuler3DTransform.hxx @@ -99,8 +99,8 @@ CenteredEuler3DTransform::SetParameters(const ParametersTy // template -const typename CenteredEuler3DTransform::ParametersType & -CenteredEuler3DTransform::GetParameters() const +auto +CenteredEuler3DTransform::GetParameters() const -> const ParametersType & { ParametersType parameters; @@ -192,8 +192,8 @@ CenteredEuler3DTransform::GetInverse(Self * inverse) const // Return an inverse of this transform template -typename CenteredEuler3DTransform::InverseTransformBasePointer -CenteredEuler3DTransform::GetInverseTransform() const +auto +CenteredEuler3DTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx b/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx index 958d16557c5..592dee86e57 100644 --- a/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredRigid2DTransform.hxx @@ -87,8 +87,8 @@ CenteredRigid2DTransform::SetParameters(const ParametersTy template -const typename CenteredRigid2DTransform::ParametersType & -CenteredRigid2DTransform::GetParameters() const +auto +CenteredRigid2DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); // Parameters are ordered as: @@ -162,8 +162,8 @@ CenteredRigid2DTransform::SetFixedParameters(const FixedPa template -const typename CenteredRigid2DTransform::FixedParametersType & -CenteredRigid2DTransform::GetFixedParameters() const +auto +CenteredRigid2DTransform::GetFixedParameters() const -> const FixedParametersType & { // return dummy parameters return this->m_FixedParameters; @@ -197,8 +197,8 @@ CenteredRigid2DTransform::GetInverse(Self * inverse) const template -typename CenteredRigid2DTransform::InverseTransformBasePointer -CenteredRigid2DTransform::GetInverseTransform() const +auto +CenteredRigid2DTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx index f592772744b..60e218da43c 100644 --- a/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkCenteredSimilarity2DTransform.hxx @@ -84,8 +84,8 @@ CenteredSimilarity2DTransform::SetParameters(const Paramet template -const typename CenteredSimilarity2DTransform::ParametersType & -CenteredSimilarity2DTransform::GetParameters() const +auto +CenteredSimilarity2DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); @@ -163,8 +163,8 @@ CenteredSimilarity2DTransform::SetFixedParameters( template -const typename CenteredSimilarity2DTransform::FixedParametersType & -CenteredSimilarity2DTransform::GetFixedParameters() const +auto +CenteredSimilarity2DTransform::GetFixedParameters() const -> const FixedParametersType & { // return dummy parameters return this->m_FixedParameters; @@ -212,8 +212,8 @@ CenteredSimilarity2DTransform::GetInverse(Self * inverse) template -typename CenteredSimilarity2DTransform::InverseTransformBasePointer -CenteredSimilarity2DTransform::GetInverseTransform() const +auto +CenteredSimilarity2DTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx b/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx index 346dda1ec1a..1c29e406554 100644 --- a/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkComposeScaleSkewVersor3DTransform.hxx @@ -152,8 +152,8 @@ ComposeScaleSkewVersor3DTransform::SetParameters(const Par // template -const typename ComposeScaleSkewVersor3DTransform::ParametersType & -ComposeScaleSkewVersor3DTransform::GetParameters() const +auto +ComposeScaleSkewVersor3DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); diff --git a/Modules/Core/Transform/include/itkCompositeTransform.hxx b/Modules/Core/Transform/include/itkCompositeTransform.hxx index dd62fe5dbfd..4756912d1ed 100644 --- a/Modules/Core/Transform/include/itkCompositeTransform.hxx +++ b/Modules/Core/Transform/include/itkCompositeTransform.hxx @@ -33,8 +33,8 @@ CompositeTransform::CompositeTransform() } template -typename CompositeTransform::TransformCategoryEnum -CompositeTransform::GetTransformCategory() const +auto +CompositeTransform::GetTransformCategory() const -> TransformCategoryEnum { // Check if linear bool isLinearTransform = this->IsLinear(); @@ -67,8 +67,9 @@ CompositeTransform::GetTransformCategory() co template -typename CompositeTransform::OutputPointType +auto CompositeTransform::TransformPoint(const InputPointType & inputPoint) const + -> OutputPointType { /* Apply in reverse queue order. */ @@ -82,8 +83,9 @@ CompositeTransform::TransformPoint(const Inpu template -typename CompositeTransform::OutputVectorType +auto CompositeTransform::TransformVector(const InputVectorType & inputVector) const + -> OutputVectorType { OutputVectorType outputVector(inputVector); @@ -137,8 +139,9 @@ CompositeTransform::TransformVector(const Inp template -typename CompositeTransform::OutputVnlVectorType +auto CompositeTransform::TransformVector(const InputVnlVectorType & inputVector) const + -> OutputVnlVectorType { OutputVnlVectorType outputVector(inputVector); @@ -153,8 +156,9 @@ CompositeTransform::TransformVector(const Inp template -typename CompositeTransform::OutputVectorPixelType +auto CompositeTransform::TransformVector(const InputVectorPixelType & inputVector) const + -> OutputVectorPixelType { OutputVectorPixelType outputVector(inputVector); @@ -446,8 +450,8 @@ CompositeTransform::GetInverse(Self * inverse template -typename CompositeTransform::InverseTransformBasePointer -CompositeTransform::GetInverseTransform() const +auto +CompositeTransform::GetInverseTransform() const -> InverseTransformBasePointer { /* This method can't be defined in Superclass because of the call to New() */ Pointer inverseTransform = New(); @@ -610,8 +614,8 @@ CompositeTransform::ComputeJacobianWithRespec template -const typename CompositeTransform::ParametersType & -CompositeTransform::GetParameters() const +auto +CompositeTransform::GetParameters() const -> const ParametersType & { const TransformQueueType & transforms = this->GetTransformsToOptimizeQueue(); if (transforms.size() == 1) @@ -703,8 +707,8 @@ CompositeTransform::SetParameters(const Param template -const typename CompositeTransform::FixedParametersType & -CompositeTransform::GetFixedParameters() const +auto +CompositeTransform::GetFixedParameters() const -> const FixedParametersType & { TransformQueueType transforms = this->GetTransformsToOptimizeQueue(); /* Resize destructively. But if it's already this size, nothing is done so @@ -755,8 +759,8 @@ CompositeTransform::SetFixedParameters(const template -typename CompositeTransform::NumberOfParametersType -CompositeTransform::GetNumberOfParameters() const +auto +CompositeTransform::GetNumberOfParameters() const -> NumberOfParametersType { /* Returns to total number of params in all transforms currently * set to be used for optimized. @@ -781,8 +785,8 @@ CompositeTransform::GetNumberOfParameters() c template -typename CompositeTransform::NumberOfParametersType -CompositeTransform::GetNumberOfLocalParameters() const +auto +CompositeTransform::GetNumberOfLocalParameters() const -> NumberOfParametersType { if (this->GetMTime() == this->m_LocalParametersUpdateTime) { @@ -811,8 +815,8 @@ CompositeTransform::GetNumberOfLocalParameter template -typename CompositeTransform::NumberOfParametersType -CompositeTransform::GetNumberOfFixedParameters() const +auto +CompositeTransform::GetNumberOfFixedParameters() const -> NumberOfParametersType { /* Returns to total number of params in all transforms currently * set to be used for optimized. @@ -885,8 +889,9 @@ CompositeTransform::UpdateTransformParameters template -const typename CompositeTransform::TransformQueueType & +auto CompositeTransform::GetTransformsToOptimizeQueue() const + -> const TransformQueueType & { /* Update the list of transforms to use for optimization only if the selection of transforms to optimize may have changed */ diff --git a/Modules/Core/Transform/include/itkEuler2DTransform.hxx b/Modules/Core/Transform/include/itkEuler2DTransform.hxx index 2e73c4406a0..ed596bb6f15 100644 --- a/Modules/Core/Transform/include/itkEuler2DTransform.hxx +++ b/Modules/Core/Transform/include/itkEuler2DTransform.hxx @@ -63,8 +63,8 @@ Euler2DTransform::GetInverse(Self * inverse) const // Return an inverse of this transform template -typename Euler2DTransform::InverseTransformBasePointer -Euler2DTransform::GetInverseTransform() const +auto +Euler2DTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkEuler3DTransform.hxx b/Modules/Core/Transform/include/itkEuler3DTransform.hxx index 6977b0488b2..12eb82d6a00 100644 --- a/Modules/Core/Transform/include/itkEuler3DTransform.hxx +++ b/Modules/Core/Transform/include/itkEuler3DTransform.hxx @@ -106,8 +106,8 @@ Euler3DTransform::SetParameters(const ParametersType & par // Get Parameters template -const typename Euler3DTransform::ParametersType & -Euler3DTransform::GetParameters() const +auto +Euler3DTransform::GetParameters() const -> const ParametersType & { this->m_Parameters[0] = m_AngleX; this->m_Parameters[1] = m_AngleY; @@ -120,8 +120,8 @@ Euler3DTransform::GetParameters() const } template -const typename Euler3DTransform::FixedParametersType & -Euler3DTransform::GetFixedParameters() const +auto +Euler3DTransform::GetFixedParameters() const -> const FixedParametersType & { // Call the superclass GetFixedParameters so that it fills the // array, we ignore the returned data and add the additional diff --git a/Modules/Core/Transform/include/itkKernelTransform.hxx b/Modules/Core/Transform/include/itkKernelTransform.hxx index e28f9539f18..0a54a044cdb 100644 --- a/Modules/Core/Transform/include/itkKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkKernelTransform.hxx @@ -319,8 +319,9 @@ KernelTransform::ReorganizeW() template -typename KernelTransform::OutputPointType +auto KernelTransform::TransformPoint(const InputPointType & thisPoint) const + -> OutputPointType { OutputPointType result; @@ -473,8 +474,8 @@ KernelTransform::UpdateParameters() const template -const typename KernelTransform::ParametersType & -KernelTransform::GetParameters() const +auto +KernelTransform::GetParameters() const -> const ParametersType & { this->UpdateParameters(); return this->m_Parameters; @@ -482,8 +483,8 @@ KernelTransform::GetParameters() const template -const typename KernelTransform::FixedParametersType & -KernelTransform::GetFixedParameters() const +auto +KernelTransform::GetFixedParameters() const -> const FixedParametersType & { // Get the fixed parameters // This returns the target landmark locations diff --git a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx index 167e10fd65b..1744a8aa15a 100644 --- a/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx +++ b/Modules/Core/Transform/include/itkMatrixOffsetTransformBase.hxx @@ -392,8 +392,9 @@ MatrixOffsetTransformBase -const typename MatrixOffsetTransformBase::InverseMatrixType & +auto MatrixOffsetTransformBase::GetInverseMatrix() const + -> const InverseMatrixType & { // If the transform has been modified we recompute the inverse if (m_InverseMatrixMTime != m_MatrixMTime) @@ -485,8 +486,9 @@ const typename MatrixOffsetTransformBase -const typename MatrixOffsetTransformBase::ParametersType & +auto MatrixOffsetTransformBase::GetParameters() const + -> const ParametersType & { // Transfer the linear part unsigned int par = 0; diff --git a/Modules/Core/Transform/include/itkMultiTransform.hxx b/Modules/Core/Transform/include/itkMultiTransform.hxx index 92683060e27..549a233bca4 100644 --- a/Modules/Core/Transform/include/itkMultiTransform.hxx +++ b/Modules/Core/Transform/include/itkMultiTransform.hxx @@ -34,8 +34,8 @@ MultiTransform::MultiTransfor } template -typename MultiTransform::TransformCategoryEnum -MultiTransform::GetTransformCategory() const +auto +MultiTransform::GetTransformCategory() const -> TransformCategoryEnum { // If all sub-transforms are the same, return that type. Otherwise // return Unknown. @@ -79,8 +79,8 @@ MultiTransform::IsLinear() co template -const typename MultiTransform::ParametersType & -MultiTransform::GetParameters() const +auto +MultiTransform::GetParameters() const -> const ParametersType & { /* Resize destructively. But if it's already this size, nothing is done so * it's efficient. */ @@ -148,8 +148,9 @@ MultiTransform::SetParameters template -const typename MultiTransform::FixedParametersType & +auto MultiTransform::GetFixedParameters() const + -> const FixedParametersType & { /* Resize destructively. But if it's already this size, nothing is done so * it's efficient. */ @@ -207,8 +208,9 @@ MultiTransform::SetFixedParam template -typename MultiTransform::NumberOfParametersType +auto MultiTransform::GetNumberOfParameters() const + -> NumberOfParametersType { /* Returns to total number of params in all transforms currently * set to be used for optimized. @@ -231,8 +233,9 @@ MultiTransform::GetNumberOfPa template -typename MultiTransform::NumberOfParametersType +auto MultiTransform::GetNumberOfLocalParameters() const + -> NumberOfParametersType { if (this->GetMTime() == this->m_LocalParametersUpdateTime) { @@ -257,8 +260,9 @@ MultiTransform::GetNumberOfLo template -typename MultiTransform::NumberOfParametersType +auto MultiTransform::GetNumberOfFixedParameters() const + -> NumberOfParametersType { NumberOfParametersType result = NumericTraits::ZeroValue(); diff --git a/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx b/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx index 9147de2a084..a6486f62a85 100644 --- a/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx +++ b/Modules/Core/Transform/include/itkQuaternionRigidTransform.hxx @@ -114,8 +114,8 @@ QuaternionRigidTransform::SetParameters(const ParametersTy // Set Parameters template -const typename QuaternionRigidTransform::ParametersType & -QuaternionRigidTransform::GetParameters() const +auto +QuaternionRigidTransform::GetParameters() const -> const ParametersType & { VnlQuaternionType quaternion = this->GetRotation(); OutputVectorType translation = this->GetTranslation(); @@ -175,8 +175,8 @@ QuaternionRigidTransform::ComputeJacobianWithRespectToPara } template -const typename QuaternionRigidTransform::InverseMatrixType & -QuaternionRigidTransform::GetInverseMatrix() const +auto +QuaternionRigidTransform::GetInverseMatrix() const -> const InverseMatrixType & { // If the transform has been modified we recompute the inverse if (this->InverseMatrixIsOld()) diff --git a/Modules/Core/Transform/include/itkRigid2DTransform.hxx b/Modules/Core/Transform/include/itkRigid2DTransform.hxx index 9045f6089d7..432770d3dce 100644 --- a/Modules/Core/Transform/include/itkRigid2DTransform.hxx +++ b/Modules/Core/Transform/include/itkRigid2DTransform.hxx @@ -150,8 +150,8 @@ Rigid2DTransform::GetInverse(Self * inverse) const template -typename Rigid2DTransform::InverseTransformBasePointer -Rigid2DTransform::GetInverseTransform() const +auto +Rigid2DTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); @@ -255,8 +255,8 @@ Rigid2DTransform::SetParameters(const ParametersType & par template -const typename Rigid2DTransform::ParametersType & -Rigid2DTransform::GetParameters() const +auto +Rigid2DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); diff --git a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx index 9c7afd2f674..89447c1e887 100644 --- a/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx +++ b/Modules/Core/Transform/include/itkRigid3DPerspectiveTransform.hxx @@ -109,8 +109,8 @@ Rigid3DPerspectiveTransform::SetParameters(const Parameter // Set Parameters template -const typename Rigid3DPerspectiveTransform::ParametersType & -Rigid3DPerspectiveTransform::GetParameters() const +auto +Rigid3DPerspectiveTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); @@ -164,8 +164,8 @@ Rigid3DPerspectiveTransform::SetRotation(const Vector -typename Rigid3DPerspectiveTransform::OutputPointType -Rigid3DPerspectiveTransform::TransformPoint(const InputPointType & point) const +auto +Rigid3DPerspectiveTransform::TransformPoint(const InputPointType & point) const -> OutputPointType { unsigned int i; InputPointType centered; diff --git a/Modules/Core/Transform/include/itkScalableAffineTransform.hxx b/Modules/Core/Transform/include/itkScalableAffineTransform.hxx index c251eb7ac39..ef200d33ace 100644 --- a/Modules/Core/Transform/include/itkScalableAffineTransform.hxx +++ b/Modules/Core/Transform/include/itkScalableAffineTransform.hxx @@ -150,8 +150,8 @@ ScalableAffineTransform::GetInverse(Self * in // Return an inverse of this transform template -typename ScalableAffineTransform::InverseTransformBasePointer -ScalableAffineTransform::GetInverseTransform() const +auto +ScalableAffineTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx b/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx index 9dc4050da5a..a78c9afbf66 100644 --- a/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleLogarithmicTransform.hxx @@ -47,8 +47,8 @@ ScaleLogarithmicTransform::SetParameters(cons // Get Parameters template -const typename ScaleLogarithmicTransform::ParametersType & -ScaleLogarithmicTransform::GetParameters() const +auto +ScaleLogarithmicTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); diff --git a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx index 400cbc344ee..8cb9e6332b7 100644 --- a/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleSkewVersor3DTransform.hxx @@ -151,8 +151,8 @@ ScaleSkewVersor3DTransform::SetParameters(const Parameters // template -const typename ScaleSkewVersor3DTransform::ParametersType & -ScaleSkewVersor3DTransform::GetParameters() const +auto +ScaleSkewVersor3DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); diff --git a/Modules/Core/Transform/include/itkScaleTransform.hxx b/Modules/Core/Transform/include/itkScaleTransform.hxx index 39e47ab28df..9871e0a7c65 100644 --- a/Modules/Core/Transform/include/itkScaleTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleTransform.hxx @@ -55,8 +55,8 @@ ScaleTransform::SetParameters(const Parameter template -const typename ScaleTransform::ParametersType & -ScaleTransform::GetParameters() const +auto +ScaleTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); // Transfer the translation part @@ -104,8 +104,8 @@ ScaleTransform::Scale(const ScaleType & scale template -typename ScaleTransform::OutputPointType -ScaleTransform::TransformPoint(const InputPointType & point) const +auto +ScaleTransform::TransformPoint(const InputPointType & point) const -> OutputPointType { OutputPointType result; const InputPointType & center = this->GetCenter(); @@ -119,8 +119,9 @@ ScaleTransform::TransformPoint(const InputPoi template -typename ScaleTransform::OutputVectorType +auto ScaleTransform::TransformVector(const InputVectorType & vect) const + -> OutputVectorType { OutputVectorType result; @@ -133,8 +134,9 @@ ScaleTransform::TransformVector(const InputVe template -typename ScaleTransform::OutputVnlVectorType +auto ScaleTransform::TransformVector(const InputVnlVectorType & vect) const + -> OutputVnlVectorType { OutputVnlVectorType result; @@ -147,8 +149,9 @@ ScaleTransform::TransformVector(const InputVn template -typename ScaleTransform::OutputCovariantVectorType +auto ScaleTransform::TransformCovariantVector(const InputCovariantVectorType & vect) const + -> OutputCovariantVectorType { // Covariant Vectors are scaled by the inverse OutputCovariantVectorType result; @@ -180,8 +183,8 @@ ScaleTransform::GetInverse(Self * inverse) co template -typename ScaleTransform::InverseTransformBasePointer -ScaleTransform::GetInverseTransform() const +auto +ScaleTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx b/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx index edf0da7d353..7e1d9402b9b 100644 --- a/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleVersor3DTransform.hxx @@ -139,8 +139,8 @@ ScaleVersor3DTransform::SetParameters(const ParametersType // template -const typename ScaleVersor3DTransform::ParametersType & -ScaleVersor3DTransform::GetParameters() const +auto +ScaleVersor3DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); diff --git a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx index 5c48cddbf14..a8c32202447 100644 --- a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx @@ -88,8 +88,8 @@ Similarity2DTransform::SetParameters(const ParametersType template -const typename Similarity2DTransform::ParametersType & -Similarity2DTransform::GetParameters() const +auto +Similarity2DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); @@ -257,8 +257,8 @@ Similarity2DTransform::GetInverse(Self * inverse) const template -typename Similarity2DTransform::InverseTransformBasePointer -Similarity2DTransform::GetInverseTransform() const +auto +Similarity2DTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx index 51b9c245625..a845b76ab2a 100644 --- a/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity3DTransform.hxx @@ -185,8 +185,8 @@ Similarity3DTransform::SetParameters(const ParametersType // template -const typename Similarity3DTransform::ParametersType & -Similarity3DTransform::GetParameters() const +auto +Similarity3DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); diff --git a/Modules/Core/Transform/include/itkTranslationTransform.hxx b/Modules/Core/Transform/include/itkTranslationTransform.hxx index 2be4453e626..8e23fe741f3 100644 --- a/Modules/Core/Transform/include/itkTranslationTransform.hxx +++ b/Modules/Core/Transform/include/itkTranslationTransform.hxx @@ -75,8 +75,8 @@ TranslationTransform::SetParameters(const Par template -const typename TranslationTransform::ParametersType & -TranslationTransform::GetParameters() const +auto +TranslationTransform::GetParameters() const -> const ParametersType & { for (unsigned int i = 0; i < SpaceDimension; ++i) { @@ -119,24 +119,27 @@ TranslationTransform::Translate(const OutputV template -typename TranslationTransform::OutputPointType +auto TranslationTransform::TransformPoint(const InputPointType & point) const + -> OutputPointType { return point + m_Offset; } template -typename TranslationTransform::OutputVectorType +auto TranslationTransform::TransformVector(const InputVectorType & vect) const + -> OutputVectorType { return vect; } template -typename TranslationTransform::OutputVnlVectorType +auto TranslationTransform::TransformVector(const InputVnlVectorType & vect) const + -> OutputVnlVectorType { return vect; } @@ -167,8 +170,8 @@ TranslationTransform::GetInverse(Self * inver template -typename TranslationTransform::InverseTransformBasePointer -TranslationTransform::GetInverseTransform() const +auto +TranslationTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inv = New(); diff --git a/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx b/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx index 6233a9c8422..88c77a0f878 100644 --- a/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx +++ b/Modules/Core/Transform/include/itkVersorRigid3DTransform.hxx @@ -106,8 +106,8 @@ VersorRigid3DTransform::SetParameters(const ParametersType // template -const typename VersorRigid3DTransform::ParametersType & -VersorRigid3DTransform::GetParameters() const +auto +VersorRigid3DTransform::GetParameters() const -> const ParametersType & { itkDebugMacro(<< "Getting parameters "); diff --git a/Modules/Core/Transform/include/itkVersorTransform.hxx b/Modules/Core/Transform/include/itkVersorTransform.hxx index 77eecb6dffb..d501ffd60e0 100644 --- a/Modules/Core/Transform/include/itkVersorTransform.hxx +++ b/Modules/Core/Transform/include/itkVersorTransform.hxx @@ -83,8 +83,8 @@ VersorTransform::SetParameters(const ParametersType & para /** Set Parameters */ template -const typename VersorTransform::ParametersType & -VersorTransform::GetParameters() const +auto +VersorTransform::GetParameters() const -> const ParametersType & { this->m_Parameters[0] = this->m_Versor.GetRight()[0]; this->m_Parameters[1] = this->m_Versor.GetRight()[1]; diff --git a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx index 7c3f530d502..a2ca1ab0985 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx @@ -169,8 +169,8 @@ MRASlabIdentifier::GenerateSlabRegions() } template -typename MRASlabIdentifier::SlabRegionVectorType -MRASlabIdentifier::GetSlabRegionVector() +auto +MRASlabIdentifier::GetSlabRegionVector() -> SlabRegionVectorType { return m_Slabs; } diff --git a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx index cb9e3273f5a..04895b530a5 100644 --- a/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkMRIBiasFieldCorrectionFilter.hxx @@ -62,8 +62,8 @@ MRIBiasEnergyFunction::GetNumberOfParameters() c } template -typename MRIBiasEnergyFunction::MeasureType -MRIBiasEnergyFunction::GetValue(const ParametersType & parameters) const +auto +MRIBiasEnergyFunction::GetValue(const ParametersType & parameters) const -> MeasureType { if (m_Image.IsNull()) { diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx index 69080394da0..cabd9dff428 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryPruningImageFilter.hxx @@ -43,8 +43,8 @@ BinaryPruningImageFilter::BinaryPruningImageFilter() * Return the pruning Image pointer */ template -typename BinaryPruningImageFilter::OutputImageType * -BinaryPruningImageFilter::GetPruning() +auto +BinaryPruningImageFilter::GetPruning() -> OutputImageType * { return dynamic_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx index 28f7f24c9db..18c9153d959 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx @@ -42,8 +42,8 @@ BinaryThinningImageFilter::BinaryThinningImageFilter( * Return the thinning Image pointer */ template -typename BinaryThinningImageFilter::OutputImageType * -BinaryThinningImageFilter::GetThinning() +auto +BinaryThinningImageFilter::GetThinning() -> OutputImageType * { return dynamic_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.hxx index 1d3cc938226..61c19fa342a 100644 --- a/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkAutumnColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename AutumnColormapFunction::RGBPixelType -AutumnColormapFunction::operator()(const TScalar & v) const +auto +AutumnColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkBlueColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkBlueColormapFunction.hxx index 8b84937bacd..ec8dd3fb3c1 100644 --- a/Modules/Filtering/Colormap/include/itkBlueColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkBlueColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename BlueColormapFunction::RGBPixelType -BlueColormapFunction::operator()(const TScalar & v) const +auto +BlueColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkCoolColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkCoolColormapFunction.hxx index fddcbc5ab70..f22a9a3c966 100644 --- a/Modules/Filtering/Colormap/include/itkCoolColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkCoolColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename CoolColormapFunction::RGBPixelType -CoolColormapFunction::operator()(const TScalar & v) const +auto +CoolColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkCopperColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkCopperColormapFunction.hxx index c80a1b9bd5a..aa13af415c6 100644 --- a/Modules/Filtering/Colormap/include/itkCopperColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkCopperColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename CopperColormapFunction::RGBPixelType -CopperColormapFunction::operator()(const TScalar & v) const +auto +CopperColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx index ed25c84e4af..e0ca0293f2a 100644 --- a/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkCustomColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename CustomColormapFunction::RGBPixelType -CustomColormapFunction::operator()(const TScalar & v) const +auto +CustomColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkGreenColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkGreenColormapFunction.hxx index 34db0e23504..366ae37c31a 100644 --- a/Modules/Filtering/Colormap/include/itkGreenColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkGreenColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename GreenColormapFunction::RGBPixelType -GreenColormapFunction::operator()(const TScalar & v) const +auto +GreenColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkGreyColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkGreyColormapFunction.hxx index afc96457f0b..811011ea1d5 100644 --- a/Modules/Filtering/Colormap/include/itkGreyColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkGreyColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename GreyColormapFunction::RGBPixelType -GreyColormapFunction::operator()(const TScalar & v) const +auto +GreyColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkHSVColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkHSVColormapFunction.hxx index e76b919b6a9..8a3522183b4 100644 --- a/Modules/Filtering/Colormap/include/itkHSVColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkHSVColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename HSVColormapFunction::RGBPixelType -HSVColormapFunction::operator()(const TScalar & v) const +auto +HSVColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkHotColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkHotColormapFunction.hxx index 5a460fd63c3..95bc590f415 100644 --- a/Modules/Filtering/Colormap/include/itkHotColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkHotColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename HotColormapFunction::RGBPixelType -HotColormapFunction::operator()(const TScalar & v) const +auto +HotColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkJetColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkJetColormapFunction.hxx index a7e930e3350..2e56a20cf46 100644 --- a/Modules/Filtering/Colormap/include/itkJetColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkJetColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename JetColormapFunction::RGBPixelType -JetColormapFunction::operator()(const TScalar & v) const +auto +JetColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.hxx index e7c8f20ff8b..3e307d33b81 100644 --- a/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkOverUnderColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename OverUnderColormapFunction::RGBPixelType -OverUnderColormapFunction::operator()(const TScalar & v) const +auto +OverUnderColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkRedColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkRedColormapFunction.hxx index dee702f9b92..674f4810e34 100644 --- a/Modules/Filtering/Colormap/include/itkRedColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkRedColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename RedColormapFunction::RGBPixelType -RedColormapFunction::operator()(const TScalar & v) const +auto +RedColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkSpringColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkSpringColormapFunction.hxx index 1d2d09aded4..9427a4e2e1e 100644 --- a/Modules/Filtering/Colormap/include/itkSpringColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkSpringColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename SpringColormapFunction::RGBPixelType -SpringColormapFunction::operator()(const TScalar & v) const +auto +SpringColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkSummerColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkSummerColormapFunction.hxx index f024e5979fe..eae97b01e9c 100644 --- a/Modules/Filtering/Colormap/include/itkSummerColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkSummerColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename SummerColormapFunction::RGBPixelType -SummerColormapFunction::operator()(const TScalar & v) const +auto +SummerColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Colormap/include/itkWinterColormapFunction.hxx b/Modules/Filtering/Colormap/include/itkWinterColormapFunction.hxx index 05880603fca..974a90747c6 100644 --- a/Modules/Filtering/Colormap/include/itkWinterColormapFunction.hxx +++ b/Modules/Filtering/Colormap/include/itkWinterColormapFunction.hxx @@ -25,8 +25,8 @@ namespace itk namespace Function { template -typename WinterColormapFunction::RGBPixelType -WinterColormapFunction::operator()(const TScalar & v) const +auto +WinterColormapFunction::operator()(const TScalar & v) const -> RGBPixelType { // Map the input scalar between [0, 1]. RealType value = this->RescaleInputValue(v); diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx index 87ddc817cdc..5f7a1eb34f8 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx @@ -204,8 +204,8 @@ ConvolutionImageFilter::GetKernelNeedsP } template -typename ConvolutionImageFilter::KernelSizeType -ConvolutionImageFilter::GetKernelPadSize() const +auto +ConvolutionImageFilter::GetKernelPadSize() const -> KernelSizeType { const KernelImageType * kernel = this->GetKernelImage(); KernelRegionType kernelRegion = kernel->GetLargestPossibleRegion(); @@ -223,8 +223,9 @@ ConvolutionImageFilter::GetKernelPadSiz template template -typename ConvolutionImageFilter::KernelSizeType +auto ConvolutionImageFilter::GetKernelRadius(const TImage * kernelImage) const + -> KernelSizeType { // Compute the kernel radius. KernelSizeType radius; diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx index 92ef565699c..193d4b76c6f 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.hxx @@ -48,8 +48,8 @@ ConvolutionImageFilterBase::GenerateOut } template -typename ConvolutionImageFilterBase::OutputRegionType -ConvolutionImageFilterBase::GetValidRegion() const +auto +ConvolutionImageFilterBase::GetValidRegion() const -> OutputRegionType { typename InputImageType::ConstPointer inputPtr = this->GetInput(); diff --git a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx index ae908562967..4d2224607f4 100644 --- a/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkFFTConvolutionImageFilter.hxx @@ -358,8 +358,9 @@ FFTConvolutionImageFilter -typename FFTConvolutionImageFilter::InputSizeType +auto FFTConvolutionImageFilter::GetPadLowerBound() const + -> InputSizeType { typename InputImageType::ConstPointer inputImage = this->GetInput(); InputSizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize(); @@ -375,8 +376,9 @@ FFTConvolutionImageFilter -typename FFTConvolutionImageFilter::InputSizeType +auto FFTConvolutionImageFilter::GetPadSize() const + -> InputSizeType { typename InputImageType::ConstPointer inputImage = this->GetInput(); InputSizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize(); diff --git a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx index d465f34ad3d..a87e79c43d4 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkCurvatureFlowFunction.hxx @@ -46,8 +46,8 @@ CurvatureFlowFunction::CurvatureFlowFunction() * Compute the global time step */ template -typename CurvatureFlowFunction::TimeStepType -CurvatureFlowFunction::ComputeGlobalTimeStep(void * itkNotUsed(gd)) const +auto +CurvatureFlowFunction::ComputeGlobalTimeStep(void * itkNotUsed(gd)) const -> TimeStepType { return this->GetTimeStep(); } diff --git a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx index 32f1456e6ef..9658f03bb2b 100644 --- a/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx +++ b/Modules/Filtering/CurvatureFlow/include/itkMinMaxCurvatureFlowFunction.hxx @@ -129,8 +129,9 @@ MinMaxCurvatureFlowFunction::InitializeStencilOperator() * the direction perpendicular to the image gradient. */ template -typename MinMaxCurvatureFlowFunction::PixelType +auto MinMaxCurvatureFlowFunction::ComputeThreshold(const DispatchBase &, const NeighborhoodType & it) const + -> PixelType { PixelType threshold = NumericTraits::ZeroValue(); @@ -229,8 +230,9 @@ MinMaxCurvatureFlowFunction::ComputeThreshold(const DispatchBase &, cons * the direction perpendicular to the image gradient. */ template -typename MinMaxCurvatureFlowFunction::PixelType +auto MinMaxCurvatureFlowFunction::ComputeThreshold(const Dispatch<2> &, const NeighborhoodType & it) const + -> PixelType { constexpr unsigned int imageDimension = 2; @@ -294,8 +296,9 @@ MinMaxCurvatureFlowFunction::ComputeThreshold(const Dispatch<2> &, const * the direction perpendicular to the image gradient. */ template -typename MinMaxCurvatureFlowFunction::PixelType +auto MinMaxCurvatureFlowFunction::ComputeThreshold(const Dispatch<3> &, const NeighborhoodType & it) const + -> PixelType { constexpr unsigned int imageDimension = 3; diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx index e8e8807f257..6c52229d4b2 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.hxx @@ -163,15 +163,16 @@ PatchBasedDenoisingBaseImageFilter::SetPatchWeights(c } template -typename PatchBasedDenoisingBaseImageFilter::PatchWeightsType -PatchBasedDenoisingBaseImageFilter::GetPatchWeights() const +auto +PatchBasedDenoisingBaseImageFilter::GetPatchWeights() const -> PatchWeightsType { return m_PatchWeights; } template -typename PatchBasedDenoisingBaseImageFilter::PatchRadiusType::SizeValueType -PatchBasedDenoisingBaseImageFilter::GetPatchLengthInVoxels() const +auto +PatchBasedDenoisingBaseImageFilter::GetPatchLengthInVoxels() const -> + typename PatchRadiusType::SizeValueType { const PatchRadiusType diameter = this->GetPatchDiameterInVoxels(); @@ -184,8 +185,8 @@ PatchBasedDenoisingBaseImageFilter::GetPatchLengthInV } template -typename PatchBasedDenoisingBaseImageFilter::PatchRadiusType -PatchBasedDenoisingBaseImageFilter::GetPatchDiameterInVoxels() const +auto +PatchBasedDenoisingBaseImageFilter::GetPatchDiameterInVoxels() const -> PatchRadiusType { PatchRadiusType one; PatchRadiusType two; @@ -198,8 +199,8 @@ PatchBasedDenoisingBaseImageFilter::GetPatchDiameterI } template -typename PatchBasedDenoisingBaseImageFilter::PatchRadiusType -PatchBasedDenoisingBaseImageFilter::GetPatchRadiusInVoxels() const +auto +PatchBasedDenoisingBaseImageFilter::GetPatchRadiusInVoxels() const -> PatchRadiusType { const typename Self::Pointer thisPtr = const_cast(this); diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx index 63e5509edd0..180a070c5a9 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx @@ -86,8 +86,8 @@ PatchBasedDenoisingImageFilter::SetThreadData(int thr } template -typename PatchBasedDenoisingImageFilter::ThreadDataStruct -PatchBasedDenoisingImageFilter::GetThreadData(int threadId) +auto +PatchBasedDenoisingImageFilter::GetThreadData(int threadId) -> ThreadDataStruct { if (threadId < static_cast(m_ThreadData.size())) { @@ -1143,8 +1143,9 @@ PatchBasedDenoisingImageFilter::ComputeLogMapAndWeigh } template -typename PatchBasedDenoisingImageFilter::RealType +auto PatchBasedDenoisingImageFilter::AddEuclideanUpdate(const RealType & a, const RealType & b) + -> RealType { RealType result = m_ZeroPixel; @@ -1816,8 +1817,8 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU } template -typename PatchBasedDenoisingImageFilter::RealArrayType -PatchBasedDenoisingImageFilter::ResolveSigmaUpdate() +auto +PatchBasedDenoisingImageFilter::ResolveSigmaUpdate() -> RealArrayType { RealArrayType sigmaUpdate(m_NumIndependentComponents); diff --git a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx index d11af7d5e2d..6c3b7ffd6cb 100644 --- a/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkConstantVelocityFieldTransform.hxx @@ -97,8 +97,9 @@ ConstantVelocityFieldTransform::GetInverse(Se // Return an inverse of this transform template -typename ConstantVelocityFieldTransform::InverseTransformBasePointer +auto ConstantVelocityFieldTransform::GetInverseTransform() const + -> InverseTransformBasePointer { Pointer inverseTransform = New(); if (this->GetInverse(inverseTransform)) diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx index 5b4ece0cdd0..c556fdcd16d 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldTransform.hxx @@ -63,8 +63,9 @@ DisplacementFieldTransform::DisplacementField } template -typename DisplacementFieldTransform::OutputPointType +auto DisplacementFieldTransform::TransformPoint(const InputPointType & inputPoint) const + -> OutputPointType { if (!this->m_DisplacementField) { @@ -118,8 +119,9 @@ DisplacementFieldTransform::GetInverse(Self * } template -typename DisplacementFieldTransform::InverseTransformBasePointer +auto DisplacementFieldTransform::GetInverseTransform() const + -> InverseTransformBasePointer { Pointer inverseTransform = New(); diff --git a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx index 1c633e0ce72..ba074afa69f 100644 --- a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.hxx @@ -102,8 +102,8 @@ TransformToDisplacementFieldFilter::SetInput } template -const typename TransformToDisplacementFieldFilter::TransformInputType * -TransformToDisplacementFieldFilter::GetInput() const +auto +TransformToDisplacementFieldFilter::GetInput() const -> const TransformInputType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } diff --git a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx index 4128a5b8833..046f95ca881 100644 --- a/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx +++ b/Modules/Filtering/DisplacementField/include/itkVelocityFieldTransform.hxx @@ -95,8 +95,8 @@ VelocityFieldTransform::GetInverse(Self * inv // Return an inverse of this transform template -typename VelocityFieldTransform::InverseTransformBasePointer -VelocityFieldTransform::GetInverseTransform() const +auto +VelocityFieldTransform::GetInverseTransform() const -> InverseTransformBasePointer { Pointer inverseTransform = New(); if (this->GetInverse(inverseTransform)) diff --git a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx index 100a4510317..5893704b593 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkContourDirectedMeanDistanceImageFilter.hxx @@ -61,15 +61,15 @@ ContourDirectedMeanDistanceImageFilter::SetInput2(co } template -const typename ContourDirectedMeanDistanceImageFilter::InputImage1Type * -ContourDirectedMeanDistanceImageFilter::GetInput1() +auto +ContourDirectedMeanDistanceImageFilter::GetInput1() -> const InputImage1Type * { return this->GetInput(); } template -const typename ContourDirectedMeanDistanceImageFilter::InputImage2Type * -ContourDirectedMeanDistanceImageFilter::GetInput2() +auto +ContourDirectedMeanDistanceImageFilter::GetInput2() -> const InputImage2Type * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.hxx index 5c0627d7f6c..c9ce510d08d 100644 --- a/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkContourMeanDistanceImageFilter.hxx @@ -51,16 +51,16 @@ ContourMeanDistanceImageFilter::SetInput2(const TInp } template -const typename ContourMeanDistanceImageFilter::InputImage1Type * -ContourMeanDistanceImageFilter::GetInput1() +auto +ContourMeanDistanceImageFilter::GetInput1() -> const InputImage1Type * { return this->GetInput(); } template -const typename ContourMeanDistanceImageFilter::InputImage2Type * -ContourMeanDistanceImageFilter::GetInput2() +auto +ContourMeanDistanceImageFilter::GetInput2() -> const InputImage2Type * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx index b7d1a072c7a..bed352624cb 100644 --- a/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkDanielssonDistanceMapImageFilter.hxx @@ -66,22 +66,22 @@ DanielssonDistanceMapImageFilter::Make } template -typename DanielssonDistanceMapImageFilter::OutputImageType * -DanielssonDistanceMapImageFilter::GetDistanceMap() +auto +DanielssonDistanceMapImageFilter::GetDistanceMap() -> OutputImageType * { return dynamic_cast(this->ProcessObject::GetOutput(0)); } template -typename DanielssonDistanceMapImageFilter::VoronoiImageType * -DanielssonDistanceMapImageFilter::GetVoronoiMap() +auto +DanielssonDistanceMapImageFilter::GetVoronoiMap() -> VoronoiImageType * { return dynamic_cast(this->ProcessObject::GetOutput(1)); } template -typename DanielssonDistanceMapImageFilter::VectorImageType * -DanielssonDistanceMapImageFilter::GetVectorDistanceMap() +auto +DanielssonDistanceMapImageFilter::GetVectorDistanceMap() -> VectorImageType * { return dynamic_cast(this->ProcessObject::GetOutput(2)); } diff --git a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx index 7111b0ff5fd..0dde543ea04 100644 --- a/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkDirectedHausdorffDistanceImageFilter.hxx @@ -53,15 +53,15 @@ DirectedHausdorffDistanceImageFilter::SetInput2(cons } template -const typename DirectedHausdorffDistanceImageFilter::InputImage1Type * -DirectedHausdorffDistanceImageFilter::GetInput1() +auto +DirectedHausdorffDistanceImageFilter::GetInput1() -> const InputImage1Type * { return this->GetInput(); } template -const typename DirectedHausdorffDistanceImageFilter::InputImage2Type * -DirectedHausdorffDistanceImageFilter::GetInput2() +auto +DirectedHausdorffDistanceImageFilter::GetInput2() -> const InputImage2Type * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx index 0ee466b47b9..947594f344d 100644 --- a/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkFastChamferDistanceImageFilter.hxx @@ -67,8 +67,8 @@ FastChamferDistanceImageFilter::SetRegionToProcess(co } template -typename FastChamferDistanceImageFilter::RegionType -FastChamferDistanceImageFilter::GetRegionToProcess() const +auto +FastChamferDistanceImageFilter::GetRegionToProcess() const -> RegionType { return m_RegionToProcess; } @@ -85,8 +85,8 @@ FastChamferDistanceImageFilter::SetNarrowBand(NarrowB } template -typename FastChamferDistanceImageFilter::NarrowBandPointer -FastChamferDistanceImageFilter::GetNarrowBand() const +auto +FastChamferDistanceImageFilter::GetNarrowBand() const -> NarrowBandPointer { return m_NarrowBand; } diff --git a/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.hxx index e8e9325a703..212b3d0cb36 100644 --- a/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkHausdorffDistanceImageFilter.hxx @@ -51,15 +51,15 @@ HausdorffDistanceImageFilter::SetInput2(const TInput } template -const typename HausdorffDistanceImageFilter::InputImage1Type * -HausdorffDistanceImageFilter::GetInput1() +auto +HausdorffDistanceImageFilter::GetInput1() -> const InputImage1Type * { return this->GetInput(); } template -const typename HausdorffDistanceImageFilter::InputImage2Type * -HausdorffDistanceImageFilter::GetInput2() +auto +HausdorffDistanceImageFilter::GetInput2() -> const InputImage2Type * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx index 655c4663899..29f242d410a 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.hxx @@ -72,8 +72,8 @@ SignedDanielssonDistanceMapImageFilter * Return the distance map Image pointer */ template -typename SignedDanielssonDistanceMapImageFilter::OutputImageType * -SignedDanielssonDistanceMapImageFilter::GetDistanceMap() +auto +SignedDanielssonDistanceMapImageFilter::GetDistanceMap() -> OutputImageType * { return dynamic_cast(this->ProcessObject::GetOutput(0)); } @@ -82,8 +82,8 @@ SignedDanielssonDistanceMapImageFilter * Return Closest Points Map */ template -typename SignedDanielssonDistanceMapImageFilter::VoronoiImageType * -SignedDanielssonDistanceMapImageFilter::GetVoronoiMap() +auto +SignedDanielssonDistanceMapImageFilter::GetVoronoiMap() -> VoronoiImageType * { return dynamic_cast(this->ProcessObject::GetOutput(1)); } @@ -92,8 +92,9 @@ SignedDanielssonDistanceMapImageFilter * Return the distance vectors */ template -typename SignedDanielssonDistanceMapImageFilter::VectorImageType * +auto SignedDanielssonDistanceMapImageFilter::GetVectorDistanceMap() + -> VectorImageType * { return dynamic_cast(this->ProcessObject::GetOutput(2)); } diff --git a/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.hxx index 1281bd481e6..2358c6576b3 100644 --- a/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.hxx @@ -76,8 +76,8 @@ struct DispatchFFTW_Complex_New #endif template -typename ComplexToComplexFFTImageFilter::Pointer -ComplexToComplexFFTImageFilter::New() +auto +ComplexToComplexFFTImageFilter::New() -> Pointer { Pointer smartPtr = ObjectFactory::Create(); diff --git a/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.hxx index 9d2d31e8105..a734ca893f7 100644 --- a/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkForwardFFTImageFilter.hxx @@ -63,8 +63,8 @@ struct DispatchFFTW_Forward_New #endif template -typename ForwardFFTImageFilter::Pointer -ForwardFFTImageFilter::New() +auto +ForwardFFTImageFilter::New() -> Pointer { Pointer smartPtr = ::itk::ObjectFactory::Create(); diff --git a/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx index 6ea7fa07dd3..e0f43a48134 100644 --- a/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkHalfHermitianToRealInverseFFTImageFilter.hxx @@ -63,8 +63,8 @@ struct Dispatch_C2R_New #endif template -typename HalfHermitianToRealInverseFFTImageFilter::Pointer -HalfHermitianToRealInverseFFTImageFilter::New() +auto +HalfHermitianToRealInverseFFTImageFilter::New() -> Pointer { Pointer smartPtr = ::itk::ObjectFactory::Create(); diff --git a/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.hxx index ec4ead7b3f1..5883abf99ff 100644 --- a/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkInverseFFTImageFilter.hxx @@ -64,8 +64,8 @@ struct Dispatch_Inverse_New #endif template -typename InverseFFTImageFilter::Pointer -InverseFFTImageFilter::New() +auto +InverseFFTImageFilter::New() -> Pointer { Pointer smartPtr = ::itk::ObjectFactory::Create(); diff --git a/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx index b69d798b393..86b37c5b006 100644 --- a/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkRealToHalfHermitianForwardFFTImageFilter.hxx @@ -62,8 +62,8 @@ struct DispatchFFTW_R2C_New #endif template -typename RealToHalfHermitianForwardFFTImageFilter::Pointer -RealToHalfHermitianForwardFFTImageFilter::New() +auto +RealToHalfHermitianForwardFFTImageFilter::New() -> Pointer { Pointer smartPtr = ::itk::ObjectFactory::Create(); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx index 0478dc326cd..318b4cbd0e8 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx @@ -55,8 +55,9 @@ FastMarchingExtensionImageFilter -typename FastMarchingExtensionImageFilter::AuxImageType * +auto FastMarchingExtensionImageFilter::GetAuxiliaryImage(unsigned int idx) + -> AuxImageType * { if (idx >= AuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2) { diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx index 26f6196391d..a28b56e4aa5 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx @@ -124,8 +124,9 @@ FastMarchingImageFilterBase::SetOutputValue(OutputImageType * } template -const typename FastMarchingImageFilterBase::OutputPixelType +auto FastMarchingImageFilterBase::GetOutputValue(OutputImageType * oImage, const NodeType & iNode) const + -> const OutputPixelType { return oImage->GetPixel(iNode); } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx index 02e39f6313f..039f1974911 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx @@ -61,22 +61,22 @@ FastMarchingImageToNodePairContainerAdaptor::SetForbidd } template -typename FastMarchingImageToNodePairContainerAdaptor::NodePairContainerType * -FastMarchingImageToNodePairContainerAdaptor::GetAlivePoints() +auto +FastMarchingImageToNodePairContainerAdaptor::GetAlivePoints() -> NodePairContainerType * { return m_AlivePoints.GetPointer(); } template -typename FastMarchingImageToNodePairContainerAdaptor::NodePairContainerType * -FastMarchingImageToNodePairContainerAdaptor::GetTrialPoints() +auto +FastMarchingImageToNodePairContainerAdaptor::GetTrialPoints() -> NodePairContainerType * { return m_TrialPoints.GetPointer(); } template -typename FastMarchingImageToNodePairContainerAdaptor::NodePairContainerType * -FastMarchingImageToNodePairContainerAdaptor::GetForbiddenPoints() +auto +FastMarchingImageToNodePairContainerAdaptor::GetForbiddenPoints() -> NodePairContainerType * { return m_ForbiddenPoints.GetPointer(); } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx index 98e8d630fbb..e4d21e68f54 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilterBase.hxx @@ -37,8 +37,8 @@ FastMarchingUpwindGradientImageFilterBase::FastMarchingUpwindGr } template -typename FastMarchingUpwindGradientImageFilterBase::GradientImageType * -FastMarchingUpwindGradientImageFilterBase::GetGradientImage() +auto +FastMarchingUpwindGradientImageFilterBase::GetGradientImage() -> GradientImageType * { return dynamic_cast(this->ProcessObject::GetOutput(1)); } diff --git a/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx b/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx index ede37148aad..4cf83d66ac6 100644 --- a/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx +++ b/Modules/Filtering/ImageCompare/include/itkSimilarityIndexImageFilter.hxx @@ -46,8 +46,8 @@ SimilarityIndexImageFilter::SetInput2(const TInputIm } template -const typename SimilarityIndexImageFilter::InputImage2Type * -SimilarityIndexImageFilter::GetInput2() +auto +SimilarityIndexImageFilter::GetInput2() -> const InputImage2Type * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx index c83bf0ba6fe..bd58b7a7287 100644 --- a/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx @@ -103,8 +103,8 @@ HessianRecursiveGaussianImageFilter::SetSigma(RealTyp * Get value of Sigma */ template -typename HessianRecursiveGaussianImageFilter::RealType -HessianRecursiveGaussianImageFilter::GetSigma() const +auto +HessianRecursiveGaussianImageFilter::GetSigma() const -> RealType { return m_DerivativeFilterA->GetSigma(); } diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx index f7100b49729..137fbd157b6 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DCirclesImageFilter.hxx @@ -179,8 +179,9 @@ HoughTransform2DCirclesImageFilter -typename HoughTransform2DCirclesImageFilter::CirclesListType & +auto HoughTransform2DCirclesImageFilter::GetCircles() + -> CirclesListType & { // Make sure that all the required inputs exist and have a non-null value this->VerifyPreconditions(); diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx index 5d0b346fdb7..dddd56170ce 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx @@ -218,8 +218,8 @@ HoughTransform2DLinesImageFilter::Simplify() template -typename HoughTransform2DLinesImageFilter::LinesListType & -HoughTransform2DLinesImageFilter::GetLines() +auto +HoughTransform2DLinesImageFilter::GetLines() -> LinesListType & { // If the filter has not been updated. if (this->GetMTime() == m_OldModifiedTime) diff --git a/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.hxx index 94d301fb5a9..0bc7910c79c 100644 --- a/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkLaplacianRecursiveGaussianImageFilter.hxx @@ -84,8 +84,8 @@ LaplacianRecursiveGaussianImageFilter::SetSigma(RealT * Get value of Sigma */ template -typename LaplacianRecursiveGaussianImageFilter::RealType -LaplacianRecursiveGaussianImageFilter::GetSigma() const +auto +LaplacianRecursiveGaussianImageFilter::GetSigma() const -> RealType { return m_DerivativeFilter->GetSigma(); } diff --git a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx index 751768d9bdc..6f3b936a32f 100644 --- a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx @@ -334,8 +334,9 @@ MultiScaleHessianBasedMeasureImageFilter -const typename MultiScaleHessianBasedMeasureImageFilter::HessianImageType * +auto MultiScaleHessianBasedMeasureImageFilter::GetHessianOutput() const + -> const HessianImageType * { return static_cast(this->ProcessObject::GetOutput(2)); } @@ -344,8 +345,9 @@ MultiScaleHessianBasedMeasureImageFilter -const typename MultiScaleHessianBasedMeasureImageFilter::ScalesImageType * +auto MultiScaleHessianBasedMeasureImageFilter::GetScalesOutput() const + -> const ScalesImageType * { return static_cast(this->ProcessObject::GetOutput(1)); } diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx index 4025d48dcc0..4efada58e10 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryFunctorImageFilter.hxx @@ -71,8 +71,9 @@ BinaryFunctorImageFilter::S } template -const typename BinaryFunctorImageFilter::Input1ImagePixelType & +auto BinaryFunctorImageFilter::GetConstant1() const + -> const Input1ImagePixelType & { const auto * input = dynamic_cast(this->ProcessObject::GetInput(0)); if (input == nullptr) @@ -118,8 +119,9 @@ BinaryFunctorImageFilter::S } template -const typename BinaryFunctorImageFilter::Input2ImagePixelType & +auto BinaryFunctorImageFilter::GetConstant2() const + -> const Input2ImagePixelType & { const auto * input = dynamic_cast(this->ProcessObject::GetInput(1)); if (input == nullptr) diff --git a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx index 3a10dfda4d2..e15440a04e5 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkBinaryGeneratorImageFilter.hxx @@ -69,8 +69,9 @@ BinaryGeneratorImageFilter::SetConstan } template -const typename BinaryGeneratorImageFilter::Input1ImagePixelType & +auto BinaryGeneratorImageFilter::GetConstant1() const + -> const Input1ImagePixelType & { const auto * input = dynamic_cast(this->ProcessObject::GetInput(0)); if (input == nullptr) @@ -114,8 +115,9 @@ BinaryGeneratorImageFilter::SetConstan } template -const typename BinaryGeneratorImageFilter::Input2ImagePixelType & +auto BinaryGeneratorImageFilter::GetConstant2() const + -> const Input2ImagePixelType & { const auto * input = dynamic_cast(this->ProcessObject::GetInput(1)); if (input == nullptr) diff --git a/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.hxx b/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.hxx index f8a8ab9a7cf..ba89e89e81c 100644 --- a/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.hxx +++ b/Modules/Filtering/ImageFusion/include/itkLabelOverlayImageFilter.hxx @@ -79,8 +79,8 @@ LabelOverlayImageFilter::SetLabelImage(c * Get Label Image */ template -const typename LabelOverlayImageFilter::LabelImageType * -LabelOverlayImageFilter::GetLabelImage() const +auto +LabelOverlayImageFilter::GetLabelImage() const -> const LabelImageType * { return itkDynamicCastInDebugMode(const_cast(this->ProcessObject::GetInput(1))); } diff --git a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx index c4994ef44ee..e2f53cdda4d 100644 --- a/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx +++ b/Modules/Filtering/ImageFusion/include/itkScalarToRGBPixelFunctor.hxx @@ -45,8 +45,8 @@ ScalarToRGBPixelFunctor::ScalarToRGBPixelFunctor() } template -typename ScalarToRGBPixelFunctor::RGBPixelType -ScalarToRGBPixelFunctor::operator()(const TScalar & v) const +auto +ScalarToRGBPixelFunctor::operator()(const TScalar & v) const -> RGBPixelType { TScalar buf = v; const auto * bytes = reinterpret_cast(&buf); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx index f55bc01f6fa..4b54ef6d43a 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientMagnitudeRecursiveGaussianImageFilter.hxx @@ -97,8 +97,8 @@ GradientMagnitudeRecursiveGaussianImageFilter::SetSig } template -typename GradientMagnitudeRecursiveGaussianImageFilter::RealType -GradientMagnitudeRecursiveGaussianImageFilter::GetSigma() +auto +GradientMagnitudeRecursiveGaussianImageFilter::GetSigma() -> RealType { // just return the sigma value of one filter return m_DerivativeFilter->GetSigma(); diff --git a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx index 533be1e35ca..90566134a89 100644 --- a/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkGradientRecursiveGaussianImageFilter.hxx @@ -113,8 +113,8 @@ GradientRecursiveGaussianImageFilter::SetSigmaArray(c * Get the Sigma array. */ template -typename GradientRecursiveGaussianImageFilter::SigmaArrayType -GradientRecursiveGaussianImageFilter::GetSigmaArray() const +auto +GradientRecursiveGaussianImageFilter::GetSigmaArray() const -> SigmaArrayType { return m_Sigma; } @@ -123,8 +123,8 @@ GradientRecursiveGaussianImageFilter::GetSigmaArray() * Get value of Sigma. Returns the sigma along the first dimension. */ template -typename GradientRecursiveGaussianImageFilter::ScalarRealType -GradientRecursiveGaussianImageFilter::GetSigma() const +auto +GradientRecursiveGaussianImageFilter::GetSigma() const -> ScalarRealType { return m_Sigma[0]; } diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx index fc0ababe8f8..1ada0f90423 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFilter.hxx @@ -381,8 +381,9 @@ BSplineControlPointImageFilter::SplitRequestedRegion( } template -typename BSplineControlPointImageFilter::ControlPointLatticeType::Pointer -BSplineControlPointImageFilter::RefineControlPointLattice(ArrayType numberOfLevels) +auto +BSplineControlPointImageFilter::RefineControlPointLattice(ArrayType numberOfLevels) -> + typename ControlPointLatticeType::Pointer { this->SetNumberOfLevels(numberOfLevels); diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx index 3a55b3dd9db..6504063aec4 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineControlPointImageFunction.hxx @@ -120,8 +120,9 @@ BSplineControlPointImageFunction::SetInputImage(const In } template -typename BSplineControlPointImageFunction::OutputType +auto BSplineControlPointImageFunction::EvaluateAtParametricPoint(const PointType & point) const + -> OutputType { PointType params; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -133,8 +134,8 @@ BSplineControlPointImageFunction::EvaluateAtParametricPo } template -typename BSplineControlPointImageFunction::OutputType -BSplineControlPointImageFunction::EvaluateAtIndex(const IndexType & idx) const +auto +BSplineControlPointImageFunction::EvaluateAtIndex(const IndexType & idx) const -> OutputType { PointType params; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -160,8 +161,8 @@ BSplineControlPointImageFunction::EvaluateAtContinuousIn } template -typename BSplineControlPointImageFunction::OutputType -BSplineControlPointImageFunction::Evaluate(const PointType & params) const +auto +BSplineControlPointImageFunction::Evaluate(const PointType & params) const -> OutputType { vnl_vector p(ImageDimension); for (unsigned int i = 0; i < ImageDimension; ++i) @@ -279,8 +280,9 @@ BSplineControlPointImageFunction::EvaluateGradientAtPara } template -typename BSplineControlPointImageFunction::GradientType +auto BSplineControlPointImageFunction::EvaluateGradientAtIndex(const IndexType & idx) const + -> GradientType { PointType params; for (unsigned int i = 0; i < ImageDimension; ++i) @@ -306,8 +308,9 @@ BSplineControlPointImageFunction::EvaluateGradientAtCont } template -typename BSplineControlPointImageFunction::GradientType +auto BSplineControlPointImageFunction::EvaluateGradient(const PointType & params) const + -> GradientType { vnl_vector p(ImageDimension); for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx index 512dde78b7e..52260afb52f 100644 --- a/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx +++ b/Modules/Filtering/ImageGrid/include/itkCoxDeBoorBSplineKernelFunction.hxx @@ -117,8 +117,8 @@ CoxDeBoorBSplineKernelFunction::CoxDeBoor(const un } template -typename CoxDeBoorBSplineKernelFunction::MatrixType -CoxDeBoorBSplineKernelFunction::GetShapeFunctionsInZeroToOneInterval() +auto +CoxDeBoorBSplineKernelFunction::GetShapeFunctionsInZeroToOneInterval() -> MatrixType { const int order = this->m_SplineOrder + 1; const auto numberOfPieces = static_cast(order); @@ -140,8 +140,8 @@ CoxDeBoorBSplineKernelFunction::GetShapeFunctionsI } template -typename CoxDeBoorBSplineKernelFunction::MatrixType -CoxDeBoorBSplineKernelFunction::GetShapeFunctions() +auto +CoxDeBoorBSplineKernelFunction::GetShapeFunctions() -> MatrixType { return this->m_BSplineShapeFunctions; } diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx index dac4548e576..c849fa0ecf8 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImageFilter.hxx @@ -56,8 +56,8 @@ InterpolateImageFilter::SetInput2(const InputImageTyp template -const typename InterpolateImageFilter::InputImageType * -InterpolateImageFilter::GetInput2() +auto +InterpolateImageFilter::GetInput2() -> const InputImageType * { return static_cast(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx index 3dd2c908b0d..4c42acb9406 100644 --- a/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkWarpVectorImageFilter.hxx @@ -111,8 +111,8 @@ WarpVectorImageFilter::SetDisplac template -typename WarpVectorImageFilter::DisplacementFieldType * -WarpVectorImageFilter::GetDisplacementField() +auto +WarpVectorImageFilter::GetDisplacementField() -> DisplacementFieldType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.hxx index 331a2d67b92..91c74481b58 100644 --- a/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkClampImageFilter.hxx @@ -35,15 +35,15 @@ Clamp::Clamp() {} template -typename Clamp::OutputType -Clamp::GetLowerBound() const +auto +Clamp::GetLowerBound() const -> OutputType { return m_LowerBound; } template -typename Clamp::OutputType -Clamp::GetUpperBound() const +auto +Clamp::GetUpperBound() const -> OutputType { return m_UpperBound; } @@ -71,15 +71,15 @@ Clamp::operator==(const Self & other) const } // end namespace Functor template -typename ClampImageFilter::OutputPixelType -ClampImageFilter::GetLowerBound() const +auto +ClampImageFilter::GetLowerBound() const -> OutputPixelType { return this->GetFunctor().GetLowerBound(); } template -typename ClampImageFilter::OutputPixelType -ClampImageFilter::GetUpperBound() const +auto +ClampImageFilter::GetUpperBound() const -> OutputPixelType { return this->GetFunctor().GetUpperBound(); } diff --git a/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.hxx index f685920e4cc..9f087b94ad4 100644 --- a/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkIntensityWindowingImageFilter.hxx @@ -69,15 +69,15 @@ IntensityWindowingImageFilter::SetWindowLevel(const I } template -typename IntensityWindowingImageFilter::InputPixelType -IntensityWindowingImageFilter::GetWindow() const +auto +IntensityWindowingImageFilter::GetWindow() const -> InputPixelType { return this->m_WindowMaximum - this->m_WindowMinimum; } template -typename IntensityWindowingImageFilter::InputPixelType -IntensityWindowingImageFilter::GetLevel() const +auto +IntensityWindowingImageFilter::GetLevel() const -> InputPixelType { return (this->m_WindowMaximum + this->m_WindowMinimum) / 2; } diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx index 48facbab3d0..0620e6bf1f7 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx @@ -124,8 +124,9 @@ PolylineMaskImageFilter::Generate } template -typename PolylineMaskImageFilter::ProjPlanePointType +auto PolylineMaskImageFilter::TransformProjectPoint(PointType inputPoint) + -> ProjPlanePointType { PointType centered; diff --git a/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.hxx b/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.hxx index 4bea360eee8..6b77bb33ce9 100644 --- a/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.hxx +++ b/Modules/Filtering/ImageNoise/include/itkNoiseBaseImageFilter.hxx @@ -44,8 +44,8 @@ NoiseBaseImageFilter::SetSeed() } template -typename NoiseBaseImageFilter::OutputImagePixelType -NoiseBaseImageFilter::ClampCast(const double & value) +auto +NoiseBaseImageFilter::ClampCast(const double & value) -> OutputImagePixelType { if (value >= (double)NumericTraits::max()) { diff --git a/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx b/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx index e8b9fb696e3..17ce9304246 100644 --- a/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx +++ b/Modules/Filtering/ImageSources/include/itkGaussianImageSource.hxx @@ -56,8 +56,8 @@ GaussianImageSource::SetParameters(const ParametersType & paramete } template -typename GaussianImageSource::ParametersType -GaussianImageSource::GetParameters() const +auto +GaussianImageSource::GetParameters() const -> ParametersType { ParametersType parameters(2 * ArrayType::Length + 1); for (unsigned int i = 0; i < ArrayType::Length; ++i) diff --git a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx index 72553b1ae18..4d54ac774d3 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.hxx @@ -179,8 +179,8 @@ ImageMomentsCalculator::Compute() //--------------------------------------------------------------------- // Get sum of intensities template -typename ImageMomentsCalculator::ScalarType -ImageMomentsCalculator::GetTotalMass() const +auto +ImageMomentsCalculator::GetTotalMass() const -> ScalarType { if (!m_Valid) { @@ -192,8 +192,8 @@ ImageMomentsCalculator::GetTotalMass() const //-------------------------------------------------------------------- // Get first moments about origin, in index coordinates template -typename ImageMomentsCalculator::VectorType -ImageMomentsCalculator::GetFirstMoments() const +auto +ImageMomentsCalculator::GetFirstMoments() const -> VectorType { if (!m_Valid) { @@ -205,8 +205,8 @@ ImageMomentsCalculator::GetFirstMoments() const //-------------------------------------------------------------------- // Get second moments about origin, in index coordinates template -typename ImageMomentsCalculator::MatrixType -ImageMomentsCalculator::GetSecondMoments() const +auto +ImageMomentsCalculator::GetSecondMoments() const -> MatrixType { if (!m_Valid) { @@ -218,8 +218,8 @@ ImageMomentsCalculator::GetSecondMoments() const //-------------------------------------------------------------------- // Get center of gravity, in physical coordinates template -typename ImageMomentsCalculator::VectorType -ImageMomentsCalculator::GetCenterOfGravity() const +auto +ImageMomentsCalculator::GetCenterOfGravity() const -> VectorType { if (!m_Valid) { @@ -231,8 +231,8 @@ ImageMomentsCalculator::GetCenterOfGravity() const //-------------------------------------------------------------------- // Get second central moments, in physical coordinates template -typename ImageMomentsCalculator::MatrixType -ImageMomentsCalculator::GetCentralMoments() const +auto +ImageMomentsCalculator::GetCentralMoments() const -> MatrixType { if (!m_Valid) { @@ -244,8 +244,8 @@ ImageMomentsCalculator::GetCentralMoments() const //-------------------------------------------------------------------- // Get principal moments, in physical coordinates template -typename ImageMomentsCalculator::VectorType -ImageMomentsCalculator::GetPrincipalMoments() const +auto +ImageMomentsCalculator::GetPrincipalMoments() const -> VectorType { if (!m_Valid) { @@ -258,8 +258,8 @@ ImageMomentsCalculator::GetPrincipalMoments() const //-------------------------------------------------------------------- // Get principal axes, in physical coordinates template -typename ImageMomentsCalculator::MatrixType -ImageMomentsCalculator::GetPrincipalAxes() const +auto +ImageMomentsCalculator::GetPrincipalAxes() const -> MatrixType { if (!m_Valid) { @@ -271,8 +271,8 @@ ImageMomentsCalculator::GetPrincipalAxes() const //-------------------------------------------------------------------- // Get principal axes to physical axes transform template -typename ImageMomentsCalculator::AffineTransformPointer -ImageMomentsCalculator::GetPrincipalAxesToPhysicalAxesTransform() const +auto +ImageMomentsCalculator::GetPrincipalAxesToPhysicalAxesTransform() const -> AffineTransformPointer { typename AffineTransformType::MatrixType matrix; typename AffineTransformType::OffsetType offset; @@ -297,8 +297,8 @@ ImageMomentsCalculator::GetPrincipalAxesToPhysicalAxesTransform() const // Get physical axes to principal axes transform template -typename ImageMomentsCalculator::AffineTransformPointer -ImageMomentsCalculator::GetPhysicalAxesToPrincipalAxesTransform() const +auto +ImageMomentsCalculator::GetPhysicalAxesToPrincipalAxesTransform() const -> AffineTransformPointer { typename AffineTransformType::MatrixType matrix; typename AffineTransformType::OffsetType offset; diff --git a/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx b/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx index 3a7430789f3..b220ef838f3 100644 --- a/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkLabelOverlapMeasuresImageFilter.hxx @@ -158,8 +158,8 @@ LabelOverlapMeasuresImageFilter::ThreadedGenerateData(const RegionT } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetTotalOverlap() const +auto +LabelOverlapMeasuresImageFilter::GetTotalOverlap() const -> RealType { RealType numerator = 0.0; RealType denominator = 0.0; @@ -185,8 +185,8 @@ LabelOverlapMeasuresImageFilter::GetTotalOverlap() const } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetTargetOverlap(LabelType label) const +auto +LabelOverlapMeasuresImageFilter::GetTargetOverlap(LabelType label) const -> RealType { auto mapIt = this->m_LabelSetMeasures.find(label); if (mapIt == this->m_LabelSetMeasures.end()) @@ -209,8 +209,8 @@ LabelOverlapMeasuresImageFilter::GetTargetOverlap(LabelType label) } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetUnionOverlap() const +auto +LabelOverlapMeasuresImageFilter::GetUnionOverlap() const -> RealType { RealType numerator = 0.0; RealType denominator = 0.0; @@ -236,8 +236,8 @@ LabelOverlapMeasuresImageFilter::GetUnionOverlap() const } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetUnionOverlap(LabelType label) const +auto +LabelOverlapMeasuresImageFilter::GetUnionOverlap(LabelType label) const -> RealType { auto mapIt = this->m_LabelSetMeasures.find(label); if (mapIt == this->m_LabelSetMeasures.end()) @@ -260,24 +260,24 @@ LabelOverlapMeasuresImageFilter::GetUnionOverlap(LabelType label) c } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetMeanOverlap() const +auto +LabelOverlapMeasuresImageFilter::GetMeanOverlap() const -> RealType { RealType uo = this->GetUnionOverlap(); return (2.0 * uo / (1.0 + uo)); } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetMeanOverlap(LabelType label) const +auto +LabelOverlapMeasuresImageFilter::GetMeanOverlap(LabelType label) const -> RealType { RealType uo = this->GetUnionOverlap(label); return (2.0 * uo / (1.0 + uo)); } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetVolumeSimilarity() const +auto +LabelOverlapMeasuresImageFilter::GetVolumeSimilarity() const -> RealType { RealType numerator = 0.0; RealType denominator = 0.0; @@ -304,8 +304,8 @@ LabelOverlapMeasuresImageFilter::GetVolumeSimilarity() const } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetVolumeSimilarity(LabelType label) const +auto +LabelOverlapMeasuresImageFilter::GetVolumeSimilarity(LabelType label) const -> RealType { auto mapIt = this->m_LabelSetMeasures.find(label); if (mapIt == this->m_LabelSetMeasures.end()) @@ -320,8 +320,8 @@ LabelOverlapMeasuresImageFilter::GetVolumeSimilarity(LabelType labe } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetFalseNegativeError() const +auto +LabelOverlapMeasuresImageFilter::GetFalseNegativeError() const -> RealType { RealType numerator = 0.0; RealType denominator = 0.0; @@ -347,8 +347,8 @@ LabelOverlapMeasuresImageFilter::GetFalseNegativeError() const } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetFalseNegativeError(LabelType label) const +auto +LabelOverlapMeasuresImageFilter::GetFalseNegativeError(LabelType label) const -> RealType { auto mapIt = this->m_LabelSetMeasures.find(label); if (mapIt == this->m_LabelSetMeasures.end()) @@ -371,8 +371,8 @@ LabelOverlapMeasuresImageFilter::GetFalseNegativeError(LabelType la } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetFalsePositiveError() const +auto +LabelOverlapMeasuresImageFilter::GetFalsePositiveError() const -> RealType { RealType numerator = 0.0; RealType denominator = 0.0; @@ -398,8 +398,8 @@ LabelOverlapMeasuresImageFilter::GetFalsePositiveError() const } template -typename LabelOverlapMeasuresImageFilter::RealType -LabelOverlapMeasuresImageFilter::GetFalsePositiveError(LabelType label) const +auto +LabelOverlapMeasuresImageFilter::GetFalsePositiveError(LabelType label) const -> RealType { auto mapIt = this->m_LabelSetMeasures.find(label); if (mapIt == this->m_LabelSetMeasures.end()) diff --git a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx index 82ab38a41ad..15c032f2fcb 100644 --- a/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx +++ b/Modules/Filtering/ImageStatistics/include/itkLabelStatisticsImageFilter.hxx @@ -284,8 +284,8 @@ LabelStatisticsImageFilter::ThreadedStreamedGenerateDa } template -typename LabelStatisticsImageFilter::RealType -LabelStatisticsImageFilter::GetMinimum(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetMinimum(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -302,8 +302,8 @@ LabelStatisticsImageFilter::GetMinimum(LabelPixelType } template -typename LabelStatisticsImageFilter::RealType -LabelStatisticsImageFilter::GetMaximum(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetMaximum(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -320,8 +320,8 @@ LabelStatisticsImageFilter::GetMaximum(LabelPixelType } template -typename LabelStatisticsImageFilter::RealType -LabelStatisticsImageFilter::GetMean(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetMean(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -338,8 +338,8 @@ LabelStatisticsImageFilter::GetMean(LabelPixelType lab } template -typename LabelStatisticsImageFilter::RealType -LabelStatisticsImageFilter::GetSum(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetSum(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -356,8 +356,8 @@ LabelStatisticsImageFilter::GetSum(LabelPixelType labe } template -typename LabelStatisticsImageFilter::RealType -LabelStatisticsImageFilter::GetSigma(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetSigma(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -374,8 +374,8 @@ LabelStatisticsImageFilter::GetSigma(LabelPixelType la } template -typename LabelStatisticsImageFilter::RealType -LabelStatisticsImageFilter::GetVariance(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetVariance(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -392,8 +392,8 @@ LabelStatisticsImageFilter::GetVariance(LabelPixelType } template -typename LabelStatisticsImageFilter::BoundingBoxType -LabelStatisticsImageFilter::GetBoundingBox(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetBoundingBox(LabelPixelType label) const -> BoundingBoxType { MapConstIterator mapIt; @@ -411,8 +411,8 @@ LabelStatisticsImageFilter::GetBoundingBox(LabelPixelT } template -typename LabelStatisticsImageFilter::RegionType -LabelStatisticsImageFilter::GetRegion(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetRegion(LabelPixelType label) const -> RegionType { MapConstIterator mapIt; @@ -444,8 +444,8 @@ LabelStatisticsImageFilter::GetRegion(LabelPixelType l } template -typename LabelStatisticsImageFilter::MapSizeType -LabelStatisticsImageFilter::GetCount(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetCount(LabelPixelType label) const -> MapSizeType { MapConstIterator mapIt; @@ -462,8 +462,8 @@ LabelStatisticsImageFilter::GetCount(LabelPixelType la } template -typename LabelStatisticsImageFilter::RealType -LabelStatisticsImageFilter::GetMedian(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetMedian(LabelPixelType label) const -> RealType { RealType median = 0.0; MapConstIterator mapIt; @@ -501,8 +501,8 @@ LabelStatisticsImageFilter::GetMedian(LabelPixelType l } template -typename LabelStatisticsImageFilter::HistogramPointer -LabelStatisticsImageFilter::GetHistogram(LabelPixelType label) const +auto +LabelStatisticsImageFilter::GetHistogram(LabelPixelType label) const -> HistogramPointer { MapConstIterator mapIt; diff --git a/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx index 1560feb14c5..0d8aec7c009 100644 --- a/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkChangeLabelLabelMapFilter.hxx @@ -37,8 +37,8 @@ ChangeLabelLabelMapFilter::SetChangeMap(const ChangeMapType & changeMap) } template -const typename ChangeLabelLabelMapFilter::ChangeMapType & -ChangeLabelLabelMapFilter::GetChangeMap() const +auto +ChangeLabelLabelMapFilter::GetChangeMap() const -> const ChangeMapType & { return m_MapOfLabelToBeReplaced; } diff --git a/Modules/Filtering/LabelMap/include/itkLabelMap.hxx b/Modules/Filtering/LabelMap/include/itkLabelMap.hxx index 1fe210a0817..e3612d508a1 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelMap.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelMap.hxx @@ -116,8 +116,8 @@ LabelMap::Graft(const DataObject * data) template -typename LabelMap::LabelObjectType * -LabelMap::GetLabelObject(const LabelType & label) +auto +LabelMap::GetLabelObject(const LabelType & label) -> LabelObjectType * { if (m_BackgroundValue == label) { @@ -136,8 +136,8 @@ LabelMap::GetLabelObject(const LabelType & label) template -const typename LabelMap::LabelObjectType * -LabelMap::GetLabelObject(const LabelType & label) const +auto +LabelMap::GetLabelObject(const LabelType & label) const -> const LabelObjectType * { if (m_BackgroundValue == label) { @@ -164,8 +164,8 @@ LabelMap::HasLabel(const LabelType label) const template -const typename LabelMap::LabelType & -LabelMap::GetPixel(const IndexType & idx) const +auto +LabelMap::GetPixel(const IndexType & idx) const -> const LabelType & { auto end = m_LabelObjectContainer.end(); @@ -181,8 +181,8 @@ LabelMap::GetPixel(const IndexType & idx) const template -typename LabelMap::LabelObjectType * -LabelMap::GetNthLabelObject(const SizeValueType & pos) +auto +LabelMap::GetNthLabelObject(const SizeValueType & pos) -> LabelObjectType * { SizeValueType i = 0; @@ -200,8 +200,8 @@ LabelMap::GetNthLabelObject(const SizeValueType & pos) template -const typename LabelMap::LabelObjectType * -LabelMap::GetNthLabelObject(const SizeValueType & pos) const +auto +LabelMap::GetNthLabelObject(const SizeValueType & pos) const -> const LabelObjectType * { SizeValueType i = 0; @@ -370,8 +370,8 @@ LabelMap::SetLine(const IndexType & idx, const LengthType & length template -typename LabelMap::LabelObjectType * -LabelMap::GetLabelObject(const IndexType & idx) const +auto +LabelMap::GetLabelObject(const IndexType & idx) const -> LabelObjectType * { for (auto it = m_LabelObjectContainer.begin(); it != m_LabelObjectContainer.end(); ++it) { @@ -496,16 +496,16 @@ LabelMap::ClearLabels() template -typename LabelMap::SizeValueType -LabelMap::GetNumberOfLabelObjects() const +auto +LabelMap::GetNumberOfLabelObjects() const -> SizeValueType { return static_cast::SizeValueType>(m_LabelObjectContainer.size()); } template -typename LabelMap::LabelVectorType -LabelMap::GetLabels() const +auto +LabelMap::GetLabels() const -> LabelVectorType { LabelVectorType res; @@ -519,8 +519,8 @@ LabelMap::GetLabels() const template -typename LabelMap::LabelObjectVectorType -LabelMap::GetLabelObjects() const +auto +LabelMap::GetLabelObjects() const -> LabelObjectVectorType { LabelObjectVectorType res; diff --git a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx index 684f74bf2ce..b6b7b4e07fb 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObject.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelObject.hxx @@ -33,8 +33,8 @@ LabelObject::LabelObject() } template -typename LabelObject::AttributeType -LabelObject::GetAttributeFromName(const std::string & s) +auto +LabelObject::GetAttributeFromName(const std::string & s) -> AttributeType { if (s == "Label") { @@ -61,8 +61,8 @@ LabelObject::GetNameFromAttribute(const AttributeType & * Set/Get the label associated with that object. */ template -const typename LabelObject::LabelType & -LabelObject::GetLabel() const +auto +LabelObject::GetLabel() const -> const LabelType & { return m_Label; } @@ -190,29 +190,29 @@ LabelObject::AddLine(const LineType & line) } template -typename LabelObject::SizeValueType -LabelObject::GetNumberOfLines() const +auto +LabelObject::GetNumberOfLines() const -> SizeValueType { return static_cast::SizeValueType>(m_LineContainer.size()); } template -const typename LabelObject::LineType & -LabelObject::GetLine(SizeValueType i) const +auto +LabelObject::GetLine(SizeValueType i) const -> const LineType & { return m_LineContainer[i]; } template -typename LabelObject::LineType & -LabelObject::GetLine(SizeValueType i) +auto +LabelObject::GetLine(SizeValueType i) -> LineType & { return m_LineContainer[i]; } template -typename LabelObject::SizeValueType -LabelObject::Size() const +auto +LabelObject::Size() const -> SizeValueType { int size = 0; @@ -231,8 +231,8 @@ LabelObject::Empty() const } template -typename LabelObject::IndexType -LabelObject::GetIndex(SizeValueType offset) const +auto +LabelObject::GetIndex(SizeValueType offset) const -> IndexType { SizeValueType o = offset; diff --git a/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx b/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx index 88448a46b06..074f473767f 100644 --- a/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx +++ b/Modules/Filtering/LabelMap/include/itkLabelObjectLine.hxx @@ -43,8 +43,8 @@ LabelObjectLine::SetIndex(const IndexType & idx) } template -const typename LabelObjectLine::IndexType & -LabelObjectLine::GetIndex() const +auto +LabelObjectLine::GetIndex() const -> const IndexType & { return m_Index; } @@ -57,8 +57,8 @@ LabelObjectLine::SetLength(const LengthType length) } template -const typename LabelObjectLine::LengthType & -LabelObjectLine::GetLength() const +auto +LabelObjectLine::GetLength() const -> const LengthType & { return m_Length; } diff --git a/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.hxx index f2409657f33..d5321a31535 100644 --- a/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkRegionFromReferenceLabelMapFilter.hxx @@ -54,8 +54,8 @@ RegionFromReferenceLabelMapFilter::SetReferenceImage(const Referenc } template -const typename RegionFromReferenceLabelMapFilter::ReferenceImageType * -RegionFromReferenceLabelMapFilter::GetReferenceImage() const +auto +RegionFromReferenceLabelMapFilter::GetReferenceImage() const -> const ReferenceImageType * { auto * surrogate = const_cast(this); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx index 1a3df85951b..2485c5164a0 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx @@ -1247,8 +1247,9 @@ FlatStructuringElement::ComputeBufferFromLines() /** Check if size of input Image is odd in all dimensions, throwing exception if even */ template -typename FlatStructuringElement::RadiusType +auto FlatStructuringElement::CheckImageSize(const typename FlatStructuringElement::ImageType * image) + -> RadiusType { const RadiusType & size = image->GetLargestPossibleRegion().GetSize(); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx index 031ccc71661..24fab78c35a 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicDilateImageFilter.hxx @@ -52,8 +52,8 @@ GrayscaleGeodesicDilateImageFilter::SetMarkerImage(co } template -const typename GrayscaleGeodesicDilateImageFilter::MarkerImageType * -GrayscaleGeodesicDilateImageFilter::GetMarkerImage() +auto +GrayscaleGeodesicDilateImageFilter::GetMarkerImage() -> const MarkerImageType * { return this->GetInput(0); } @@ -67,8 +67,8 @@ GrayscaleGeodesicDilateImageFilter::SetMaskImage(cons } template -const typename GrayscaleGeodesicDilateImageFilter::MaskImageType * -GrayscaleGeodesicDilateImageFilter::GetMaskImage() +auto +GrayscaleGeodesicDilateImageFilter::GetMaskImage() -> const MaskImageType * { return this->GetInput(1); } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx index 39dae806472..7c1fdae5292 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkGrayscaleGeodesicErodeImageFilter.hxx @@ -52,8 +52,8 @@ GrayscaleGeodesicErodeImageFilter::SetMarkerImage(con } template -const typename GrayscaleGeodesicErodeImageFilter::MarkerImageType * -GrayscaleGeodesicErodeImageFilter::GetMarkerImage() +auto +GrayscaleGeodesicErodeImageFilter::GetMarkerImage() -> const MarkerImageType * { return this->GetInput(0); } @@ -67,8 +67,8 @@ GrayscaleGeodesicErodeImageFilter::SetMaskImage(const } template -const typename GrayscaleGeodesicErodeImageFilter::MaskImageType * -GrayscaleGeodesicErodeImageFilter::GetMaskImage() +auto +GrayscaleGeodesicErodeImageFilter::GetMaskImage() -> const MaskImageType * { return this->GetInput(1); } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx b/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx index 70d4e361f0d..2657a2f1f6a 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkMaskedMovingHistogramImageFilter.hxx @@ -116,8 +116,9 @@ MaskedMovingHistogramImageFilter -typename MaskedMovingHistogramImageFilter::MaskImageType * +auto MaskedMovingHistogramImageFilter::GetOutputMask() + -> MaskImageType * { typename MaskImageType::Pointer res = dynamic_cast(this->ProcessObject::GetOutput(1)); return res; diff --git a/Modules/Filtering/Path/include/itkChainCodePath.hxx b/Modules/Filtering/Path/include/itkChainCodePath.hxx index e5ff4284b4a..b13d84e82e2 100644 --- a/Modules/Filtering/Path/include/itkChainCodePath.hxx +++ b/Modules/Filtering/Path/include/itkChainCodePath.hxx @@ -24,8 +24,8 @@ namespace itk { template -typename ChainCodePath::IndexType -ChainCodePath::EvaluateToIndex(const InputType & input) const +auto +ChainCodePath::EvaluateToIndex(const InputType & input) const -> IndexType { /* We could do something fancy here, such as "secretly" store the input and * total offset from the last time this function was called, and use such @@ -72,8 +72,8 @@ ChainCodePath::EvaluateToIndex(const InputType & input) const } template -typename ChainCodePath::OffsetType -ChainCodePath::IncrementInput(InputType & input) const +auto +ChainCodePath::IncrementInput(InputType & input) const -> OffsetType { if (input < NumberOfSteps()) { diff --git a/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx b/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx index 79988a42095..e56ba488ee4 100644 --- a/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx +++ b/Modules/Filtering/Path/include/itkFourierSeriesPath.hxx @@ -24,8 +24,8 @@ namespace itk { template -typename FourierSeriesPath::OutputType -FourierSeriesPath::Evaluate(const InputType & input) const +auto +FourierSeriesPath::Evaluate(const InputType & input) const -> OutputType { InputType theta; OutputType output; @@ -53,8 +53,8 @@ FourierSeriesPath::Evaluate(const InputType & input) const } template -typename FourierSeriesPath::VectorType -FourierSeriesPath::EvaluateDerivative(const InputType & input) const +auto +FourierSeriesPath::EvaluateDerivative(const InputType & input) const -> VectorType { InputType theta; VectorType output; diff --git a/Modules/Filtering/Path/include/itkHilbertPath.hxx b/Modules/Filtering/Path/include/itkHilbertPath.hxx index 61cf6fe4cf9..38856ddcc8c 100644 --- a/Modules/Filtering/Path/include/itkHilbertPath.hxx +++ b/Modules/Filtering/Path/include/itkHilbertPath.hxx @@ -47,8 +47,8 @@ HilbertPath::ConstructHilbertPath() } template -typename HilbertPath::IndexType -HilbertPath::TransformPathIndexToMultiDimensionalIndex(const PathIndexType id) +auto +HilbertPath::TransformPathIndexToMultiDimensionalIndex(const PathIndexType id) -> IndexType { PathIndexType d = 0; PathIndexType e = 0; @@ -73,8 +73,9 @@ HilbertPath::TransformPathIndexToMultiDimensionalIndex( } template -typename HilbertPath::PathIndexType +auto HilbertPath::TransformMultiDimensionalIndexToPathIndex(const IndexType & index) + -> PathIndexType { PathIndexType id = 0; @@ -129,15 +130,17 @@ HilbertPath::GetBitRange(const PathIndexType x, } template -typename HilbertPath::PathIndexType +auto HilbertPath::GetLeftBitRotation(PathIndexType x, PathIndexType i, const PathIndexType width) + -> PathIndexType { return (((x << (i % width)) | (x >> (width - (i % width)))) & ((1 << width) - 1)); } template -typename HilbertPath::PathIndexType +auto HilbertPath::GetRightBitRotation(PathIndexType x, PathIndexType i, const PathIndexType width) + -> PathIndexType { return (((x >> (i % width)) | (x << (width - (i % width)))) & ((1 << width) - 1)); } @@ -160,15 +163,15 @@ HilbertPath::SetBit(const PathIndexType x, } template -typename HilbertPath::PathIndexType -HilbertPath::GetGrayCode(const PathIndexType x) +auto +HilbertPath::GetGrayCode(const PathIndexType x) -> PathIndexType { return (x ^ (x >> 1)); } template -typename HilbertPath::PathIndexType -HilbertPath::GetInverseGrayCode(const PathIndexType x) +auto +HilbertPath::GetInverseGrayCode(const PathIndexType x) -> PathIndexType { if (x == 0) { @@ -190,8 +193,9 @@ HilbertPath::GetInverseGrayCode(const PathIndexType x) } template -typename HilbertPath::PathIndexType +auto HilbertPath::GetTrailingSetBits(const PathIndexType x, const PathIndexType width) + -> PathIndexType { PathIndexType i = 0; PathIndexType y = x; @@ -205,8 +209,8 @@ HilbertPath::GetTrailingSetBits(const PathIndexType x, } template -typename HilbertPath::PathIndexType -HilbertPath::GetDirection(const PathIndexType x, const PathIndexType n) +auto +HilbertPath::GetDirection(const PathIndexType x, const PathIndexType n) -> PathIndexType { if (x == 0) { @@ -223,8 +227,8 @@ HilbertPath::GetDirection(const PathIndexType x, const } template -typename HilbertPath::PathIndexType -HilbertPath::GetEntry(const PathIndexType x) +auto +HilbertPath::GetEntry(const PathIndexType x) -> PathIndexType { if (x == 0) { diff --git a/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx b/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx index ba2c3f2fb8f..f9940d18b79 100644 --- a/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkImageAndPathToImageFilter.hxx @@ -46,15 +46,15 @@ ImageAndPathToImageFilter::SetImageInput( } template -const typename ImageAndPathToImageFilter::InputImageType * -ImageAndPathToImageFilter::GetImageInput() +auto +ImageAndPathToImageFilter::GetImageInput() -> const InputImageType * { return this->GetNonConstImageInput(); } template -typename ImageAndPathToImageFilter::InputImageType * -ImageAndPathToImageFilter::GetNonConstImageInput() +auto +ImageAndPathToImageFilter::GetNonConstImageInput() -> InputImageType * { auto * temp_return = dynamic_cast(this->ProcessObject::GetInput(0)); if (temp_return == nullptr) @@ -75,15 +75,15 @@ ImageAndPathToImageFilter::SetPathInput(c } template -const typename ImageAndPathToImageFilter::InputPathType * -ImageAndPathToImageFilter::GetPathInput() +auto +ImageAndPathToImageFilter::GetPathInput() -> const InputPathType * { return this->GetNonConstPathInput(); } template -typename ImageAndPathToImageFilter::InputPathType * -ImageAndPathToImageFilter::GetNonConstPathInput() +auto +ImageAndPathToImageFilter::GetNonConstPathInput() -> InputPathType * { auto * temp_return = dynamic_cast(this->ProcessObject::GetInput(1)); if (temp_return == nullptr) diff --git a/Modules/Filtering/Path/include/itkImageToPathFilter.hxx b/Modules/Filtering/Path/include/itkImageToPathFilter.hxx index c5da9591694..009d9fa97f0 100644 --- a/Modules/Filtering/Path/include/itkImageToPathFilter.hxx +++ b/Modules/Filtering/Path/include/itkImageToPathFilter.hxx @@ -60,16 +60,16 @@ ImageToPathFilter::SetInput(unsigned int index, const template -const typename ImageToPathFilter::InputImageType * -ImageToPathFilter::GetInput() +auto +ImageToPathFilter::GetInput() -> const InputImageType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } template -const typename ImageToPathFilter::InputImageType * -ImageToPathFilter::GetInput(unsigned int idx) +auto +ImageToPathFilter::GetInput(unsigned int idx) -> const InputImageType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Filtering/Path/include/itkParametricPath.hxx b/Modules/Filtering/Path/include/itkParametricPath.hxx index 5d7e75f144d..9320ca23a68 100644 --- a/Modules/Filtering/Path/include/itkParametricPath.hxx +++ b/Modules/Filtering/Path/include/itkParametricPath.hxx @@ -33,8 +33,8 @@ ParametricPath::ParametricPath() } template -typename ParametricPath::IndexType -ParametricPath::EvaluateToIndex(const InputType & input) const +auto +ParametricPath::EvaluateToIndex(const InputType & input) const -> IndexType { ContinuousIndexType continuousIndex; IndexType index; @@ -51,8 +51,8 @@ ParametricPath::EvaluateToIndex(const InputType & input) const } template -typename ParametricPath::OffsetType -ParametricPath::IncrementInput(InputType & input) const +auto +ParametricPath::IncrementInput(InputType & input) const -> OffsetType { int iterationCount; bool tooSmall; @@ -119,8 +119,8 @@ ParametricPath::IncrementInput(InputType & input) const } template -typename ParametricPath::VectorType -ParametricPath::EvaluateDerivative(const InputType & input) const +auto +ParametricPath::EvaluateDerivative(const InputType & input) const -> VectorType { InputType inputStepSize; diff --git a/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.hxx b/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.hxx index b43da33c5e2..244e9f11fd2 100644 --- a/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.hxx +++ b/Modules/Filtering/Path/include/itkPathAndImageToPathFilter.hxx @@ -46,8 +46,8 @@ PathAndImageToPathFilter::SetPathInput(con } template -const typename PathAndImageToPathFilter::InputPathType * -PathAndImageToPathFilter::GetPathInput() +auto +PathAndImageToPathFilter::GetPathInput() -> const InputPathType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } @@ -63,8 +63,8 @@ PathAndImageToPathFilter::SetImageInput(co } template -const typename PathAndImageToPathFilter::InputImageType * -PathAndImageToPathFilter::GetImageInput() +auto +PathAndImageToPathFilter::GetImageInput() -> const InputImageType * { return static_cast(this->ProcessObject::GetInput(1)); } diff --git a/Modules/Filtering/Path/include/itkPathSource.hxx b/Modules/Filtering/Path/include/itkPathSource.hxx index ae17d39e3fa..29b273a9e51 100644 --- a/Modules/Filtering/Path/include/itkPathSource.hxx +++ b/Modules/Filtering/Path/include/itkPathSource.hxx @@ -42,8 +42,8 @@ PathSource::PathSource() * */ template -typename PathSource::OutputPathType * -PathSource::GetOutput() +auto +PathSource::GetOutput() -> OutputPathType * { return itkDynamicCastInDebugMode(this->GetPrimaryOutput()); } @@ -52,8 +52,8 @@ PathSource::GetOutput() * */ template -typename PathSource::OutputPathType * -PathSource::GetOutput(unsigned int idx) +auto +PathSource::GetOutput(unsigned int idx) -> OutputPathType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(idx)); } diff --git a/Modules/Filtering/Path/include/itkPathToImageFilter.hxx b/Modules/Filtering/Path/include/itkPathToImageFilter.hxx index 9804f8016d4..64148c3279f 100644 --- a/Modules/Filtering/Path/include/itkPathToImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkPathToImageFilter.hxx @@ -64,16 +64,16 @@ PathToImageFilter::SetInput(unsigned int index, const /** Get the input Path */ template -const typename PathToImageFilter::InputPathType * -PathToImageFilter::GetInput() +auto +PathToImageFilter::GetInput() -> const InputPathType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } /** Get the input Path */ template -const typename PathToImageFilter::InputPathType * -PathToImageFilter::GetInput(unsigned int idx) +auto +PathToImageFilter::GetInput(unsigned int idx) -> const InputPathType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Filtering/Path/include/itkPathToPathFilter.hxx b/Modules/Filtering/Path/include/itkPathToPathFilter.hxx index f7e9a143bf2..03447792924 100644 --- a/Modules/Filtering/Path/include/itkPathToPathFilter.hxx +++ b/Modules/Filtering/Path/include/itkPathToPathFilter.hxx @@ -57,8 +57,8 @@ PathToPathFilter::SetInput(unsigned int index, const TI * */ template -const typename PathToPathFilter::InputPathType * -PathToPathFilter::GetInput() +auto +PathToPathFilter::GetInput() -> const InputPathType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } @@ -67,8 +67,8 @@ PathToPathFilter::GetInput() * */ template -const typename PathToPathFilter::InputPathType * -PathToPathFilter::GetInput(unsigned int idx) +auto +PathToPathFilter::GetInput(unsigned int idx) -> const InputPathType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx b/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx index 2cf25271184..7c10d7d4b14 100644 --- a/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx +++ b/Modules/Filtering/Path/include/itkPolyLineParametricPath.hxx @@ -26,8 +26,8 @@ namespace itk { template -typename PolyLineParametricPath::OutputType -PolyLineParametricPath::Evaluate(const InputType & input) const +auto +PolyLineParametricPath::Evaluate(const InputType & input) const -> OutputType { // Handle the endpoint carefully, since there is no following vertex const auto endPoint = static_cast(m_VertexList->Size() - 1); @@ -56,8 +56,8 @@ PolyLineParametricPath::Evaluate(const InputType & input) const } template -typename PolyLineParametricPath::VectorType -PolyLineParametricPath::EvaluateDerivative(const InputType & input) const +auto +PolyLineParametricPath::EvaluateDerivative(const InputType & input) const -> VectorType { // Get next integral time-point const InputType nextTimepoint = std::min(std::floor(input + 1.0), this->EndOfInput()); @@ -80,8 +80,8 @@ PolyLineParametricPath::EvaluateDerivative(const InputType & input) } template -typename PolyLineParametricPath::OffsetType -PolyLineParametricPath::IncrementInput(InputType & input) const +auto +PolyLineParametricPath::IncrementInput(InputType & input) const -> OffsetType { // Save this input index since we will use it to calculate the offset const IndexType originalIndex = this->EvaluateToIndex(input); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx index 1441958969d..ed7ae32ffbf 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.hxx @@ -33,16 +33,16 @@ BorderQuadEdgeMeshFilter::BorderQuadEdgeMeshFilter() // ---------------------------------------------------------------------------- template -typename BorderQuadEdgeMeshFilter::MapPointIdentifier -BorderQuadEdgeMeshFilter::GetBoundaryPtMap() +auto +BorderQuadEdgeMeshFilter::GetBoundaryPtMap() -> MapPointIdentifier { return this->m_BoundaryPtMap; } // ---------------------------------------------------------------------------- template -typename BorderQuadEdgeMeshFilter::InputVectorPointType -BorderQuadEdgeMeshFilter::GetBorder() +auto +BorderQuadEdgeMeshFilter::GetBorder() -> InputVectorPointType { return this->m_Border; } @@ -93,8 +93,8 @@ BorderQuadEdgeMeshFilter::GenerateData() // *** under testing *** #if !defined(ITK_WRAPPING_PARSER) template -typename BorderQuadEdgeMeshFilter::InputQEType * -BorderQuadEdgeMeshFilter::ComputeLongestBorder() +auto +BorderQuadEdgeMeshFilter::ComputeLongestBorder() -> InputQEType * { BoundaryRepresentativeEdgesPointer boundaryRepresentativeEdges = BoundaryRepresentativeEdgesType::New(); @@ -143,8 +143,8 @@ BorderQuadEdgeMeshFilter::ComputeLongestBorder() // ---------------------------------------------------------------------------- #if !defined(ITK_WRAPPING_PARSER) template -typename BorderQuadEdgeMeshFilter::InputQEType * -BorderQuadEdgeMeshFilter::ComputeLargestBorder() +auto +BorderQuadEdgeMeshFilter::ComputeLargestBorder() -> InputQEType * { BoundaryRepresentativeEdgesPointer boundaryRepresentativeEdges = BoundaryRepresentativeEdgesType::New(); @@ -254,8 +254,8 @@ BorderQuadEdgeMeshFilter::DiskTransform() // ---------------------------------------------------------------------------- template -typename BorderQuadEdgeMeshFilter::InputCoordRepType -BorderQuadEdgeMeshFilter::RadiusMaxSquare() +auto +BorderQuadEdgeMeshFilter::RadiusMaxSquare() -> InputCoordRepType { InputMeshConstPointer input = this->GetInput(); @@ -281,8 +281,8 @@ BorderQuadEdgeMeshFilter::RadiusMaxSquare() // ---------------------------------------------------------------------------- template -typename BorderQuadEdgeMeshFilter::InputPointType -BorderQuadEdgeMeshFilter::GetMeshBarycentre() +auto +BorderQuadEdgeMeshFilter::GetMeshBarycentre() -> InputPointType { InputMeshConstPointer input = this->GetInput(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx index 1843c91c945..c1f6b2200c2 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.hxx @@ -30,8 +30,8 @@ NormalQuadEdgeMeshFilter::NormalQuadEdgeMeshFilter() } template -typename NormalQuadEdgeMeshFilter::OutputFaceNormalType -NormalQuadEdgeMeshFilter::ComputeFaceNormal(OutputPolygonType * iPoly) +auto +NormalQuadEdgeMeshFilter::ComputeFaceNormal(OutputPolygonType * iPoly) -> OutputFaceNormalType { OutputMeshPointer output = this->GetOutput(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx index 4ccb8df677e..db7bef3cb60 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadricDecimationQuadEdgeMeshFilter.hxx @@ -67,8 +67,8 @@ QuadricDecimationQuadEdgeMeshFilter::DeletePoint( } template -typename QuadricDecimationQuadEdgeMeshFilter::OutputPointType -QuadricDecimationQuadEdgeMeshFilter::Relocate(OutputQEType * iEdge) +auto +QuadricDecimationQuadEdgeMeshFilter::Relocate(OutputQEType * iEdge) -> OutputPointType { OutputPointIdentifier id_org = iEdge->GetOrigin(); OutputPointIdentifier id_dest = iEdge->GetDestination(); diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx index 0def06fe009..326789d561c 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx @@ -29,8 +29,9 @@ SquaredEdgeLengthDecimationQuadEdgeMeshFilter:: {} template -typename SquaredEdgeLengthDecimationQuadEdgeMeshFilter::OutputPointType +auto SquaredEdgeLengthDecimationQuadEdgeMeshFilter::Relocate(OutputQEType * iEdge) + -> OutputPointType { OutputMeshPointer output = this->GetOutput(); OutputPointIdentifier id_org = iEdge->GetOrigin(); diff --git a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx index 9a33637b5d7..55bf3ffe872 100644 --- a/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkSmoothingRecursiveGaussianImageFilter.hxx @@ -137,16 +137,16 @@ SmoothingRecursiveGaussianImageFilter::SetSigmaArray( template -typename SmoothingRecursiveGaussianImageFilter::SigmaArrayType -SmoothingRecursiveGaussianImageFilter::GetSigmaArray() const +auto +SmoothingRecursiveGaussianImageFilter::GetSigmaArray() const -> SigmaArrayType { return m_Sigma; } template -typename SmoothingRecursiveGaussianImageFilter::ScalarRealType -SmoothingRecursiveGaussianImageFilter::GetSigma() const +auto +SmoothingRecursiveGaussianImageFilter::GetSigma() const -> ScalarRealType { return m_Sigma[0]; } diff --git a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx index 0bbb4ca7983..5464fe86f51 100644 --- a/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx +++ b/Modules/Filtering/Thresholding/include/itkBinaryThresholdImageFilter.hxx @@ -86,8 +86,8 @@ BinaryThresholdImageFilter::SetLowerThresholdInput(co } template -typename BinaryThresholdImageFilter::InputPixelType -BinaryThresholdImageFilter::GetLowerThreshold() const +auto +BinaryThresholdImageFilter::GetLowerThreshold() const -> InputPixelType { typename InputPixelObjectType::Pointer lower = const_cast(this)->GetLowerThresholdInput(); @@ -95,8 +95,8 @@ BinaryThresholdImageFilter::GetLowerThreshold() const } template -typename BinaryThresholdImageFilter::InputPixelObjectType * -BinaryThresholdImageFilter::GetLowerThresholdInput() +auto +BinaryThresholdImageFilter::GetLowerThresholdInput() -> InputPixelObjectType * { typename InputPixelObjectType::Pointer lower = static_cast(this->ProcessObject::GetInput(1)); if (!lower) @@ -112,8 +112,8 @@ BinaryThresholdImageFilter::GetLowerThresholdInput() } template -const typename BinaryThresholdImageFilter::InputPixelObjectType * -BinaryThresholdImageFilter::GetLowerThresholdInput() const +auto +BinaryThresholdImageFilter::GetLowerThresholdInput() const -> const InputPixelObjectType * { typename InputPixelObjectType::Pointer lower = const_cast(static_cast(this->ProcessObject::GetInput(1))); @@ -165,8 +165,8 @@ BinaryThresholdImageFilter::SetUpperThresholdInput(co } template -typename BinaryThresholdImageFilter::InputPixelType -BinaryThresholdImageFilter::GetUpperThreshold() const +auto +BinaryThresholdImageFilter::GetUpperThreshold() const -> InputPixelType { typename InputPixelObjectType::Pointer upper = const_cast(this)->GetUpperThresholdInput(); @@ -174,8 +174,8 @@ BinaryThresholdImageFilter::GetUpperThreshold() const } template -typename BinaryThresholdImageFilter::InputPixelObjectType * -BinaryThresholdImageFilter::GetUpperThresholdInput() +auto +BinaryThresholdImageFilter::GetUpperThresholdInput() -> InputPixelObjectType * { typename InputPixelObjectType::Pointer upper = static_cast(this->ProcessObject::GetInput(2)); if (!upper) @@ -191,8 +191,8 @@ BinaryThresholdImageFilter::GetUpperThresholdInput() } template -const typename BinaryThresholdImageFilter::InputPixelObjectType * -BinaryThresholdImageFilter::GetUpperThresholdInput() const +auto +BinaryThresholdImageFilter::GetUpperThresholdInput() const -> const InputPixelObjectType * { typename InputPixelObjectType::Pointer upper = const_cast(static_cast(this->ProcessObject::GetInput(2))); diff --git a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx index d7f7e63cb26..7ae712511ef 100644 --- a/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkKappaSigmaThresholdImageCalculator.hxx @@ -101,8 +101,8 @@ KappaSigmaThresholdImageCalculator::Compute() } template -const typename KappaSigmaThresholdImageCalculator::InputPixelType & -KappaSigmaThresholdImageCalculator::GetOutput() const +auto +KappaSigmaThresholdImageCalculator::GetOutput() const -> const InputPixelType & { if (!this->m_Valid) { diff --git a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx index d723c6605e9..60002b5b7c1 100644 --- a/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx +++ b/Modules/Filtering/Thresholding/include/itkOtsuMultipleThresholdsCalculator.hxx @@ -32,8 +32,8 @@ OtsuMultipleThresholdsCalculator::OtsuMultipleThresholdsCalcula } template -const typename OtsuMultipleThresholdsCalculator::OutputType & -OtsuMultipleThresholdsCalculator::GetOutput() +auto +OtsuMultipleThresholdsCalculator::GetOutput() -> const OutputType & { return m_Output; } diff --git a/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx b/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx index c594aee0ce6..f62a47c276a 100644 --- a/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx +++ b/Modules/IO/CSV/include/itkCSVArray2DDataObject.hxx @@ -27,15 +27,15 @@ namespace itk { template -typename CSVArray2DDataObject::StringVectorType -CSVArray2DDataObject::GetColumnHeaders() const +auto +CSVArray2DDataObject::GetColumnHeaders() const -> StringVectorType { return this->m_ColumnHeaders; } template -typename CSVArray2DDataObject::StringVectorType -CSVArray2DDataObject::GetRowHeaders() const +auto +CSVArray2DDataObject::GetRowHeaders() const -> StringVectorType { return this->m_RowHeaders; } @@ -79,8 +79,8 @@ CSVArray2DDataObject::GetColumnIndexByName(const std::string & column_nam } template -typename CSVArray2DDataObject::NumericVectorType -CSVArray2DDataObject::GetRow(const unsigned int & row_index) const +auto +CSVArray2DDataObject::GetRow(const unsigned int & row_index) const -> NumericVectorType { NumericVectorType row; unsigned int max_rows = this->m_Matrix.rows() - 1; @@ -97,8 +97,8 @@ CSVArray2DDataObject::GetRow(const unsigned int & row_index) const } template -typename CSVArray2DDataObject::NumericVectorType -CSVArray2DDataObject::GetRow(const std::string & row_name) const +auto +CSVArray2DDataObject::GetRow(const std::string & row_name) const -> NumericVectorType { NumericVectorType row; unsigned int index = this->GetRowIndexByName(row_name); @@ -107,8 +107,8 @@ CSVArray2DDataObject::GetRow(const std::string & row_name) const } template -typename CSVArray2DDataObject::NumericVectorType -CSVArray2DDataObject::GetColumn(const unsigned int & column_index) const +auto +CSVArray2DDataObject::GetColumn(const unsigned int & column_index) const -> NumericVectorType { NumericVectorType column; unsigned int max_columns = this->m_Matrix.columns() - 1; @@ -125,8 +125,8 @@ CSVArray2DDataObject::GetColumn(const unsigned int & column_index) const } template -typename CSVArray2DDataObject::NumericVectorType -CSVArray2DDataObject::GetColumn(const std::string & column_name) const +auto +CSVArray2DDataObject::GetColumn(const std::string & column_name) const -> NumericVectorType { NumericVectorType column; unsigned int index = this->GetColumnIndexByName(column_name); diff --git a/Modules/IO/CSV/include/itkCSVArray2DFileReader.hxx b/Modules/IO/CSV/include/itkCSVArray2DFileReader.hxx index f589f53c44b..a37162e2818 100644 --- a/Modules/IO/CSV/include/itkCSVArray2DFileReader.hxx +++ b/Modules/IO/CSV/include/itkCSVArray2DFileReader.hxx @@ -132,8 +132,8 @@ CSVArray2DFileReader::Update() /** Get the output */ template -typename CSVArray2DFileReader::Array2DDataObjectPointer -CSVArray2DFileReader::GetOutput() +auto +CSVArray2DFileReader::GetOutput() -> Array2DDataObjectPointer { return this->GetModifiableArray2DDataObject(); } diff --git a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx index 664064c9739..a418c4675d1 100644 --- a/Modules/IO/ImageBase/include/itkImageFileWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageFileWriter.hxx @@ -47,16 +47,16 @@ ImageFileWriter::SetInput(const InputImageType * input) //--------------------------------------------------------- template -const typename ImageFileWriter::InputImageType * -ImageFileWriter::GetInput() +auto +ImageFileWriter::GetInput() -> const InputImageType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } //--------------------------------------------------------- template -const typename ImageFileWriter::InputImageType * -ImageFileWriter::GetInput(unsigned int idx) +auto +ImageFileWriter::GetInput(unsigned int idx) -> const InputImageType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx b/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx index 30b2d324796..418f0d4f229 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx +++ b/Modules/IO/ImageBase/include/itkImageSeriesReader.hxx @@ -495,8 +495,8 @@ ImageSeriesReader::GenerateData() } template -typename ImageSeriesReader::DictionaryArrayRawPointer -ImageSeriesReader::GetMetaDataDictionaryArray() const +auto +ImageSeriesReader::GetMetaDataDictionaryArray() const -> DictionaryArrayRawPointer { // this warning has been introduced in 3.17 due to a change in // behavior. It may be removed in the future. diff --git a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx index 0e910f59a43..1ee8475f386 100644 --- a/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx +++ b/Modules/IO/ImageBase/include/itkImageSeriesWriter.hxx @@ -51,16 +51,16 @@ ImageSeriesWriter::SetInput(const InputImageType * in //--------------------------------------------------------- template -const typename ImageSeriesWriter::InputImageType * -ImageSeriesWriter::GetInput() +auto +ImageSeriesWriter::GetInput() -> const InputImageType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } //--------------------------------------------------------- template -const typename ImageSeriesWriter::InputImageType * -ImageSeriesWriter::GetInput(unsigned int idx) +auto +ImageSeriesWriter::GetInput(unsigned int idx) -> const InputImageType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx b/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx index 6a155b5098e..83443a69909 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx +++ b/Modules/IO/MeshBase/include/itkMeshFileWriter.hxx @@ -47,8 +47,8 @@ MeshFileWriter::SetInput(const InputMeshType * input) } template -const typename MeshFileWriter::InputMeshType * -MeshFileWriter::GetInput() +auto +MeshFileWriter::GetInput() -> const InputMeshType * { if (this->GetNumberOfInputs() < 1) { @@ -59,8 +59,8 @@ MeshFileWriter::GetInput() } template -const typename MeshFileWriter::InputMeshType * -MeshFileWriter::GetInput(unsigned int idx) +auto +MeshFileWriter::GetInput(unsigned int idx) -> const InputMeshType * { return static_cast(this->ProcessObject::GetInput(idx)); } diff --git a/Modules/IO/XML/include/itkDOMReader.hxx b/Modules/IO/XML/include/itkDOMReader.hxx index cf10cbbc1a7..9ffebe6a18e 100644 --- a/Modules/IO/XML/include/itkDOMReader.hxx +++ b/Modules/IO/XML/include/itkDOMReader.hxx @@ -61,16 +61,16 @@ DOMReader::SetOutput(OutputType * output) /** Get the output object for full access. */ template -typename DOMReader::OutputType * -DOMReader::GetOutput() +auto +DOMReader::GetOutput() -> OutputType * { return this->m_Output; } /** Get the output object for read-only access. */ template -const typename DOMReader::OutputType * -DOMReader::GetOutput() const +auto +DOMReader::GetOutput() const -> const OutputType * { return this->m_Output; } diff --git a/Modules/IO/XML/include/itkDOMWriter.hxx b/Modules/IO/XML/include/itkDOMWriter.hxx index 37d8621371e..05234955b75 100644 --- a/Modules/IO/XML/include/itkDOMWriter.hxx +++ b/Modules/IO/XML/include/itkDOMWriter.hxx @@ -59,8 +59,8 @@ DOMWriter::SetInput(const InputType * input) /** Get the input object to be written. */ template -const typename DOMWriter::InputType * -DOMWriter::GetInput() const +auto +DOMWriter::GetInput() const -> const InputType * { return this->m_Input; } diff --git a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx index a164087398b..a4f4b032b3a 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx +++ b/Modules/Nonunit/Review/include/itkDiscreteGaussianDerivativeImageFunction.hxx @@ -158,8 +158,9 @@ DiscreteGaussianDerivativeImageFunction::RecomputeGaussian /** Evaluate the function at the specified index */ template -typename DiscreteGaussianDerivativeImageFunction::OutputType +auto DiscreteGaussianDerivativeImageFunction::EvaluateAtIndex(const IndexType & index) const + -> OutputType { OutputType derivative; @@ -172,8 +173,8 @@ DiscreteGaussianDerivativeImageFunction::EvaluateAtIndex(c /** Evaluate the function at the specified point */ template -typename DiscreteGaussianDerivativeImageFunction::OutputType -DiscreteGaussianDerivativeImageFunction::Evaluate(const PointType & point) const +auto +DiscreteGaussianDerivativeImageFunction::Evaluate(const PointType & point) const -> OutputType { if (m_InterpolationMode == InterpolationModeEnum::NearestNeighbourInterpolation) { diff --git a/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx b/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx index a6b9599945f..bd989a69795 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx +++ b/Modules/Nonunit/Review/include/itkDiscreteGradientMagnitudeGaussianImageFunction.hxx @@ -179,8 +179,9 @@ DiscreteGradientMagnitudeGaussianImageFunction::RecomputeG /** Evaluate the function at the specified index */ template -typename DiscreteGradientMagnitudeGaussianImageFunction::OutputType +auto DiscreteGradientMagnitudeGaussianImageFunction::EvaluateAtIndex(const IndexType & index) const + -> OutputType { OutputType gradientMagnitude = itk::NumericTraits::ZeroValue(); OutputType temp; @@ -205,8 +206,9 @@ DiscreteGradientMagnitudeGaussianImageFunction::EvaluateAt /** Evaluate the function at the specified point */ template -typename DiscreteGradientMagnitudeGaussianImageFunction::OutputType +auto DiscreteGradientMagnitudeGaussianImageFunction::Evaluate(const PointType & point) const + -> OutputType { if (m_InterpolationMode == InterpolationModeEnum::NearestNeighbourInterpolation) { diff --git a/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.hxx b/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.hxx index cef8998f5de..a129ef261fc 100644 --- a/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.hxx +++ b/Modules/Nonunit/Review/include/itkDiscreteHessianGaussianImageFunction.hxx @@ -189,8 +189,8 @@ DiscreteHessianGaussianImageFunction::RecomputeGaussianKer /** Evaluate the function at the specified index */ template -typename DiscreteHessianGaussianImageFunction::OutputType -DiscreteHessianGaussianImageFunction::EvaluateAtIndex(const IndexType & index) const +auto +DiscreteHessianGaussianImageFunction::EvaluateAtIndex(const IndexType & index) const -> OutputType { OutputType hessian; @@ -204,8 +204,8 @@ DiscreteHessianGaussianImageFunction::EvaluateAtIndex(cons /** Evaluate the function at the specified point */ template -typename DiscreteHessianGaussianImageFunction::OutputType -DiscreteHessianGaussianImageFunction::Evaluate(const PointType & point) const +auto +DiscreteHessianGaussianImageFunction::Evaluate(const PointType & point) const -> OutputType { if (m_InterpolationMode == InterpolationModeEnum::NearestNeighbourInterpolation) { diff --git a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx index 5b93c4f7208..971c514b7f6 100644 --- a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx @@ -575,8 +575,8 @@ LabelGeometryImageFilter::CalculateOrientedBoundin } template -typename LabelGeometryImageFilter::LabelIndicesType -LabelGeometryImageFilter::GetPixelIndices(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetPixelIndices(LabelPixelType label) const -> LabelIndicesType { MapConstIterator mapIt; @@ -613,8 +613,8 @@ LabelGeometryImageFilter::GetVolume(LabelPixelType } template -typename LabelGeometryImageFilter::RealType -LabelGeometryImageFilter::GetIntegratedIntensity(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetIntegratedIntensity(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -631,8 +631,8 @@ LabelGeometryImageFilter::GetIntegratedIntensity(L } template -typename LabelGeometryImageFilter::LabelPointType -LabelGeometryImageFilter::GetCentroid(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetCentroid(LabelPixelType label) const -> LabelPointType { MapConstIterator mapIt; @@ -651,8 +651,9 @@ LabelGeometryImageFilter::GetCentroid(LabelPixelTy } template -typename LabelGeometryImageFilter::LabelPointType +auto LabelGeometryImageFilter::GetWeightedCentroid(LabelPixelType label) const + -> LabelPointType { MapConstIterator mapIt; @@ -671,8 +672,8 @@ LabelGeometryImageFilter::GetWeightedCentroid(Labe } template -typename LabelGeometryImageFilter::VectorType -LabelGeometryImageFilter::GetEigenvalues(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetEigenvalues(LabelPixelType label) const -> VectorType { MapConstIterator mapIt; @@ -690,8 +691,8 @@ LabelGeometryImageFilter::GetEigenvalues(LabelPixe } template -typename LabelGeometryImageFilter::MatrixType -LabelGeometryImageFilter::GetEigenvectors(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetEigenvectors(LabelPixelType label) const -> MatrixType { MapConstIterator mapIt; @@ -709,8 +710,8 @@ LabelGeometryImageFilter::GetEigenvectors(LabelPix } template -typename LabelGeometryImageFilter::AxesLengthType -LabelGeometryImageFilter::GetAxesLength(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetAxesLength(LabelPixelType label) const -> AxesLengthType { MapConstIterator mapIt; @@ -729,8 +730,8 @@ LabelGeometryImageFilter::GetAxesLength(LabelPixel } template -typename LabelGeometryImageFilter::RealType -LabelGeometryImageFilter::GetMinorAxisLength(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetMinorAxisLength(LabelPixelType label) const -> RealType { AxesLengthType axisLength = GetAxesLength(label); @@ -738,8 +739,8 @@ LabelGeometryImageFilter::GetMinorAxisLength(Label } template -typename LabelGeometryImageFilter::RealType -LabelGeometryImageFilter::GetMajorAxisLength(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetMajorAxisLength(LabelPixelType label) const -> RealType { AxesLengthType axisLength = GetAxesLength(label); @@ -747,8 +748,8 @@ LabelGeometryImageFilter::GetMajorAxisLength(Label } template -typename LabelGeometryImageFilter::RealType -LabelGeometryImageFilter::GetEccentricity(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetEccentricity(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -765,8 +766,8 @@ LabelGeometryImageFilter::GetEccentricity(LabelPix } template -typename LabelGeometryImageFilter::RealType -LabelGeometryImageFilter::GetElongation(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetElongation(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -783,8 +784,8 @@ LabelGeometryImageFilter::GetElongation(LabelPixel } template -typename LabelGeometryImageFilter::RealType -LabelGeometryImageFilter::GetOrientation(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetOrientation(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -801,8 +802,8 @@ LabelGeometryImageFilter::GetOrientation(LabelPixe } template -typename LabelGeometryImageFilter::BoundingBoxType -LabelGeometryImageFilter::GetBoundingBox(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetBoundingBox(LabelPixelType label) const -> BoundingBoxType { MapConstIterator mapIt; @@ -821,8 +822,8 @@ LabelGeometryImageFilter::GetBoundingBox(LabelPixe } template -typename LabelGeometryImageFilter::RealType -LabelGeometryImageFilter::GetBoundingBoxVolume(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetBoundingBoxVolume(LabelPixelType label) const -> RealType { MapConstIterator mapIt; @@ -839,8 +840,8 @@ LabelGeometryImageFilter::GetBoundingBoxVolume(Lab } template -typename LabelGeometryImageFilter::LabelSizeType -LabelGeometryImageFilter::GetBoundingBoxSize(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetBoundingBoxSize(LabelPixelType label) const -> LabelSizeType { MapConstIterator mapIt; @@ -859,8 +860,9 @@ LabelGeometryImageFilter::GetBoundingBoxSize(Label } template -typename LabelGeometryImageFilter::BoundingBoxVerticesType +auto LabelGeometryImageFilter::GetOrientedBoundingBoxVertices(LabelPixelType label) const + -> BoundingBoxVerticesType { unsigned int numberOfVertices = 1 << ImageDimension; MapConstIterator mapIt = m_LabelGeometryMapper.find(label); @@ -880,8 +882,9 @@ LabelGeometryImageFilter::GetOrientedBoundingBoxVe } template -typename LabelGeometryImageFilter::RealType +auto LabelGeometryImageFilter::GetOrientedBoundingBoxVolume(LabelPixelType label) const + -> RealType { MapConstIterator mapIt; @@ -898,8 +901,9 @@ LabelGeometryImageFilter::GetOrientedBoundingBoxVo } template -typename LabelGeometryImageFilter::LabelPointType +auto LabelGeometryImageFilter::GetOrientedBoundingBoxSize(LabelPixelType label) const + -> LabelPointType { MapConstIterator mapIt; @@ -921,8 +925,9 @@ LabelGeometryImageFilter::GetOrientedBoundingBoxSi } template -typename LabelGeometryImageFilter::LabelPointType +auto LabelGeometryImageFilter::GetOrientedBoundingBoxOrigin(LabelPixelType label) const + -> LabelPointType { MapConstIterator mapIt; @@ -941,8 +946,8 @@ LabelGeometryImageFilter::GetOrientedBoundingBoxOr } template -typename LabelGeometryImageFilter::MatrixType -LabelGeometryImageFilter::GetRotationMatrix(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetRotationMatrix(LabelPixelType label) const -> MatrixType { MapConstIterator mapIt; @@ -960,8 +965,8 @@ LabelGeometryImageFilter::GetRotationMatrix(LabelP } template -typename LabelGeometryImageFilter::RegionType -LabelGeometryImageFilter::GetRegion(LabelPixelType label) const +auto +LabelGeometryImageFilter::GetRegion(LabelPixelType label) const -> RegionType { MapConstIterator mapIt; diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx index 60de989362d..703ef3ece38 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunction.hxx @@ -56,8 +56,8 @@ RegionBasedLevelSetFunction::RegionBasedLevelSetF } template -typename RegionBasedLevelSetFunction::VectorType -RegionBasedLevelSetFunction::InitializeZeroVectorConstant() +auto +RegionBasedLevelSetFunction::InitializeZeroVectorConstant() -> VectorType { VectorType ans; @@ -126,8 +126,9 @@ RegionBasedLevelSetFunction::UpdateSharedData(boo } template -typename RegionBasedLevelSetFunction::TimeStepType +auto RegionBasedLevelSetFunction::ComputeGlobalTimeStep(void * GlobalData) const + -> TimeStepType { /* Computing the time-step for stable curve evolution */ @@ -325,8 +326,8 @@ RegionBasedLevelSetFunction::ComputeUpdate(const } template -typename RegionBasedLevelSetFunction::ScalarValueType -RegionBasedLevelSetFunction::ComputeLaplacian(GlobalDataStruct * gd) +auto +RegionBasedLevelSetFunction::ComputeLaplacian(GlobalDataStruct * gd) -> ScalarValueType { ScalarValueType laplacian = 0.; @@ -340,8 +341,8 @@ RegionBasedLevelSetFunction::ComputeLaplacian(Glo } template -typename RegionBasedLevelSetFunction::ScalarValueType -RegionBasedLevelSetFunction::ComputeVolumeRegularizationTerm() +auto +RegionBasedLevelSetFunction::ComputeVolumeRegularizationTerm() -> ScalarValueType { return 2 * (this->m_SharedData->m_LevelSetDataPointerVector[this->m_FunctionId]->m_WeightedNumberOfPixelsInsideLevelSet - diff --git a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx index 9d5ca9f7310..02130b13bea 100644 --- a/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx +++ b/Modules/Nonunit/Review/include/itkRegionBasedLevelSetFunctionData.hxx @@ -56,8 +56,9 @@ RegionBasedLevelSetFunctionData::CreateHeavisideFunc } template -typename RegionBasedLevelSetFunctionData::InputIndexType +auto RegionBasedLevelSetFunctionData::GetIndex(const FeatureIndexType & featureIndex) + -> InputIndexType { InputIndexType index; @@ -70,8 +71,9 @@ RegionBasedLevelSetFunctionData::GetIndex(const Feat } template -typename RegionBasedLevelSetFunctionData::FeatureIndexType +auto RegionBasedLevelSetFunctionData::GetFeatureIndex(const InputIndexType & inputIndex) + -> FeatureIndexType { FeatureIndexType index; diff --git a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx index fa53a86d08c..65b46d80b30 100644 --- a/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx +++ b/Modules/Nonunit/Review/include/itkRobustAutomaticThresholdCalculator.hxx @@ -62,8 +62,8 @@ RobustAutomaticThresholdCalculator::Compute() } template -const typename RobustAutomaticThresholdCalculator::InputPixelType & -RobustAutomaticThresholdCalculator::GetOutput() const +auto +RobustAutomaticThresholdCalculator::GetOutput() const -> const InputPixelType & { if (!m_Valid) { diff --git a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx index 73065923723..905dea95b42 100644 --- a/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkStochasticFractalDimensionImageFilter.hxx @@ -47,8 +47,9 @@ StochasticFractalDimensionImageFilter::Se } template -const typename StochasticFractalDimensionImageFilter::MaskImageType * +auto StochasticFractalDimensionImageFilter::GetMaskImage() const + -> const MaskImageType * { const auto * maskImage = dynamic_cast(this->ProcessObject::GetInput(1)); diff --git a/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx b/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx index ba5ea5a6b1b..a553cfab263 100644 --- a/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx +++ b/Modules/Numerics/Eigen/include/itkEigenAnalysis2DImageFilter.hxx @@ -74,8 +74,9 @@ EigenAnalysis2DImageFilter::Se * Get the largest eigenvalue considering the sign */ template -typename EigenAnalysis2DImageFilter::EigenValueImageType * +auto EigenAnalysis2DImageFilter::GetMaxEigenValue() + -> EigenValueImageType * { return dynamic_cast(this->ProcessObject::GetOutput(0)); } @@ -84,8 +85,9 @@ EigenAnalysis2DImageFilter::Ge * Get the smallest eigenvalue considering the sign */ template -typename EigenAnalysis2DImageFilter::EigenValueImageType * +auto EigenAnalysis2DImageFilter::GetMinEigenValue() + -> EigenValueImageType * { return dynamic_cast(this->ProcessObject::GetOutput(1)); } @@ -94,8 +96,9 @@ EigenAnalysis2DImageFilter::Ge * Get the eigenvector corresponding to the largest eigenvalue (considering the sign) */ template -typename EigenAnalysis2DImageFilter::EigenVectorImageType * +auto EigenAnalysis2DImageFilter::GetMaxEigenVector() + -> EigenVectorImageType * { auto * eigenVector = dynamic_cast(this->ProcessObject::GetOutput(2)); diff --git a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx index 651950343d1..3d29c3929de 100644 --- a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx +++ b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx @@ -141,8 +141,8 @@ ImageMetricLoad::ImageMetricLoad() } template -typename ImageMetricLoad::Float -ImageMetricLoad::EvaluateMetricGivenSolution(Element::ArrayType * element, Float step) +auto +ImageMetricLoad::EvaluateMetricGivenSolution(Element::ArrayType * element, Float step) -> Float { Float energy = 0.0, defe = 0.0; @@ -209,8 +209,8 @@ ImageMetricLoad::EvaluateMetricGivenSolution(Element::ArrayType } template -typename ImageMetricLoad::Float -ImageMetricLoad::EvaluateMetricGivenSolution1(Element::ArrayType * element, Float step) +auto +ImageMetricLoad::EvaluateMetricGivenSolution1(Element::ArrayType * element, Float step) -> Float { Float energy = 0.0, defe = 0.0; @@ -276,8 +276,8 @@ ImageMetricLoad::EvaluateMetricGivenSolution1(Element::ArrayTyp } template -typename ImageMetricLoad::VectorType -ImageMetricLoad::Fe(VectorType Gpos, VectorType Gsol) +auto +ImageMetricLoad::Fe(VectorType Gpos, VectorType Gsol) -> VectorType { // We assume the vector input is of size 2*ImageDimension. // The 0 to ImageDimension-1 elements contain the position, p, @@ -392,8 +392,8 @@ ImageMetricLoad::Fe(VectorType Gpos, VectorType Gsol) } template -typename ImageMetricLoad::Float -ImageMetricLoad::GetMetric(VectorType InVec) +auto +ImageMetricLoad::GetMetric(VectorType InVec) -> Float { // We assume the vector input is of size 2*ImageDimension. // The 0 to ImageDimension-1 elements contain the position, p, @@ -491,8 +491,8 @@ ImageMetricLoad::GetMetric(VectorType InVec) } template -typename ImageMetricLoad::VectorType -ImageMetricLoad::MetricFiniteDiff(VectorType Gpos, VectorType Gsol) +auto +ImageMetricLoad::MetricFiniteDiff(VectorType Gpos, VectorType Gsol) -> VectorType { typename MetricBaseType::MeasureType measure; @@ -590,8 +590,8 @@ ImageMetricLoad::MetricFiniteDiff(VectorType Gpos, VectorType G } template -typename ImageMetricLoad::VectorType -ImageMetricLoad::GetPolynomialFitToMetric(VectorType Gpos, VectorType Gsol) +auto +ImageMetricLoad::GetPolynomialFitToMetric(VectorType Gpos, VectorType Gsol) -> VectorType { // discrete orthogonal polynomial fitting // see p.394-403 haralick computer and robot vision diff --git a/Modules/Numerics/FEM/include/itkFEMSolver.hxx b/Modules/Numerics/FEM/include/itkFEMSolver.hxx index 9f2506fd337..6dc8a965a57 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolver.hxx +++ b/Modules/Numerics/FEM/include/itkFEMSolver.hxx @@ -83,8 +83,8 @@ Solver::SetInput(unsigned int index, FEMObjectType * fem) } template -typename Solver::FEMObjectType * -Solver::GetInput() +auto +Solver::GetInput() -> FEMObjectType * { if (this->GetNumberOfInputs() < 1) { @@ -95,15 +95,15 @@ Solver::GetInput() } template -typename Solver::FEMObjectType * -Solver::GetInput(unsigned int idx) +auto +Solver::GetInput(unsigned int idx) -> FEMObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } template -typename Solver::Float -Solver::GetTimeStep() const +auto +Solver::GetTimeStep() const -> Float { return NumericTraits::ZeroValue(); } @@ -114,22 +114,22 @@ Solver::SetTimeStep(Float itkNotUsed(dt)) {} template -typename Solver::Float -Solver::GetSolution(unsigned int i, unsigned int which) +auto +Solver::GetSolution(unsigned int i, unsigned int which) -> Float { return this->m_LinearSystem->GetSolutionValue(i, which); } template -typename Solver::DataObjectPointer -Solver::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) +auto +Solver::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) -> DataObjectPointer { return FEMObjectType::New().GetPointer(); } template -typename Solver::FEMObjectType * -Solver::GetOutput() +auto +Solver::GetOutput() -> FEMObjectType * { if (this->GetNumberOfOutputs() < 1) { @@ -140,8 +140,8 @@ Solver::GetOutput() } template -typename Solver::FEMObjectType * -Solver::GetOutput(unsigned int idx) +auto +Solver::GetOutput(unsigned int idx) -> FEMObjectType * { auto * out = dynamic_cast(this->ProcessObject::GetOutput(idx)); @@ -586,8 +586,8 @@ Solver::UpdateDisplacements() } template -typename Solver::Float -Solver::GetDeformationEnergy(unsigned int SolutionIndex) +auto +Solver::GetDeformationEnergy(unsigned int SolutionIndex) -> Float { Float U = 0.0f; Element::MatrixType LocalSolution; diff --git a/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx b/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx index e311f737fad..3ff99ba1e10 100644 --- a/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx +++ b/Modules/Numerics/FEM/include/itkImageToRectilinearFEMObjectFilter.hxx @@ -65,8 +65,8 @@ ImageToRectilinearFEMObjectFilter::SetInput(unsigned int index, Inp * */ template -typename ImageToRectilinearFEMObjectFilter::InputImageType * -ImageToRectilinearFEMObjectFilter::GetInput() +auto +ImageToRectilinearFEMObjectFilter::GetInput() -> InputImageType * { if (this->GetNumberOfInputs() < 1) { @@ -80,8 +80,8 @@ ImageToRectilinearFEMObjectFilter::GetInput() * */ template -typename ImageToRectilinearFEMObjectFilter::InputImageType * -ImageToRectilinearFEMObjectFilter::GetInput(unsigned int idx) +auto +ImageToRectilinearFEMObjectFilter::GetInput(unsigned int idx) -> InputImageType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetInput(idx)); } @@ -90,8 +90,9 @@ ImageToRectilinearFEMObjectFilter::GetInput(unsigned int idx) * */ template -typename ImageToRectilinearFEMObjectFilter::DataObjectPointer +auto ImageToRectilinearFEMObjectFilter::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) + -> DataObjectPointer { return FEMObjectType::New().GetPointer(); } @@ -100,8 +101,8 @@ ImageToRectilinearFEMObjectFilter::MakeOutput(DataObjectPointerArra * */ template -typename ImageToRectilinearFEMObjectFilter::FEMObjectType * -ImageToRectilinearFEMObjectFilter::GetOutput() +auto +ImageToRectilinearFEMObjectFilter::GetOutput() -> FEMObjectType * { if (this->GetNumberOfOutputs() < 1) { @@ -115,8 +116,8 @@ ImageToRectilinearFEMObjectFilter::GetOutput() * */ template -typename ImageToRectilinearFEMObjectFilter::FEMObjectType * -ImageToRectilinearFEMObjectFilter::GetOutput(unsigned int idx) +auto +ImageToRectilinearFEMObjectFilter::GetOutput(unsigned int idx) -> FEMObjectType * { auto * out = dynamic_cast(this->ProcessObject::GetOutput(idx)); diff --git a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx index b817dc4e0f4..378835eb323 100644 --- a/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx +++ b/Modules/Numerics/FEM/include/itkMetaFEMObjectConverter.hxx @@ -35,16 +35,16 @@ template MetaFEMObjectConverter::MetaFEMObjectConverter() = default; template -typename MetaFEMObjectConverter::MetaObjectType * -MetaFEMObjectConverter::CreateMetaObject() +auto +MetaFEMObjectConverter::CreateMetaObject() -> MetaObjectType * { return dynamic_cast(new FEMObjectMetaObjectType); } /** Convert a metaFEMObject into an FEMObject SpatialObject */ template -typename MetaFEMObjectConverter::SpatialObjectPointer -MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) +auto +MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectType * mo) -> SpatialObjectPointer { const auto * FEMmo = dynamic_cast(mo); if (FEMmo == nullptr) @@ -315,8 +315,8 @@ MetaFEMObjectConverter::MetaObjectToSpatialObject(const MetaObjectT /** Convert an FEMObject SpatialObject into a metaFEMObject */ template -typename MetaFEMObjectConverter::MetaObjectType * -MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) +auto +MetaFEMObjectConverter::SpatialObjectToMetaObject(const SpatialObjectType * so) -> MetaObjectType * { FEMObjectSpatialObjectConstPointer FEMSO = dynamic_cast(so); if (FEMSO.IsNull()) diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx index f297fdd410d..28f310c95ae 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBandImageFilterBase.hxx @@ -242,8 +242,9 @@ NarrowBandImageFilterBase::ThreadedApplyUpdate(const } template -typename NarrowBandImageFilterBase::TimeStepType +auto NarrowBandImageFilterBase::ThreadedCalculateChange(const ThreadRegionType & regionToProcess) + -> TimeStepType { using OutputSizeType = typename OutputImageType::SizeType; diff --git a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx index ef9d0f2ec0c..4e9b697b71a 100644 --- a/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkGradientDescentOptimizerBasev4.hxx @@ -89,8 +89,9 @@ GradientDescentOptimizerBasev4Template::PrintSelf //------------------------------------------------------------------- template -const typename GradientDescentOptimizerBasev4Template::StopConditionReturnStringType +auto GradientDescentOptimizerBasev4Template::GetStopConditionDescription() const + -> const StopConditionReturnStringType { return this->m_StopConditionDescription.str(); } diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx index 08b5958d08b..59e8dc6620e 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGSOptimizerBasev4.hxx @@ -187,8 +187,8 @@ LBFGSOptimizerBasev4::StartOptimization(bool /* doOnl } template -typename LBFGSOptimizerBasev4::InternalOptimizerType * -LBFGSOptimizerBasev4::GetOptimizer() +auto +LBFGSOptimizerBasev4::GetOptimizer() -> InternalOptimizerType * { return m_VnlOptimizer.get(); } diff --git a/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx index eb0b04ce424..8a456ab9296 100644 --- a/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkMultiGradientOptimizerv4.hxx @@ -48,8 +48,8 @@ MultiGradientOptimizerv4Template::PrintSelf(std:: //------------------------------------------------------------------- template -typename MultiGradientOptimizerv4Template::OptimizersListType & -MultiGradientOptimizerv4Template::GetOptimizersList() +auto +MultiGradientOptimizerv4Template::GetOptimizersList() -> OptimizersListType & { return this->m_OptimizersList; } @@ -69,16 +69,18 @@ MultiGradientOptimizerv4Template::SetOptimizersLi /** Get the list of metric values that we produced after the multi-gradient optimization. */ template -const typename MultiGradientOptimizerv4Template::MetricValuesListType & +auto MultiGradientOptimizerv4Template::GetMetricValuesList() const + -> const MetricValuesListType & { return this->m_MetricValuesList; } //------------------------------------------------------------------- template -const typename MultiGradientOptimizerv4Template::StopConditionReturnStringType +auto MultiGradientOptimizerv4Template::GetStopConditionDescription() const + -> const StopConditionReturnStringType { return this->m_StopConditionDescription.str(); } diff --git a/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx index 4f2da35bccf..968bd79c625 100644 --- a/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkMultiStartOptimizerv4.hxx @@ -50,8 +50,8 @@ MultiStartOptimizerv4Template::PrintSelf(std::ost //------------------------------------------------------------------- template -typename MultiStartOptimizerv4Template::ParametersListType & -MultiStartOptimizerv4Template::GetParametersList() +auto +MultiStartOptimizerv4Template::GetParametersList() -> ParametersListType & { return this->m_ParametersList; } @@ -71,16 +71,17 @@ MultiStartOptimizerv4Template::SetParametersList( /** Get the list of metric values that we produced after the multi-start search. */ template -const typename MultiStartOptimizerv4Template::MetricValuesListType & +auto MultiStartOptimizerv4Template::GetMetricValuesList() const + -> const MetricValuesListType & { return this->m_MetricValuesList; } //------------------------------------------------------------------- template -typename MultiStartOptimizerv4Template::ParametersType -MultiStartOptimizerv4Template::GetBestParameters() +auto +MultiStartOptimizerv4Template::GetBestParameters() -> ParametersType { return this->m_ParametersList[m_BestParametersIndex]; } @@ -99,8 +100,9 @@ MultiStartOptimizerv4Template::InstantiateLocalOp //------------------------------------------------------------------- template -const typename MultiStartOptimizerv4Template::StopConditionReturnStringType +auto MultiStartOptimizerv4Template::GetStopConditionDescription() const + -> const StopConditionReturnStringType { return this->m_StopConditionDescription.str(); } diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx index 65b7e85e62a..3200c4f099d 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetric.hxx @@ -434,8 +434,9 @@ template -typename ObjectToObjectMetric::VirtualOriginType +auto ObjectToObjectMetric::GetVirtualOrigin() const + -> VirtualOriginType { if (this->m_VirtualImage) { diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.hxx b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.hxx index f9d991fefea..cba61915ca4 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.hxx @@ -52,8 +52,8 @@ ObjectToObjectMetricBaseTemplate::GetGradientSour //------------------------------------------------------------------- template -typename ObjectToObjectMetricBaseTemplate::MeasureType -ObjectToObjectMetricBaseTemplate::GetCurrentValue() const +auto +ObjectToObjectMetricBaseTemplate::GetCurrentValue() const -> MeasureType { return m_Value; } diff --git a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx index 0f4686f394d..fb69b15f064 100644 --- a/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkOnePlusOneEvolutionaryOptimizerv4.hxx @@ -282,8 +282,8 @@ OnePlusOneEvolutionaryOptimizerv4::GetStopConditi } template -const typename OnePlusOneEvolutionaryOptimizerv4::MeasureType & -OnePlusOneEvolutionaryOptimizerv4::GetValue() const +auto +OnePlusOneEvolutionaryOptimizerv4::GetValue() const -> const MeasureType & { return this->GetCurrentCost(); } diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx index 42d7614d9bd..5f3dcb86303 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.hxx @@ -47,8 +47,8 @@ RegistrationParameterScalesEstimator::RegistrationParameterScalesEstima /** Estimate the trusted scale for steps. It returns the voxel spacing. */ template -typename RegistrationParameterScalesEstimator::FloatType -RegistrationParameterScalesEstimator::EstimateMaximumStepSize() +auto +RegistrationParameterScalesEstimator::EstimateMaximumStepSize() -> FloatType { this->CheckAndSetInputs(); @@ -479,8 +479,8 @@ RegistrationParameterScalesEstimator::CheckGeneralAffineTransformTempla * Get the index of the virtual image center. */ template -typename RegistrationParameterScalesEstimator::VirtualIndexType -RegistrationParameterScalesEstimator::GetVirtualDomainCentralIndex() +auto +RegistrationParameterScalesEstimator::GetVirtualDomainCentralIndex() -> VirtualIndexType { VirtualRegionType region = this->m_Metric->GetVirtualRegion(); const SizeValueType dim = this->GetDimension(); @@ -501,8 +501,8 @@ RegistrationParameterScalesEstimator::GetVirtualDomainCentralIndex() * Get the region around the virtual image center. */ template -typename RegistrationParameterScalesEstimator::VirtualRegionType -RegistrationParameterScalesEstimator::GetVirtualDomainCentralRegion() +auto +RegistrationParameterScalesEstimator::GetVirtualDomainCentralRegion() -> VirtualRegionType { VirtualIndexType centralIndex = this->GetVirtualDomainCentralIndex(); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx index 11de294e8e5..67b42fa77f9 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromJacobian.hxx @@ -71,8 +71,8 @@ RegistrationParameterScalesFromJacobian::EstimateScales(ScalesType & pa * Compute the scale for a STEP, the impact of a STEP on the transform. */ template -typename RegistrationParameterScalesFromJacobian::FloatType -RegistrationParameterScalesFromJacobian::EstimateStepScale(const ParametersType & step) +auto +RegistrationParameterScalesFromJacobian::EstimateStepScale(const ParametersType & step) -> FloatType { this->CheckAndSetInputs(); this->SetStepScaleSamplingStrategy(); diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx index 8247966c6f0..ad77280064c 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesFromShiftBase.hxx @@ -123,8 +123,8 @@ RegistrationParameterScalesFromShiftBase::EstimateScales(ScalesType & p * w.r.t. the step is the shift produced by step. */ template -typename RegistrationParameterScalesFromShiftBase::FloatType -RegistrationParameterScalesFromShiftBase::EstimateStepScale(const ParametersType & step) +auto +RegistrationParameterScalesFromShiftBase::EstimateStepScale(const ParametersType & step) -> FloatType { this->CheckAndSetInputs(); this->SetStepScaleSamplingStrategy(); @@ -201,8 +201,9 @@ RegistrationParameterScalesFromShiftBase::EstimateLocalStepScales(const * Compute the maximum shift when a transform is changed with deltaParameters */ template -typename RegistrationParameterScalesFromShiftBase::FloatType +auto RegistrationParameterScalesFromShiftBase::ComputeMaximumVoxelShift(const ParametersType & deltaParameters) + -> FloatType { ScalesType sampleShifts; diff --git a/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx b/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx index 9d109a7e1fa..b46b3df020a 100644 --- a/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx +++ b/Modules/Numerics/Optimizersv4/include/itkWindowConvergenceMonitoringFunction.hxx @@ -62,8 +62,8 @@ WindowConvergenceMonitoringFunction::ClearEnergyValues() } template -typename WindowConvergenceMonitoringFunction::RealType -WindowConvergenceMonitoringFunction::GetConvergenceValue() const +auto +WindowConvergenceMonitoringFunction::GetConvergenceValue() const -> RealType { if (this->GetNumberOfEnergyValues() < this->m_WindowSize) { diff --git a/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx index d7c3fd02b02..39b629eb149 100644 --- a/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkCovarianceSampleFilter.hxx @@ -57,8 +57,8 @@ CovarianceSampleFilter::GetInput() const } template -typename CovarianceSampleFilter::DataObjectPointer -CovarianceSampleFilter::MakeOutput(DataObjectPointerArraySizeType index) +auto +CovarianceSampleFilter::MakeOutput(DataObjectPointerArraySizeType index) -> DataObjectPointer { MeasurementVectorSizeType measurementVectorSize = this->GetMeasurementVectorSize(); @@ -85,8 +85,8 @@ CovarianceSampleFilter::MakeOutput(DataObjectPointerArraySizeType index } template -typename CovarianceSampleFilter::MeasurementVectorSizeType -CovarianceSampleFilter::GetMeasurementVectorSize() const +auto +CovarianceSampleFilter::GetMeasurementVectorSize() const -> MeasurementVectorSizeType { const SampleType * input = this->GetInput(); @@ -198,29 +198,29 @@ CovarianceSampleFilter::GenerateData() } template -const typename CovarianceSampleFilter::MatrixDecoratedType * -CovarianceSampleFilter::GetCovarianceMatrixOutput() const +auto +CovarianceSampleFilter::GetCovarianceMatrixOutput() const -> const MatrixDecoratedType * { return static_cast(this->ProcessObject::GetOutput(0)); } template -const typename CovarianceSampleFilter::MatrixType -CovarianceSampleFilter::GetCovarianceMatrix() const +auto +CovarianceSampleFilter::GetCovarianceMatrix() const -> const MatrixType { return this->GetCovarianceMatrixOutput()->Get(); } template -const typename CovarianceSampleFilter::MeasurementVectorDecoratedType * -CovarianceSampleFilter::GetMeanOutput() const +auto +CovarianceSampleFilter::GetMeanOutput() const -> const MeasurementVectorDecoratedType * { return static_cast(this->ProcessObject::GetOutput(1)); } template -const typename CovarianceSampleFilter::MeasurementVectorRealType -CovarianceSampleFilter::GetMean() const +auto +CovarianceSampleFilter::GetMean() const -> const MeasurementVectorRealType { return this->GetMeanOutput()->Get(); } diff --git a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx index 8fac6040cd4..7197147844f 100644 --- a/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkDistanceToCentroidMembershipFunction.hxx @@ -53,8 +53,8 @@ DistanceToCentroidMembershipFunction::SetMeasurementVectorSize(Measurem } template -const typename DistanceToCentroidMembershipFunction::CentroidType & -DistanceToCentroidMembershipFunction::GetCentroid() const +auto +DistanceToCentroidMembershipFunction::GetCentroid() const -> const CentroidType & { return m_DistanceMetric->GetOrigin(); } diff --git a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx index ed6a92c32aa..c190a38c4b2 100644 --- a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx +++ b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx @@ -74,15 +74,15 @@ ExpectationMaximizationMixtureModelEstimator::SetInitialProportions(Pro } template -const typename ExpectationMaximizationMixtureModelEstimator::ProportionVectorType & -ExpectationMaximizationMixtureModelEstimator::GetInitialProportions() const +auto +ExpectationMaximizationMixtureModelEstimator::GetInitialProportions() const -> const ProportionVectorType & { return m_InitialProportions; } template -const typename ExpectationMaximizationMixtureModelEstimator::ProportionVectorType & -ExpectationMaximizationMixtureModelEstimator::GetProportions() const +auto +ExpectationMaximizationMixtureModelEstimator::GetProportions() const -> const ProportionVectorType & { return m_Proportions; } @@ -117,15 +117,16 @@ ExpectationMaximizationMixtureModelEstimator::GetNumberOfComponents() c } template -typename ExpectationMaximizationMixtureModelEstimator::TERMINATION_CODE_ENUM -ExpectationMaximizationMixtureModelEstimator::GetTerminationCode() const +auto +ExpectationMaximizationMixtureModelEstimator::GetTerminationCode() const -> TERMINATION_CODE_ENUM { return m_TerminationCode; } template -typename ExpectationMaximizationMixtureModelEstimator::ComponentMembershipFunctionType * +auto ExpectationMaximizationMixtureModelEstimator::GetComponentMembershipFunction(int componentIndex) const + -> ComponentMembershipFunctionType * { return (m_ComponentVector[componentIndex])->GetMembershipFunction(); } @@ -342,8 +343,8 @@ ExpectationMaximizationMixtureModelEstimator::GenerateData() } template -const typename ExpectationMaximizationMixtureModelEstimator::MembershipFunctionVectorObjectType * -ExpectationMaximizationMixtureModelEstimator::GetOutput() const +auto +ExpectationMaximizationMixtureModelEstimator::GetOutput() const -> const MembershipFunctionVectorObjectType * { size_t numberOfComponents = m_ComponentVector.size(); MembershipFunctionVectorType & membershipFunctionsVector = m_MembershipFunctionsObject->Get(); @@ -388,8 +389,9 @@ ExpectationMaximizationMixtureModelEstimator::GetOutput() const } template -const typename ExpectationMaximizationMixtureModelEstimator::MembershipFunctionsWeightsArrayObjectType * +auto ExpectationMaximizationMixtureModelEstimator::GetMembershipFunctionsWeightsArray() const + -> const MembershipFunctionsWeightsArrayObjectType * { size_t numberOfComponents = m_ComponentVector.size(); ProportionVectorType & membershipFunctionsWeightVector = m_MembershipFunctionsWeightArrayObject->Get(); diff --git a/Modules/Numerics/Statistics/include/itkHistogram.hxx b/Modules/Numerics/Statistics/include/itkHistogram.hxx index 11ae6b71a64..c06013f01d9 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogram.hxx @@ -40,8 +40,8 @@ Histogram::Histogram() } template -typename Histogram::InstanceIdentifier -Histogram::Size() const +auto +Histogram::Size() const -> InstanceIdentifier { if (this->GetMeasurementVectorSize() == 0) { @@ -56,29 +56,31 @@ Histogram::Size() const } template -const typename Histogram::SizeType & -Histogram::GetSize() const +auto +Histogram::GetSize() const -> const SizeType & { return m_Size; } template -typename Histogram::SizeValueType -Histogram::GetSize(unsigned int dimension) const +auto +Histogram::GetSize(unsigned int dimension) const -> SizeValueType { return m_Size[dimension]; } template -const typename Histogram::MeasurementType & +auto Histogram::GetBinMin(unsigned int dimension, InstanceIdentifier nbin) const + -> const MeasurementType & { return m_Min[dimension][nbin]; } template -const typename Histogram::MeasurementType & +auto Histogram::GetBinMax(unsigned int dimension, InstanceIdentifier nbin) const + -> const MeasurementType & { return m_Max[dimension][nbin]; } @@ -102,36 +104,36 @@ Histogram::SetBinMax(unsigned int dimen } template -const typename Histogram::BinMinVectorType & -Histogram::GetDimensionMins(unsigned int dimension) const +auto +Histogram::GetDimensionMins(unsigned int dimension) const -> const BinMinVectorType & { return m_Min[dimension]; } template -const typename Histogram::BinMaxVectorType & -Histogram::GetDimensionMaxs(unsigned int dimension) const +auto +Histogram::GetDimensionMaxs(unsigned int dimension) const -> const BinMaxVectorType & { return m_Max[dimension]; } template -const typename Histogram::BinMinContainerType & -Histogram::GetMins() const +auto +Histogram::GetMins() const -> const BinMinContainerType & { return m_Min; } template -const typename Histogram::BinMaxContainerType & -Histogram::GetMaxs() const +auto +Histogram::GetMaxs() const -> const BinMaxContainerType & { return m_Max; } template -typename Histogram::AbsoluteFrequencyType -Histogram::GetFrequency(InstanceIdentifier id) const +auto +Histogram::GetFrequency(InstanceIdentifier id) const -> AbsoluteFrequencyType { return m_FrequencyContainer->GetFrequency(id); } @@ -439,8 +441,9 @@ Histogram::GetBinMaxFromValue(const unsigned } template -const typename Histogram::MeasurementVectorType & +auto Histogram::GetHistogramMinFromIndex(const IndexType & index) const + -> const MeasurementVectorType & { const unsigned int measurementVectorSize = this->GetMeasurementVectorSize(); for (unsigned int i = 0; i < measurementVectorSize; ++i) @@ -451,8 +454,9 @@ Histogram::GetHistogramMinFromIndex(const Ind } template -const typename Histogram::MeasurementVectorType & +auto Histogram::GetHistogramMaxFromIndex(const IndexType & index) const + -> const MeasurementVectorType & { const unsigned int measurementVectorSize = this->GetMeasurementVectorSize(); for (unsigned int i = 0; i < measurementVectorSize; ++i) @@ -543,15 +547,17 @@ Histogram::GetFrequency(const IndexType & ind } template -typename Histogram::MeasurementType +auto Histogram::GetMeasurement(InstanceIdentifier n, unsigned int dimension) const + -> MeasurementType { return static_cast((m_Min[dimension][n] + m_Max[dimension][n]) / 2); } template -typename Histogram::AbsoluteFrequencyType +auto Histogram::GetFrequency(InstanceIdentifier n, unsigned int dimension) const + -> AbsoluteFrequencyType { InstanceIdentifier nextOffset = this->m_OffsetTable[dimension + 1]; InstanceIdentifier current = this->m_OffsetTable[dimension] * n; diff --git a/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx b/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx index 2c867b7f7b6..e118247b57a 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogramToImageFilter.hxx @@ -42,8 +42,8 @@ HistogramToImageFilter::SetInput(const HistogramT } template -const typename HistogramToImageFilter::HistogramType * -HistogramToImageFilter::GetInput() +auto +HistogramToImageFilter::GetInput() -> const HistogramType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } diff --git a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx index ed7873e0816..3c57699cc69 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.hxx @@ -51,8 +51,8 @@ HistogramToRunLengthFeaturesFilter::SetInput(const HistogramType * h } template -const typename HistogramToRunLengthFeaturesFilter::HistogramType * -HistogramToRunLengthFeaturesFilter::GetInput() const +auto +HistogramToRunLengthFeaturesFilter::GetInput() const -> const HistogramType * { if (this->GetNumberOfInputs() < 1) { @@ -62,8 +62,9 @@ HistogramToRunLengthFeaturesFilter::GetInput() const } template -typename HistogramToRunLengthFeaturesFilter::DataObjectPointer +auto HistogramToRunLengthFeaturesFilter::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) + -> DataObjectPointer { return MeasurementObjectType::New().GetPointer(); } @@ -175,143 +176,149 @@ HistogramToRunLengthFeaturesFilter::GenerateData() } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * -HistogramToRunLengthFeaturesFilter::GetShortRunEmphasisOutput() const +auto +HistogramToRunLengthFeaturesFilter::GetShortRunEmphasisOutput() const -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(0)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * -HistogramToRunLengthFeaturesFilter::GetLongRunEmphasisOutput() const +auto +HistogramToRunLengthFeaturesFilter::GetLongRunEmphasisOutput() const -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(1)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * -HistogramToRunLengthFeaturesFilter::GetGreyLevelNonuniformityOutput() const +auto +HistogramToRunLengthFeaturesFilter::GetGreyLevelNonuniformityOutput() const -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(2)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * -HistogramToRunLengthFeaturesFilter::GetRunLengthNonuniformityOutput() const +auto +HistogramToRunLengthFeaturesFilter::GetRunLengthNonuniformityOutput() const -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(3)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * +auto HistogramToRunLengthFeaturesFilter::GetLowGreyLevelRunEmphasisOutput() const + -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(4)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * +auto HistogramToRunLengthFeaturesFilter::GetHighGreyLevelRunEmphasisOutput() const + -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(5)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * +auto HistogramToRunLengthFeaturesFilter::GetShortRunLowGreyLevelEmphasisOutput() const + -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(6)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * +auto HistogramToRunLengthFeaturesFilter::GetShortRunHighGreyLevelEmphasisOutput() const + -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(7)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * +auto HistogramToRunLengthFeaturesFilter::GetLongRunLowGreyLevelEmphasisOutput() const + -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(8)); } template -const typename HistogramToRunLengthFeaturesFilter::MeasurementObjectType * +auto HistogramToRunLengthFeaturesFilter::GetLongRunHighGreyLevelEmphasisOutput() const + -> const MeasurementObjectType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(9)); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetShortRunEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetShortRunEmphasis() const -> MeasurementType { return this->GetShortRunEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetLongRunEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetLongRunEmphasis() const -> MeasurementType { return this->GetLongRunEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetGreyLevelNonuniformity() const +auto +HistogramToRunLengthFeaturesFilter::GetGreyLevelNonuniformity() const -> MeasurementType { return this->GetGreyLevelNonuniformityOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetRunLengthNonuniformity() const +auto +HistogramToRunLengthFeaturesFilter::GetRunLengthNonuniformity() const -> MeasurementType { return this->GetRunLengthNonuniformityOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetLowGreyLevelRunEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetLowGreyLevelRunEmphasis() const -> MeasurementType { return this->GetLowGreyLevelRunEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetHighGreyLevelRunEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetHighGreyLevelRunEmphasis() const -> MeasurementType { return this->GetHighGreyLevelRunEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetShortRunLowGreyLevelEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetShortRunLowGreyLevelEmphasis() const -> MeasurementType { return this->GetShortRunLowGreyLevelEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetShortRunHighGreyLevelEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetShortRunHighGreyLevelEmphasis() const -> MeasurementType { return this->GetShortRunHighGreyLevelEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetLongRunLowGreyLevelEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetLongRunLowGreyLevelEmphasis() const -> MeasurementType { return this->GetLongRunLowGreyLevelEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetLongRunHighGreyLevelEmphasis() const +auto +HistogramToRunLengthFeaturesFilter::GetLongRunHighGreyLevelEmphasis() const -> MeasurementType { return this->GetLongRunHighGreyLevelEmphasisOutput()->Get(); } template -typename HistogramToRunLengthFeaturesFilter::MeasurementType -HistogramToRunLengthFeaturesFilter::GetFeature(RunLengthFeatureEnum feature) +auto +HistogramToRunLengthFeaturesFilter::GetFeature(RunLengthFeatureEnum feature) -> MeasurementType { switch (feature) { diff --git a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx index 4007637ff64..b70088e6548 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.hxx @@ -50,15 +50,16 @@ HistogramToTextureFeaturesFilter::SetInput(const HistogramType * his } template -const typename HistogramToTextureFeaturesFilter::HistogramType * -HistogramToTextureFeaturesFilter::GetInput() const +auto +HistogramToTextureFeaturesFilter::GetInput() const -> const HistogramType * { return itkDynamicCastInDebugMode(this->GetPrimaryInput()); } template -typename HistogramToTextureFeaturesFilter::DataObjectPointer +auto HistogramToTextureFeaturesFilter::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) + -> DataObjectPointer { return MeasurementObjectType::New().GetPointer(); } @@ -247,120 +248,120 @@ HistogramToTextureFeaturesFilter::ComputeMeansAndVariances(double & } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetEnergyOutput() const +auto +HistogramToTextureFeaturesFilter::GetEnergyOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(0)); } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetEntropyOutput() const +auto +HistogramToTextureFeaturesFilter::GetEntropyOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(1)); } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetCorrelationOutput() const +auto +HistogramToTextureFeaturesFilter::GetCorrelationOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(2)); } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetInverseDifferenceMomentOutput() const +auto +HistogramToTextureFeaturesFilter::GetInverseDifferenceMomentOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(3)); } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetInertiaOutput() const +auto +HistogramToTextureFeaturesFilter::GetInertiaOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(4)); } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetClusterShadeOutput() const +auto +HistogramToTextureFeaturesFilter::GetClusterShadeOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(5)); } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetClusterProminenceOutput() const +auto +HistogramToTextureFeaturesFilter::GetClusterProminenceOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(6)); } template -const typename HistogramToTextureFeaturesFilter::MeasurementObjectType * -HistogramToTextureFeaturesFilter::GetHaralickCorrelationOutput() const +auto +HistogramToTextureFeaturesFilter::GetHaralickCorrelationOutput() const -> const MeasurementObjectType * { return static_cast(this->ProcessObject::GetOutput(7)); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetEnergy() const +auto +HistogramToTextureFeaturesFilter::GetEnergy() const -> MeasurementType { return this->GetEnergyOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetEntropy() const +auto +HistogramToTextureFeaturesFilter::GetEntropy() const -> MeasurementType { return this->GetEntropyOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetCorrelation() const +auto +HistogramToTextureFeaturesFilter::GetCorrelation() const -> MeasurementType { return this->GetCorrelationOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetInverseDifferenceMoment() const +auto +HistogramToTextureFeaturesFilter::GetInverseDifferenceMoment() const -> MeasurementType { return this->GetInverseDifferenceMomentOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetInertia() const +auto +HistogramToTextureFeaturesFilter::GetInertia() const -> MeasurementType { return this->GetInertiaOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetClusterShade() const +auto +HistogramToTextureFeaturesFilter::GetClusterShade() const -> MeasurementType { return this->GetClusterShadeOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetClusterProminence() const +auto +HistogramToTextureFeaturesFilter::GetClusterProminence() const -> MeasurementType { return this->GetClusterProminenceOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetHaralickCorrelation() const +auto +HistogramToTextureFeaturesFilter::GetHaralickCorrelation() const -> MeasurementType { return this->GetHaralickCorrelationOutput()->Get(); } template -typename HistogramToTextureFeaturesFilter::MeasurementType -HistogramToTextureFeaturesFilter::GetFeature(TextureFeatureEnum feature) +auto +HistogramToTextureFeaturesFilter::GetFeature(TextureFeatureEnum feature) -> MeasurementType { switch (feature) { diff --git a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx index da89da972a8..21f95fd9fdd 100644 --- a/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToHistogramFilter.hxx @@ -55,8 +55,8 @@ ImageToHistogramFilter::MakeOutput(DataObjectPointerArraySizeType itkNot } template -const typename ImageToHistogramFilter::HistogramType * -ImageToHistogramFilter::GetOutput() const +auto +ImageToHistogramFilter::GetOutput() const -> const HistogramType * { auto * output = itkDynamicCastInDebugMode(this->ProcessObject::GetPrimaryOutput()); @@ -64,8 +64,8 @@ ImageToHistogramFilter::GetOutput() const } template -typename ImageToHistogramFilter::HistogramType * -ImageToHistogramFilter::GetOutput() +auto +ImageToHistogramFilter::GetOutput() -> HistogramType * { auto * output = itkDynamicCastInDebugMode(this->ProcessObject::GetPrimaryOutput()); diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx index 3723dc2d362..c52914298dd 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx @@ -31,8 +31,8 @@ ImageToListSampleAdaptor::ImageToListSampleAdaptor() } template -const typename ImageToListSampleAdaptor::MeasurementVectorType & -ImageToListSampleAdaptor::GetMeasurementVector(InstanceIdentifier id) const +auto +ImageToListSampleAdaptor::GetMeasurementVector(InstanceIdentifier id) const -> const MeasurementVectorType & { if (m_Image.IsNull()) { @@ -45,8 +45,8 @@ ImageToListSampleAdaptor::GetMeasurementVector(InstanceIdentifier id) co /** returns the number of measurement vectors in this container*/ template -typename ImageToListSampleAdaptor::InstanceIdentifier -ImageToListSampleAdaptor::Size() const +auto +ImageToListSampleAdaptor::Size() const -> InstanceIdentifier { if (m_Image.IsNull()) { @@ -115,8 +115,8 @@ ImageToListSampleAdaptor::GetImage() const } template -typename ImageToListSampleAdaptor::TotalAbsoluteFrequencyType -ImageToListSampleAdaptor::GetTotalFrequency() const +auto +ImageToListSampleAdaptor::GetTotalFrequency() const -> TotalAbsoluteFrequencyType { if (m_Image.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx index d40b024db49..e547254a471 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleFilter.hxx @@ -75,8 +75,9 @@ ImageToListSampleFilter::GetMaskImage() const } template -typename ImageToListSampleFilter::DataObjectPointer +auto ImageToListSampleFilter::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) + -> DataObjectPointer { return ListSampleType::New().GetPointer(); } @@ -184,8 +185,8 @@ ImageToListSampleFilter::GenerateInputRequestedRegion() } template -const typename ImageToListSampleFilter::ListSampleType * -ImageToListSampleFilter::GetOutput() const +auto +ImageToListSampleFilter::GetOutput() const -> const ListSampleType * { const auto * output = static_cast(this->ProcessObject::GetOutput(0)); diff --git a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx index b0e9b30b19c..99276f3f52d 100644 --- a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx @@ -44,8 +44,9 @@ ImageToNeighborhoodSampleAdaptor::ImageToNeighborhoo } template -const typename ImageToNeighborhoodSampleAdaptor::MeasurementVectorType & +auto ImageToNeighborhoodSampleAdaptor::GetMeasurementVector(InstanceIdentifier id) const + -> const MeasurementVectorType & { if (m_Image.IsNull()) { @@ -74,8 +75,8 @@ ImageToNeighborhoodSampleAdaptor::GetMeasurementVect /** returns the number of measurement vectors in this container*/ template -typename ImageToNeighborhoodSampleAdaptor::InstanceIdentifier -ImageToNeighborhoodSampleAdaptor::Size() const +auto +ImageToNeighborhoodSampleAdaptor::Size() const -> InstanceIdentifier { if (m_Image.IsNull()) { @@ -173,8 +174,8 @@ ImageToNeighborhoodSampleAdaptor::SetRadius(const Ne } template -typename ImageToNeighborhoodSampleAdaptor::NeighborhoodRadiusType -ImageToNeighborhoodSampleAdaptor::GetRadius() const +auto +ImageToNeighborhoodSampleAdaptor::GetRadius() const -> NeighborhoodRadiusType { return m_Radius; } @@ -203,8 +204,8 @@ ImageToNeighborhoodSampleAdaptor::SetRegion(const Re } template -typename ImageToNeighborhoodSampleAdaptor::RegionType -ImageToNeighborhoodSampleAdaptor::GetRegion() const +auto +ImageToNeighborhoodSampleAdaptor::GetRegion() const -> RegionType { return m_Region; } @@ -224,8 +225,8 @@ ImageToNeighborhoodSampleAdaptor::SetUseImageRegion( } template -typename ImageToNeighborhoodSampleAdaptor::TotalAbsoluteFrequencyType -ImageToNeighborhoodSampleAdaptor::GetTotalFrequency() const +auto +ImageToNeighborhoodSampleAdaptor::GetTotalFrequency() const -> TotalAbsoluteFrequencyType { if (m_Image.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx index 77b1c7e697f..692bb902f93 100644 --- a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx @@ -34,8 +34,8 @@ JointDomainImageToListSampleAdaptor::JointDomainImageToListSampleAdaptor /** returns the number of measurement vectors in this container*/ template -typename JointDomainImageToListSampleAdaptor::InstanceIdentifier -JointDomainImageToListSampleAdaptor::Size() const +auto +JointDomainImageToListSampleAdaptor::Size() const -> InstanceIdentifier { if (m_Image.IsNull()) { @@ -97,8 +97,8 @@ JointDomainImageToListSampleAdaptor::GetImage() const } template -typename JointDomainImageToListSampleAdaptor::TotalAbsoluteFrequencyType -JointDomainImageToListSampleAdaptor::GetTotalFrequency() const +auto +JointDomainImageToListSampleAdaptor::GetTotalFrequency() const -> TotalAbsoluteFrequencyType { if (m_Image.IsNull()) { @@ -120,8 +120,9 @@ JointDomainImageToListSampleAdaptor::SetNormalizationFactors(Normalizati } template -const typename JointDomainImageToListSampleAdaptor::MeasurementVectorType & +auto JointDomainImageToListSampleAdaptor::GetMeasurementVector(InstanceIdentifier id) const + -> const MeasurementVectorType & { m_TempIndex = this->GetImage()->ComputeIndex(id); diff --git a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx index 41cfebaa70f..cc3f99973c1 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx +++ b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.hxx @@ -401,8 +401,8 @@ KdTreeBasedKmeansEstimator::GetKdTree() const } template -const typename KdTreeBasedKmeansEstimator::MembershipFunctionVectorObjectType * -KdTreeBasedKmeansEstimator::GetOutput() const +auto +KdTreeBasedKmeansEstimator::GetOutput() const -> const MembershipFunctionVectorObjectType * { // INSERT CHECKS if all the required inputs are set and optmization has been // run. diff --git a/Modules/Numerics/Statistics/include/itkListSample.hxx b/Modules/Numerics/Statistics/include/itkListSample.hxx index 917caa86270..7b255894c0e 100644 --- a/Modules/Numerics/Statistics/include/itkListSample.hxx +++ b/Modules/Numerics/Statistics/include/itkListSample.hxx @@ -52,15 +52,15 @@ ListSample::PushBack(const MeasurementVectorType & mv) } template -typename ListSample::InstanceIdentifier -ListSample::Size() const +auto +ListSample::Size() const -> InstanceIdentifier { return static_cast(this->m_InternalContainer.size()); } template -typename ListSample::TotalAbsoluteFrequencyType -ListSample::GetTotalFrequency() const +auto +ListSample::GetTotalFrequency() const -> TotalAbsoluteFrequencyType { // Since the entries are unique, the total // frequency is equal to the numbe of entries. @@ -68,8 +68,9 @@ ListSample::GetTotalFrequency() const } template -const typename ListSample::MeasurementVectorType & +auto ListSample::GetMeasurementVector(InstanceIdentifier instanceId) const + -> const MeasurementVectorType & { if (instanceId < m_InternalContainer.size()) { @@ -101,8 +102,8 @@ ListSample::SetMeasurementVector(InstanceIdentifier instance } template -typename ListSample::AbsoluteFrequencyType -ListSample::GetFrequency(InstanceIdentifier instanceId) const +auto +ListSample::GetFrequency(InstanceIdentifier instanceId) const -> AbsoluteFrequencyType { if (instanceId < m_InternalContainer.size()) { diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx index 48b981c35f0..1c987f753e6 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx @@ -47,8 +47,8 @@ MahalanobisDistanceMetric::SetMean(const MeanVectorType & mean) } template -const typename MahalanobisDistanceMetric::MeanVectorType & -MahalanobisDistanceMetric::GetMean() const +auto +MahalanobisDistanceMetric::GetMean() const -> const MeanVectorType & { return Superclass::GetOrigin(); } diff --git a/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx index 446b08b64f0..5296a9a8223 100644 --- a/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkMeanSampleFilter.hxx @@ -59,8 +59,8 @@ MeanSampleFilter::GetInput() const } template -typename MeanSampleFilter::DataObjectPointer -MeanSampleFilter::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) +auto +MeanSampleFilter::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) -> DataObjectPointer { MeasurementVectorRealType mean; (void)mean; // for complainty pants : valgrind @@ -72,23 +72,23 @@ MeanSampleFilter::MakeOutput(DataObjectPointerArraySizeType itkNotUsed( } template -const typename MeanSampleFilter::MeasurementVectorDecoratedType * -MeanSampleFilter::GetOutput() const +auto +MeanSampleFilter::GetOutput() const -> const MeasurementVectorDecoratedType * { return itkDynamicCastInDebugMode(this->ProcessObject::GetOutput(0)); } template -const typename MeanSampleFilter::MeasurementVectorRealType -MeanSampleFilter::GetMean() const +auto +MeanSampleFilter::GetMean() const -> const MeasurementVectorRealType { const MeasurementVectorDecoratedType * decorator = this->GetOutput(); return decorator->Get(); } template -typename MeanSampleFilter::MeasurementVectorSizeType -MeanSampleFilter::GetMeasurementVectorSize() const +auto +MeanSampleFilter::GetMeasurementVectorSize() const -> MeasurementVectorSizeType { const SampleType * input = this->GetInput(); diff --git a/Modules/Numerics/Statistics/include/itkMembershipSample.hxx b/Modules/Numerics/Statistics/include/itkMembershipSample.hxx index e0cf6476717..56def8c361e 100644 --- a/Modules/Numerics/Statistics/include/itkMembershipSample.hxx +++ b/Modules/Numerics/Statistics/include/itkMembershipSample.hxx @@ -81,15 +81,15 @@ MembershipSample::GetInternalClassLabel(const ClassLabelType classLabel } template -const typename MembershipSample::ClassLabelHolderType -MembershipSample::GetClassLabelHolder() const +auto +MembershipSample::GetClassLabelHolder() const -> const ClassLabelHolderType { return m_ClassLabelHolder; } template -const typename MembershipSample::ClassSampleType * -MembershipSample::GetClassSample(const ClassLabelType & classLabel) const +auto +MembershipSample::GetClassSample(const ClassLabelType & classLabel) const -> const ClassSampleType * { int classIndex = this->GetInternalClassLabel(classLabel); if (classIndex < 0) diff --git a/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx b/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx index 02c2f9628d3..6ce0303c238 100644 --- a/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx +++ b/Modules/Numerics/Statistics/include/itkMixtureModelComponentBase.hxx @@ -113,8 +113,8 @@ MixtureModelComponentBase::SetMembershipFunction(MembershipFunctionType } template -typename MixtureModelComponentBase::MembershipFunctionType * -MixtureModelComponentBase::GetMembershipFunction() +auto +MixtureModelComponentBase::GetMembershipFunction() -> MembershipFunctionType * { return m_MembershipFunction; } diff --git a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx index ca22713f6af..1066d3271ad 100644 --- a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx @@ -72,8 +72,8 @@ PointSetToListSampleAdaptor::GetPointSet() /** returns the number of measurement vectors in this container*/ template -typename PointSetToListSampleAdaptor::InstanceIdentifier -PointSetToListSampleAdaptor::Size() const +auto +PointSetToListSampleAdaptor::Size() const -> InstanceIdentifier { if (m_PointSet.IsNull()) { @@ -109,8 +109,8 @@ inline typename PointSetToListSampleAdaptor::AbsoluteFrequencyType } template -typename PointSetToListSampleAdaptor::TotalAbsoluteFrequencyType -PointSetToListSampleAdaptor::GetTotalFrequency() const +auto +PointSetToListSampleAdaptor::GetTotalFrequency() const -> TotalAbsoluteFrequencyType { if (m_PointSet.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx index a130cfd8777..a3c4bcfab7f 100644 --- a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx @@ -177,8 +177,8 @@ SampleClassifierFilter::GenerateData() } template -const typename SampleClassifierFilter::MembershipSampleType * -SampleClassifierFilter::GetOutput() const +auto +SampleClassifierFilter::GetOutput() const -> const MembershipSampleType * { return static_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx index ed6a7633897..151980df34d 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx @@ -47,8 +47,8 @@ SampleToHistogramFilter::SetInput(const SampleType * sample } template -const typename SampleToHistogramFilter::SampleType * -SampleToHistogramFilter::GetInput() const +auto +SampleToHistogramFilter::GetInput() const -> const SampleType * { const auto * input = static_cast(this->ProcessObject::GetInput(0)); @@ -56,8 +56,8 @@ SampleToHistogramFilter::GetInput() const } template -const typename SampleToHistogramFilter::HistogramType * -SampleToHistogramFilter::GetOutput() const +auto +SampleToHistogramFilter::GetOutput() const -> const HistogramType * { const auto * output = static_cast(this->ProcessObject::GetOutput(0)); diff --git a/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx index 125829f8e57..cd409705e52 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx @@ -42,8 +42,8 @@ SampleToSubsampleFilter::SetInput(const SampleType * sample) } template -const typename SampleToSubsampleFilter::SampleType * -SampleToSubsampleFilter::GetInput() const +auto +SampleToSubsampleFilter::GetInput() const -> const SampleType * { const auto * input = static_cast(this->ProcessObject::GetInput(0)); @@ -58,8 +58,8 @@ typename SampleToSubsampleFilter::DataObjectPointer SampleToSubsampleFi } template -const typename SampleToSubsampleFilter::OutputType * -SampleToSubsampleFilter::GetOutput() const +auto +SampleToSubsampleFilter::GetOutput() const -> const OutputType * { const auto * output = static_cast(this->ProcessObject::GetOutput(0)); diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx index 30d27c7ce38..da2685506e7 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx @@ -56,8 +56,8 @@ ScalarImageToCooccurrenceListSampleFilter::GetInput() const } template -const typename ScalarImageToCooccurrenceListSampleFilter::SampleType * -ScalarImageToCooccurrenceListSampleFilter::GetOutput() const +auto +ScalarImageToCooccurrenceListSampleFilter::GetOutput() const -> const SampleType * { const auto * output = static_cast(this->ProcessObject::GetOutput(0)); diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx index 69779cb6753..4c2acafa1fa 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceMatrixFilter.hxx @@ -100,8 +100,9 @@ ScalarImageToCooccurrenceMatrixFilter: } template -const typename ScalarImageToCooccurrenceMatrixFilter::HistogramType * +auto ScalarImageToCooccurrenceMatrixFilter::GetOutput() const + -> const HistogramType * { const auto * output = static_cast(this->ProcessObject::GetOutput(0)); diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.hxx index 6435371f6c2..873182c85e1 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToHistogramGenerator.hxx @@ -40,8 +40,8 @@ ScalarImageToHistogramGenerator::SetInput(const ImageType * image) } template -const typename ScalarImageToHistogramGenerator::HistogramType * -ScalarImageToHistogramGenerator::GetOutput() const +auto +ScalarImageToHistogramGenerator::GetOutput() const -> const HistogramType * { return m_HistogramGenerator->GetOutput(); } diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx index a68f0623428..11ab1e0a5ef 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToRunLengthMatrixFilter.hxx @@ -106,8 +106,8 @@ ScalarImageToRunLengthMatrixFilter::Ge } template -const typename ScalarImageToRunLengthMatrixFilter::HistogramType * -ScalarImageToRunLengthMatrixFilter::GetOutput() const +auto +ScalarImageToRunLengthMatrixFilter::GetOutput() const -> const HistogramType * { const auto * output = static_cast(this->ProcessObject::GetOutput(0)); return output; diff --git a/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx index 05233b003ac..0e4c76866ad 100644 --- a/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkStandardDeviationPerComponentSampleFilter.hxx @@ -58,8 +58,9 @@ StandardDeviationPerComponentSampleFilter::GetInput() const } template -typename StandardDeviationPerComponentSampleFilter::DataObjectPointer +auto StandardDeviationPerComponentSampleFilter::MakeOutput(DataObjectPointerArraySizeType index) + -> DataObjectPointer { if (index == 0) { @@ -89,8 +90,8 @@ StandardDeviationPerComponentSampleFilter::MakeOutput(DataObjectPointer } template -typename StandardDeviationPerComponentSampleFilter::MeasurementVectorSizeType -StandardDeviationPerComponentSampleFilter::GetMeasurementVectorSize() const +auto +StandardDeviationPerComponentSampleFilter::GetMeasurementVectorSize() const -> MeasurementVectorSizeType { const SampleType * input = this->GetInput(); @@ -185,29 +186,32 @@ StandardDeviationPerComponentSampleFilter::GenerateData() } template -const typename StandardDeviationPerComponentSampleFilter::MeasurementVectorRealDecoratedType * +auto StandardDeviationPerComponentSampleFilter::GetStandardDeviationPerComponentOutput() const + -> const MeasurementVectorRealDecoratedType * { return static_cast(this->ProcessObject::GetOutput(0)); } template -const typename StandardDeviationPerComponentSampleFilter::MeasurementVectorRealType +auto StandardDeviationPerComponentSampleFilter::GetStandardDeviationPerComponent() const + -> const MeasurementVectorRealType { return this->GetStandardDeviationPerComponentOutput()->Get(); } template -const typename StandardDeviationPerComponentSampleFilter::MeasurementVectorRealDecoratedType * +auto StandardDeviationPerComponentSampleFilter::GetMeanPerComponentOutput() const + -> const MeasurementVectorRealDecoratedType * { return static_cast(this->ProcessObject::GetOutput(1)); } template -const typename StandardDeviationPerComponentSampleFilter::MeasurementVectorRealType -StandardDeviationPerComponentSampleFilter::GetMeanPerComponent() const +auto +StandardDeviationPerComponentSampleFilter::GetMeanPerComponent() const -> const MeasurementVectorRealType { return this->GetMeanPerComponentOutput()->Get(); } diff --git a/Modules/Numerics/Statistics/include/itkSubsample.hxx b/Modules/Numerics/Statistics/include/itkSubsample.hxx index dbabd953071..56fa75dbcb0 100644 --- a/Modules/Numerics/Statistics/include/itkSubsample.hxx +++ b/Modules/Numerics/Statistics/include/itkSubsample.hxx @@ -104,8 +104,8 @@ Subsample::AddInstance(InstanceIdentifier id) } template -typename Subsample::InstanceIdentifier -Subsample::Size() const +auto +Subsample::Size() const -> InstanceIdentifier { return static_cast(m_IdHolder.size()); } @@ -120,8 +120,8 @@ Subsample::Clear() } template -const typename Subsample::MeasurementVectorType & -Subsample::GetMeasurementVector(InstanceIdentifier id) const +auto +Subsample::GetMeasurementVector(InstanceIdentifier id) const -> const MeasurementVectorType & { if (id >= m_IdHolder.size()) { @@ -193,8 +193,8 @@ Subsample::GetFrequencyByIndex(unsigned int index) const } template -typename Subsample::InstanceIdentifier -Subsample::GetInstanceIdentifier(unsigned int index) +auto +Subsample::GetInstanceIdentifier(unsigned int index) -> InstanceIdentifier { if (index >= m_IdHolder.size()) { diff --git a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx index 77f8ecafdf9..0841508d179 100644 --- a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx @@ -40,8 +40,8 @@ VectorContainerToListSampleAdaptor::PrintSelf(std::ostream & o } template -typename VectorContainerToListSampleAdaptor::InstanceIdentifier -VectorContainerToListSampleAdaptor::Size() const +auto +VectorContainerToListSampleAdaptor::Size() const -> InstanceIdentifier { if (this->m_VectorContainer.IsNull()) { @@ -76,8 +76,8 @@ inline typename VectorContainerToListSampleAdaptor::AbsoluteFr } template -typename VectorContainerToListSampleAdaptor::TotalAbsoluteFrequencyType -VectorContainerToListSampleAdaptor::GetTotalFrequency() const +auto +VectorContainerToListSampleAdaptor::GetTotalFrequency() const -> TotalAbsoluteFrequencyType { if (this->m_VectorContainer.IsNull()) { diff --git a/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx index a907c263fc9..71bbed7e136 100644 --- a/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkConstantVelocityFieldTransformParametersAdaptor.hxx @@ -57,8 +57,8 @@ ConstantVelocityFieldTransformParametersAdaptor::SetRequiredSize(con } template -const typename ConstantVelocityFieldTransformParametersAdaptor::SizeType -ConstantVelocityFieldTransformParametersAdaptor::GetRequiredSize() const +auto +ConstantVelocityFieldTransformParametersAdaptor::GetRequiredSize() const -> const SizeType { SizeType size; for (SizeValueType d = 0; d < ConstantVelocityFieldDimension; ++d) @@ -90,8 +90,8 @@ ConstantVelocityFieldTransformParametersAdaptor::SetRequiredOrigin(c } template -const typename ConstantVelocityFieldTransformParametersAdaptor::PointType -ConstantVelocityFieldTransformParametersAdaptor::GetRequiredOrigin() const +auto +ConstantVelocityFieldTransformParametersAdaptor::GetRequiredOrigin() const -> const PointType { PointType origin; for (SizeValueType d = 0; d < ConstantVelocityFieldDimension; ++d) @@ -123,8 +123,8 @@ ConstantVelocityFieldTransformParametersAdaptor::SetRequiredSpacing( } template -const typename ConstantVelocityFieldTransformParametersAdaptor::SpacingType -ConstantVelocityFieldTransformParametersAdaptor::GetRequiredSpacing() const +auto +ConstantVelocityFieldTransformParametersAdaptor::GetRequiredSpacing() const -> const SpacingType { SpacingType spacing; for (SizeValueType d = 0; d < ConstantVelocityFieldDimension; ++d) @@ -162,8 +162,8 @@ ConstantVelocityFieldTransformParametersAdaptor::SetRequiredDirectio } template -const typename ConstantVelocityFieldTransformParametersAdaptor::DirectionType -ConstantVelocityFieldTransformParametersAdaptor::GetRequiredDirection() const +auto +ConstantVelocityFieldTransformParametersAdaptor::GetRequiredDirection() const -> const DirectionType { DirectionType direction; for (SizeValueType di = 0; di < ConstantVelocityFieldDimension; ++di) diff --git a/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx index a1387412d70..cfeb86dc64e 100644 --- a/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkCorrelationCoefficientHistogramImageToImageMetric.hxx @@ -35,8 +35,9 @@ CorrelationCoefficientHistogramImageToImageMetric::Ev } template -typename CorrelationCoefficientHistogramImageToImageMetric::MeasureType +auto CorrelationCoefficientHistogramImageToImageMetric::MeanX(HistogramType & histogram) const + -> MeasureType { MeasureType meanX = NumericTraits::ZeroValue(); @@ -53,8 +54,9 @@ CorrelationCoefficientHistogramImageToImageMetric::Me } template -typename CorrelationCoefficientHistogramImageToImageMetric::MeasureType +auto CorrelationCoefficientHistogramImageToImageMetric::MeanY(HistogramType & histogram) const + -> MeasureType { MeasureType meanY = NumericTraits::ZeroValue(); @@ -71,8 +73,9 @@ CorrelationCoefficientHistogramImageToImageMetric::Me } template -typename CorrelationCoefficientHistogramImageToImageMetric::MeasureType +auto CorrelationCoefficientHistogramImageToImageMetric::VarianceX(HistogramType & histogram) const + -> MeasureType { MeasureType varX = NumericTraits::ZeroValue(); @@ -86,8 +89,9 @@ CorrelationCoefficientHistogramImageToImageMetric::Va } template -typename CorrelationCoefficientHistogramImageToImageMetric::MeasureType +auto CorrelationCoefficientHistogramImageToImageMetric::VarianceY(HistogramType & histogram) const + -> MeasureType { MeasureType varY = NumericTraits::ZeroValue(); diff --git a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx index 49ac7185c18..3635217111a 100644 --- a/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkDisplacementFieldTransformParametersAdaptor.hxx @@ -57,8 +57,8 @@ DisplacementFieldTransformParametersAdaptor::SetRequiredSize(const S } template -const typename DisplacementFieldTransformParametersAdaptor::SizeType -DisplacementFieldTransformParametersAdaptor::GetRequiredSize() const +auto +DisplacementFieldTransformParametersAdaptor::GetRequiredSize() const -> const SizeType { SizeType size; for (SizeValueType d = 0; d < SpaceDimension; ++d) @@ -90,8 +90,8 @@ DisplacementFieldTransformParametersAdaptor::SetRequiredOrigin(const } template -const typename DisplacementFieldTransformParametersAdaptor::PointType -DisplacementFieldTransformParametersAdaptor::GetRequiredOrigin() const +auto +DisplacementFieldTransformParametersAdaptor::GetRequiredOrigin() const -> const PointType { PointType origin; for (SizeValueType d = 0; d < SpaceDimension; ++d) @@ -123,8 +123,8 @@ DisplacementFieldTransformParametersAdaptor::SetRequiredSpacing(cons } template -const typename DisplacementFieldTransformParametersAdaptor::SpacingType -DisplacementFieldTransformParametersAdaptor::GetRequiredSpacing() const +auto +DisplacementFieldTransformParametersAdaptor::GetRequiredSpacing() const -> const SpacingType { SpacingType spacing; for (SizeValueType d = 0; d < SpaceDimension; ++d) @@ -160,8 +160,8 @@ DisplacementFieldTransformParametersAdaptor::SetRequiredDirection(co } template -const typename DisplacementFieldTransformParametersAdaptor::DirectionType -DisplacementFieldTransformParametersAdaptor::GetRequiredDirection() const +auto +DisplacementFieldTransformParametersAdaptor::GetRequiredDirection() const -> const DirectionType { DirectionType direction; for (SizeValueType di = 0; di < SpaceDimension; ++di) diff --git a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx index 70cedbb4982..3d23c7131c0 100644 --- a/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkHistogramImageToImageMetric.hxx @@ -53,8 +53,8 @@ HistogramImageToImageMetric::SetUpperBound(const Meas } template -const typename HistogramImageToImageMetric::MeasurementVectorType & -HistogramImageToImageMetric::GetUpperBound() const +auto +HistogramImageToImageMetric::GetUpperBound() const -> const MeasurementVectorType & { return m_UpperBound; } @@ -69,8 +69,8 @@ HistogramImageToImageMetric::SetLowerBound(const Meas } template -const typename HistogramImageToImageMetric::MeasurementVectorType & -HistogramImageToImageMetric::GetLowerBound() const +auto +HistogramImageToImageMetric::GetLowerBound() const -> const MeasurementVectorType & { return m_LowerBound; } @@ -167,8 +167,9 @@ HistogramImageToImageMetric::SetTransform(TransformTy } template -typename HistogramImageToImageMetric::MeasureType +auto HistogramImageToImageMetric::GetValue(const TransformParametersType & parameters) const + -> MeasureType { itkDebugMacro("GetValue( " << parameters << " ) "); diff --git a/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx index fd9c876ad71..cce04b912bb 100644 --- a/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkImageRegistrationMethod.hxx @@ -282,8 +282,8 @@ ImageRegistrationMethod::GenerateData() * Get Output */ template -const typename ImageRegistrationMethod::TransformOutputType * -ImageRegistrationMethod::GetOutput() const +auto +ImageRegistrationMethod::GetOutput() const -> const TransformOutputType * { return static_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx index 95279b15a1c..f21d7061a97 100644 --- a/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkImageToSpatialObjectRegistrationMethod.hxx @@ -150,8 +150,9 @@ ImageToSpatialObjectRegistrationMethod::Gener } template -const typename ImageToSpatialObjectRegistrationMethod::TransformOutputType * +auto ImageToSpatialObjectRegistrationMethod::GetOutput() const + -> const TransformOutputType * { return static_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx index b6d6ebbafcb..39d67b3e15a 100644 --- a/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkKappaStatisticImageToImageMetric.hxx @@ -34,8 +34,9 @@ KappaStatisticImageToImageMetric::KappaStatisticImage } template -typename KappaStatisticImageToImageMetric::MeasureType +auto KappaStatisticImageToImageMetric::GetValue(const TransformParametersType & parameters) const + -> MeasureType { itkDebugMacro("GetValue( " << parameters << " ) "); diff --git a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx index 551494f3c95..522ca725384 100644 --- a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx @@ -514,8 +514,9 @@ MattesMutualInformationImageToImageMetric::GetValueTh } template -typename MattesMutualInformationImageToImageMetric::MeasureType +auto MattesMutualInformationImageToImageMetric::GetValue(const ParametersType & parameters) const + -> MeasureType { // Set up the parameters in the transform this->m_Transform->SetParameters(parameters); diff --git a/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx index 72182c0ac78..c44665fa597 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresHistogramImageToImageMetric.hxx @@ -23,8 +23,9 @@ namespace itk { template -typename MeanSquaresHistogramImageToImageMetric::MeasureType +auto MeanSquaresHistogramImageToImageMetric::EvaluateMeasure(HistogramType & histogram) const + -> MeasureType { MeasureType measure = NumericTraits::ZeroValue(); HistogramIteratorType it = histogram.Begin(); diff --git a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx index 270e94af701..5c2745908d1 100644 --- a/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMeanSquaresImageToImageMetric.hxx @@ -97,8 +97,9 @@ MeanSquaresImageToImageMetric::GetValueThreadProcessS } template -typename MeanSquaresImageToImageMetric::MeasureType +auto MeanSquaresImageToImageMetric::GetValue(const ParametersType & parameters) const + -> MeasureType { itkDebugMacro("GetValue( " << parameters << " ) "); diff --git a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx index 7d5ecca0939..756a9c1d0e3 100644 --- a/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkMultiResolutionImageRegistrationMethod.hxx @@ -440,8 +440,8 @@ MultiResolutionImageRegistrationMethod::GetMTime() co * Get Output */ template -const typename MultiResolutionImageRegistrationMethod::TransformOutputType * -MultiResolutionImageRegistrationMethod::GetOutput() const +auto +MultiResolutionImageRegistrationMethod::GetOutput() const -> const TransformOutputType * { return static_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx index 96be0e1f1b1..8b582c412c0 100644 --- a/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMutualInformationImageToImageMetric.hxx @@ -198,8 +198,9 @@ MutualInformationImageToImageMetric::SampleFixedImage * Get the match Measure */ template -typename MutualInformationImageToImageMetric::MeasureType +auto MutualInformationImageToImageMetric::GetValue(const ParametersType & parameters) const + -> MeasureType { // make sure the transform has the current parameters this->m_Transform->SetParameters(parameters); diff --git a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx index ebbf83e1eef..2faa11dea53 100644 --- a/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkPointSetToImageRegistrationMethod.hxx @@ -148,8 +148,8 @@ PointSetToImageRegistrationMethod::GenerateData() } template -const typename PointSetToImageRegistrationMethod::TransformOutputType * -PointSetToImageRegistrationMethod::GetOutput() const +auto +PointSetToImageRegistrationMethod::GetOutput() const -> const TransformOutputType * { return static_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx index ea3d991ea96..9de4e91bafd 100644 --- a/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx +++ b/Modules/Registration/Common/include/itkPointSetToPointSetRegistrationMethod.hxx @@ -142,8 +142,8 @@ PointSetToPointSetRegistrationMethod::GenerateD } template -const typename PointSetToPointSetRegistrationMethod::TransformOutputType * -PointSetToPointSetRegistrationMethod::GetOutput() const +auto +PointSetToPointSetRegistrationMethod::GetOutput() const -> const TransformOutputType * { return static_cast(this->ProcessObject::GetOutput(0)); } diff --git a/Modules/Registration/Common/include/itkPointsLocator.hxx b/Modules/Registration/Common/include/itkPointsLocator.hxx index b6f1ad427a0..089475c03fb 100644 --- a/Modules/Registration/Common/include/itkPointsLocator.hxx +++ b/Modules/Registration/Common/include/itkPointsLocator.hxx @@ -59,8 +59,8 @@ PointsLocator::Initialize() } template -typename PointsLocator::PointIdentifier -PointsLocator::FindClosestPoint(const PointType & query) const +auto +PointsLocator::FindClosestPoint(const PointType & query) const -> PointIdentifier { NeighborsIdentifierType identifiers; this->m_Tree->Search(query, 1u, identifiers); diff --git a/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx b/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx index 643981e3403..4a59fc5761b 100644 --- a/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx +++ b/Modules/Registration/Common/include/itkTimeVaryingVelocityFieldTransformParametersAdaptor.hxx @@ -57,8 +57,8 @@ TimeVaryingVelocityFieldTransformParametersAdaptor::SetRequiredSize( } template -const typename TimeVaryingVelocityFieldTransformParametersAdaptor::SizeType -TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredSize() const +auto +TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredSize() const -> const SizeType { SizeType size; for (SizeValueType d = 0; d < TotalDimension; ++d) @@ -90,8 +90,8 @@ TimeVaryingVelocityFieldTransformParametersAdaptor::SetRequiredOrigi } template -const typename TimeVaryingVelocityFieldTransformParametersAdaptor::PointType -TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredOrigin() const +auto +TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredOrigin() const -> const PointType { PointType origin; for (SizeValueType d = 0; d < TotalDimension; ++d) @@ -123,8 +123,8 @@ TimeVaryingVelocityFieldTransformParametersAdaptor::SetRequiredSpaci } template -const typename TimeVaryingVelocityFieldTransformParametersAdaptor::SpacingType -TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredSpacing() const +auto +TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredSpacing() const -> const SpacingType { SpacingType spacing; for (SizeValueType d = 0; d < TotalDimension; ++d) @@ -160,8 +160,8 @@ TimeVaryingVelocityFieldTransformParametersAdaptor::SetRequiredDirec } template -const typename TimeVaryingVelocityFieldTransformParametersAdaptor::DirectionType -TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredDirection() const +auto +TimeVaryingVelocityFieldTransformParametersAdaptor::GetRequiredDirection() const -> const DirectionType { DirectionType direction; for (SizeValueType di = 0; di < TotalDimension; ++di) diff --git a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx index 36bf2c91f17..552dc2f5b8d 100644 --- a/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx +++ b/Modules/Registration/FEM/include/itkFEMFiniteDifferenceFunctionLoad.hxx @@ -121,8 +121,9 @@ FiniteDifferenceFunctionLoad::SetCurrentEnergy(double e) } template -typename FiniteDifferenceFunctionLoad::Float +auto FiniteDifferenceFunctionLoad::EvaluateMetricGivenSolution(ElementContainerType * el, Float step) + -> Float { Float energy = 0.0, defe = 0.0; @@ -199,8 +200,8 @@ FiniteDifferenceFunctionLoad::EvaluateMetricGivenSolution(Eleme } template -typename FiniteDifferenceFunctionLoad::FEMVectorType -FiniteDifferenceFunctionLoad::Fe(FEMVectorType Gpos) +auto +FiniteDifferenceFunctionLoad::Fe(FEMVectorType Gpos) -> FEMVectorType { // We assume the vector input is of size 2*ImageDimension. diff --git a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx index f3fc6ffc701..19159998162 100644 --- a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx +++ b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx @@ -193,8 +193,8 @@ FEMRegistrationFilter::SetInputFEMObject( } template -typename FEMRegistrationFilter::FEMObjectType * -FEMRegistrationFilter::GetInputFEMObject(unsigned int level) +auto +FEMRegistrationFilter::GetInputFEMObject(unsigned int level) -> FEMObjectType * { return static_cast(this->ProcessObject::GetInput(2 + level)); } diff --git a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx index 2e5a7ac294e..3df187bc1ac 100644 --- a/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx +++ b/Modules/Registration/Metricsv4/include/itkManifoldParzenWindowsPointSetFunction.hxx @@ -178,8 +178,9 @@ ManifoldParzenWindowsPointSetFunction::Evaluate(c } template -typename ManifoldParzenWindowsPointSetFunction::GaussianConstPointer +auto ManifoldParzenWindowsPointSetFunction::GetGaussian(PointIdentifier i) const + -> GaussianConstPointer { if (i < this->m_Gaussians.size()) { diff --git a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx index 3e1b7b95405..d8ebf2a5fe9 100644 --- a/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkDiffeomorphicDemonsRegistrationFilter.hxx @@ -183,8 +183,9 @@ DiffeomorphicDemonsRegistrationFilter -typename DiffeomorphicDemonsRegistrationFilter::GradientType +auto DiffeomorphicDemonsRegistrationFilter::GetUseGradientType() const + -> GradientType { const DemonsRegistrationFunctionType * drfp = this->DownCastDifferenceFunctionType(); diff --git a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx index 954a842727a..e3392d33d8c 100644 --- a/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx +++ b/Modules/Registration/PDEDeformable/include/itkFastSymmetricForcesDemonsRegistrationFilter.hxx @@ -137,8 +137,9 @@ FastSymmetricForcesDemonsRegistrationFilter -typename FastSymmetricForcesDemonsRegistrationFilter::GradientType +auto FastSymmetricForcesDemonsRegistrationFilter::GetUseGradientType() const + -> GradientType { const DemonsRegistrationFunctionType * drfp = this->DownCastDifferenceFunctionType(); diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx index 09bc5ee767e..1018b4342ea 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DFilter.hxx @@ -228,8 +228,8 @@ DeformableSimplexMesh3DFilter::SetGradient(const Gradie /* Get the gradient image as an input */ template -const typename DeformableSimplexMesh3DFilter::GradientImageType * -DeformableSimplexMesh3DFilter::GetGradient() const +auto +DeformableSimplexMesh3DFilter::GetGradient() const -> const GradientImageType * { const auto * gradientImage = dynamic_cast(this->ProcessObject::GetInput(1)); diff --git a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx index ee06de7dcfe..aee8a910ecb 100644 --- a/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx +++ b/Modules/Segmentation/KLMRegionGrowing/include/itkKLMRegionGrowImageFilter.hxx @@ -168,8 +168,8 @@ KLMRegionGrowImageFilter::GenerateOutputImage() } // end GenerateOutputImage() template -typename KLMRegionGrowImageFilter::LabelImagePointer -KLMRegionGrowImageFilter::GetLabelledImage() +auto +KLMRegionGrowImageFilter::GetLabelledImage() -> LabelImagePointer { // Allocate the memory for the labelled image @@ -195,8 +195,9 @@ KLMRegionGrowImageFilter::GetLabelledImage() } // end GetLabelledImage() template -typename KLMRegionGrowImageFilter::LabelImagePointer +auto KLMRegionGrowImageFilter::GenerateLabelledImage(LabelImageType * labelImagePtr) + -> LabelImagePointer { InputImageConstPointer inputImage = this->GetInput(); InputImageSizeType inputImageSize = inputImage->GetBufferedRegion().GetSize(); diff --git a/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx b/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx index a631e5bd2c5..79e51a4fbc7 100644 --- a/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx +++ b/Modules/Segmentation/LabelVoting/include/itkLabelVotingImageFilter.hxx @@ -36,8 +36,8 @@ LabelVotingImageFilter::LabelVotingImageFilter() } template -typename LabelVotingImageFilter::InputPixelType -LabelVotingImageFilter::ComputeMaximumInputValue() +auto +LabelVotingImageFilter::ComputeMaximumInputValue() -> InputPixelType { InputPixelType maxLabel = 0; diff --git a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx index c0706f76fe1..397d48a7f27 100644 --- a/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkExtensionVelocitiesImageFilter.hxx @@ -64,8 +64,9 @@ ExtensionVelocitiesImageFilter::SetInputVel * */ template -const typename ExtensionVelocitiesImageFilter::AuxImageType * +auto ExtensionVelocitiesImageFilter::GetInputVelocityImage(unsigned int idx) + -> const AuxImageType * { if (idx >= VAuxDimension || this->GetNumberOfIndexedInputs() < idx + 2) { @@ -79,8 +80,9 @@ ExtensionVelocitiesImageFilter::GetInputVel * */ template -typename ExtensionVelocitiesImageFilter::AuxImageType * +auto ExtensionVelocitiesImageFilter::GetOutputVelocityImage(unsigned int idx) + -> AuxImageType * { if (idx >= VAuxDimension || this->GetNumberOfIndexedOutputs() < idx + 2) { diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx index f3939e7c502..dabab47d8ed 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunction.hxx @@ -174,8 +174,8 @@ LevelSetFunction::ComputeMeanCurvature(const NeighborhoodType & itkN } template -typename LevelSetFunction::VectorType -LevelSetFunction::InitializeZeroVectorConstant() +auto +LevelSetFunction::InitializeZeroVectorConstant() -> VectorType { VectorType ans; @@ -213,8 +213,8 @@ template double LevelSetFunction::m_DT = 1.0 / (2.0 * ImageDimension); template -typename LevelSetFunction::TimeStepType -LevelSetFunction::ComputeGlobalTimeStep(void * GlobalData) const +auto +LevelSetFunction::ComputeGlobalTimeStep(void * GlobalData) const -> TimeStepType { TimeStepType dt; diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx index f84b03fbf92..c097860687b 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx @@ -56,8 +56,9 @@ LevelSetFunctionWithRefitTerm::PrintSelf(std::ostr } template -typename LevelSetFunctionWithRefitTerm::TimeStepType +auto LevelSetFunctionWithRefitTerm::ComputeGlobalTimeStep(void * GlobalData) const + -> TimeStepType { TimeStepType dt = Superclass::ComputeGlobalTimeStep(GlobalData); diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx index f42f5a7a20b..bcaa2c90df4 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx @@ -1252,8 +1252,9 @@ ParallelSparseFieldLevelSetImageFilter::Iterate() } template -typename ParallelSparseFieldLevelSetImageFilter::TimeStepType +auto ParallelSparseFieldLevelSetImageFilter::ThreadedCalculateChange(ThreadIdType ThreadId) + -> TimeStepType { typename FiniteDifferenceFunctionType::Pointer df = this->GetDifferenceFunction(); typename FiniteDifferenceFunctionType::FloatOffsetType offset; diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx index 1ea594f7b66..ba365358bf8 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunction.hxx @@ -54,8 +54,9 @@ ShapePriorMAPCostFunction::PrintSelf(std::ostream & * */ template -typename ShapePriorMAPCostFunction::MeasureType +auto ShapePriorMAPCostFunction::ComputeLogInsideTerm(const ParametersType & parameters) const + -> MeasureType { this->m_ShapeFunction->SetParameters(parameters); @@ -116,8 +117,9 @@ ShapePriorMAPCostFunction::ComputeLogShapePriorTerm * */ template -typename ShapePriorMAPCostFunction::MeasureType +auto ShapePriorMAPCostFunction::ComputeLogGradientTerm(const ParametersType & parameters) const + -> MeasureType { this->m_ShapeFunction->SetParameters(parameters); diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx index 0a607a9b42f..38fdf29558c 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorMAPCostFunctionBase.hxx @@ -50,8 +50,9 @@ ShapePriorMAPCostFunctionBase::PrintSelf(std::ostre * */ template -typename ShapePriorMAPCostFunctionBase::MeasureType +auto ShapePriorMAPCostFunctionBase::GetValue(const ParametersType & parameters) const + -> MeasureType { return (this->ComputeLogInsideTerm(parameters) + this->ComputeLogGradientTerm(parameters) + this->ComputeLogShapePriorTerm(parameters) + this->ComputeLogPosePriorTerm(parameters)); diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx index 2b8cbbc703b..6e090fbda6d 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetFunction.hxx @@ -87,8 +87,9 @@ ShapePriorSegmentationLevelSetFunction::ComputeUp * Compute the global time step. */ template -typename ShapePriorSegmentationLevelSetFunction::TimeStepType +auto ShapePriorSegmentationLevelSetFunction::ComputeGlobalTimeStep(void * gd) const + -> TimeStepType { TimeStepType dt; diff --git a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx index 154f94291d5..a1a2bd40eb4 100644 --- a/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkSparseFieldLevelSetImageFilter.hxx @@ -845,8 +845,8 @@ SparseFieldLevelSetImageFilter::AllocateUpdateBuffer( } template -typename SparseFieldLevelSetImageFilter::TimeStepType -SparseFieldLevelSetImageFilter::CalculateChange() +auto +SparseFieldLevelSetImageFilter::CalculateChange() -> TimeStepType { const typename Superclass::FiniteDifferenceFunctionType::Pointer df = this->GetDifferenceFunction(); typename Superclass::FiniteDifferenceFunctionType::FloatOffsetType offset; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx index c52dbb6e925..2828656f8eb 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkDiscreteLevelSetImage.hxx @@ -26,8 +26,8 @@ namespace itk // ---------------------------------------------------------------------------- template -typename DiscreteLevelSetImage::GradientType -DiscreteLevelSetImage::EvaluateGradient(const InputType & inputIndex) const +auto +DiscreteLevelSetImage::EvaluateGradient(const InputType & inputIndex) const -> GradientType { InputType inputIndexA = inputIndex; InputType inputIndexB = inputIndex; @@ -65,8 +65,8 @@ DiscreteLevelSetImage::EvaluateGradient(const InputType & i // ---------------------------------------------------------------------------- template -typename DiscreteLevelSetImage::GradientType -DiscreteLevelSetImage::EvaluateForwardGradient(const InputType & inputIndex) const +auto +DiscreteLevelSetImage::EvaluateForwardGradient(const InputType & inputIndex) const -> GradientType { const auto centerValue = static_cast(this->Evaluate(inputIndex)); @@ -96,8 +96,8 @@ DiscreteLevelSetImage::EvaluateForwardGradient(const InputT // ---------------------------------------------------------------------------- template -typename DiscreteLevelSetImage::GradientType -DiscreteLevelSetImage::EvaluateBackwardGradient(const InputType & inputIndex) const +auto +DiscreteLevelSetImage::EvaluateBackwardGradient(const InputType & inputIndex) const -> GradientType { const auto centerValue = static_cast(this->Evaluate(inputIndex)); @@ -126,8 +126,8 @@ DiscreteLevelSetImage::EvaluateBackwardGradient(const Input // ---------------------------------------------------------------------------- template -typename DiscreteLevelSetImage::HessianType -DiscreteLevelSetImage::EvaluateHessian(const InputType & inputIndex) const +auto +DiscreteLevelSetImage::EvaluateHessian(const InputType & inputIndex) const -> HessianType { HessianType oHessian; @@ -219,8 +219,8 @@ DiscreteLevelSetImage::EvaluateHessian(const InputType & in // ---------------------------------------------------------------------------- template -typename DiscreteLevelSetImage::OutputRealType -DiscreteLevelSetImage::EvaluateLaplacian(const InputType & inputIndex) const +auto +DiscreteLevelSetImage::EvaluateLaplacian(const InputType & inputIndex) const -> OutputRealType { OutputRealType oLaplacian = NumericTraits::ZeroValue(); @@ -438,8 +438,8 @@ DiscreteLevelSetImage::EvaluateHessian(const InputType & in // ---------------------------------------------------------------------------- template -typename DiscreteLevelSetImage::OutputRealType -DiscreteLevelSetImage::EvaluateMeanCurvature(const InputType & inputIndex) const +auto +DiscreteLevelSetImage::EvaluateMeanCurvature(const InputType & inputIndex) const -> OutputRealType { OutputRealType oValue = NumericTraits::ZeroValue(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx index 685e85927d9..0224dc53f52 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetBase.hxx @@ -68,8 +68,8 @@ LevelSetBase::EvaluateGradientNorm(const I // ---------------------------------------------------------------------------- template -typename LevelSetBase::OutputRealType -LevelSetBase::EvaluateGradientNorm(const InputType & iP) const +auto +LevelSetBase::EvaluateGradientNorm(const InputType & iP) const -> OutputRealType { GradientType grad = this->EvaluateGradient(iP); return grad.GetNorm(); @@ -77,8 +77,8 @@ LevelSetBase::EvaluateGradientNorm(const I // ---------------------------------------------------------------------------- template -typename LevelSetBase::OutputRealType -LevelSetBase::EvaluateMeanCurvature(const InputType & iP) const +auto +LevelSetBase::EvaluateMeanCurvature(const InputType & iP) const -> OutputRealType { OutputRealType oValue = NumericTraits::ZeroValue(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx index 25fdd70fa91..8d4cb804665 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.hxx @@ -25,8 +25,8 @@ namespace itk { template -const typename LevelSetContainerBase::LevelSetContainerType & -LevelSetContainerBase::GetContainer() const +auto +LevelSetContainerBase::GetContainer() const -> const LevelSetContainerType & { return m_Container; } @@ -39,43 +39,43 @@ LevelSetContainerBase::SetContainer(const LevelSetContai } template -typename LevelSetContainerBase::Iterator -LevelSetContainerBase::Begin() +auto +LevelSetContainerBase::Begin() -> Iterator { return Iterator(m_Container.begin()); } template -typename LevelSetContainerBase::ConstIterator -LevelSetContainerBase::Begin() const +auto +LevelSetContainerBase::Begin() const -> ConstIterator { return ConstIterator(m_Container.begin()); } template -typename LevelSetContainerBase::Iterator -LevelSetContainerBase::End() +auto +LevelSetContainerBase::End() -> Iterator { return Iterator(m_Container.end()); } template -typename LevelSetContainerBase::ConstIterator -LevelSetContainerBase::End() const +auto +LevelSetContainerBase::End() const -> ConstIterator { return ConstIterator(m_Container.end()); } template -typename LevelSetContainerBase::LevelSetIdentifierType -LevelSetContainerBase::Size() const +auto +LevelSetContainerBase::Size() const -> LevelSetIdentifierType { return static_cast(m_Container.size()); } template -typename LevelSetContainerBase::LevelSetPointer -LevelSetContainerBase::GetLevelSet(const LevelSetIdentifierType & iId) const +auto +LevelSetContainerBase::GetLevelSet(const LevelSetIdentifierType & iId) const -> LevelSetPointer { auto it = m_Container.find(iId); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx index 1e94b532bbe..fba1bb74ed3 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDenseImage.hxx @@ -42,8 +42,8 @@ LevelSetDenseImage::SetImage(ImageType * inputImage) // ---------------------------------------------------------------------------- template -typename LevelSetDenseImage::OutputType -LevelSetDenseImage::Evaluate(const InputType & inputIndex) const +auto +LevelSetDenseImage::Evaluate(const InputType & inputIndex) const -> OutputType { InputType mapIndex = inputIndex - this->m_DomainOffset; return this->m_Image->GetPixel(mapIndex); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx index b0f2da7d5a1..fe2fedcbf59 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainMapImageFilter.hxx @@ -33,8 +33,8 @@ LevelSetDomainMapImageFilter::LevelSetDomainMapImageF } template -const typename LevelSetDomainMapImageFilter::DomainMapType & -LevelSetDomainMapImageFilter::GetDomainMap() const +auto +LevelSetDomainMapImageFilter::GetDomainMap() const -> const DomainMapType & { return this->m_DomainMap; } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx index c5b5bcb5092..49740b5c4b8 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetDomainPartitionImage.hxx @@ -30,8 +30,8 @@ LevelSetDomainPartitionImage::SetLevelSetDomainRegionVector(const LevelS } template -const typename LevelSetDomainPartitionImage::LevelSetDomainRegionVectorType & -LevelSetDomainPartitionImage::GetLevelSetDomainRegionVector() const +auto +LevelSetDomainPartitionImage::GetLevelSetDomainRegionVector() const -> const LevelSetDomainRegionVectorType & { return m_LevelSetDomainRegionVector; } diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx index 5f97483884b..771e633726e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx @@ -138,15 +138,17 @@ LevelSetEquationAdvectionTerm::UpdatePixel( {} template -typename LevelSetEquationAdvectionTerm::VectorType +auto LevelSetEquationAdvectionTerm::AdvectionSpeed(const LevelSetInputIndexType & iP) const + -> VectorType { return this->m_AdvectionImage->GetPixel(iP); } template -typename LevelSetEquationAdvectionTerm::LevelSetOutputRealType +auto LevelSetEquationAdvectionTerm::Value(const LevelSetInputIndexType & iP) + -> LevelSetOutputRealType { VectorType advectionField = this->AdvectionSpeed(iP); LevelSetOutputRealType oValue = NumericTraits::ZeroValue(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx index 2913d8a14a0..f8f459536e6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx @@ -59,8 +59,9 @@ LevelSetEquationBinaryMaskTerm::UpdatePixel( {} template -typename LevelSetEquationBinaryMaskTerm::LevelSetOutputRealType +auto LevelSetEquationBinaryMaskTerm::Value(const LevelSetInputIndexType & index) + -> LevelSetOutputRealType { const InputPixelType pixel = this->m_Mask->GetPixel(index); LevelSetOutputRealType value; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx index de523875a72..8f9f262d6e4 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationChanAndVeseInternalTerm.hxx @@ -113,8 +113,9 @@ LevelSetEquationChanAndVeseInternalTerm::UpdatePixel } template -typename LevelSetEquationChanAndVeseInternalTerm::LevelSetOutputRealType +auto LevelSetEquationChanAndVeseInternalTerm::Value(const LevelSetInputIndexType & inputIndex) + -> LevelSetOutputRealType { if (this->m_Heaviside.IsNotNull()) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx index 9f40b995e5a..1ae99e0938c 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.hxx @@ -56,8 +56,8 @@ LevelSetEquationContainer::AddEquation(const LevelSetIdentifierT } template -typename LevelSetEquationContainer::TermContainerType * -LevelSetEquationContainer::GetEquation(const LevelSetIdentifierType & iId) const +auto +LevelSetEquationContainer::GetEquation(const LevelSetIdentifierType & iId) const -> TermContainerType * { if (this->m_Container.empty()) { @@ -73,29 +73,29 @@ LevelSetEquationContainer::GetEquation(const LevelSetIdentifierT } template -typename LevelSetEquationContainer::Iterator -LevelSetEquationContainer::Begin() +auto +LevelSetEquationContainer::Begin() -> Iterator { return Iterator(m_Container.begin()); } template -typename LevelSetEquationContainer::Iterator -LevelSetEquationContainer::End() +auto +LevelSetEquationContainer::End() -> Iterator { return Iterator(m_Container.end()); } template -typename LevelSetEquationContainer::ConstIterator -LevelSetEquationContainer::Begin() const +auto +LevelSetEquationContainer::Begin() const -> ConstIterator { return ConstIterator(m_Container.begin()); } template -typename LevelSetEquationContainer::ConstIterator -LevelSetEquationContainer::End() const +auto +LevelSetEquationContainer::End() const -> ConstIterator { return ConstIterator(m_Container.end()); } @@ -133,8 +133,8 @@ LevelSetEquationContainer::InitializeParameters() } template -typename LevelSetEquationContainer::LevelSetOutputRealType -LevelSetEquationContainer::ComputeCFLContribution() const +auto +LevelSetEquationContainer::ComputeCFLContribution() const -> LevelSetOutputRealType { LevelSetOutputRealType oValue = NumericTraits::max(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx index a8cc5eef4ea..fe2fadf6c4f 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx @@ -97,8 +97,9 @@ LevelSetEquationCurvatureTerm::Upda {} template -typename LevelSetEquationCurvatureTerm::LevelSetOutputRealType +auto LevelSetEquationCurvatureTerm::Value(const LevelSetInputIndexType & iP) + -> LevelSetOutputRealType { if (!m_UseCurvatureImage) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx index 2ab7dbea42c..6c56323a5aa 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx @@ -64,8 +64,9 @@ LevelSetEquationLaplacianTerm::LaplacianSpeed( } template -typename LevelSetEquationLaplacianTerm::LevelSetOutputRealType +auto LevelSetEquationLaplacianTerm::Value(const LevelSetInputIndexType & iP) + -> LevelSetOutputRealType { LevelSetOutputRealType laplacian = this->m_CurrentLevelSetPointer->EvaluateLaplacian(iP); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx index 5ab1f45c809..609624c04e4 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx @@ -61,8 +61,9 @@ LevelSetEquationOverlapPenaltyTerm::Initialize( {} template -typename LevelSetEquationOverlapPenaltyTerm::LevelSetOutputRealType +auto LevelSetEquationOverlapPenaltyTerm::Value(const LevelSetInputIndexType & index) + -> LevelSetOutputRealType { LevelSetOutputRealType value = NumericTraits::ZeroValue(); this->ComputeSumTerm(index, value); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx index dc765a8ce90..ee024a934c9 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx @@ -77,8 +77,9 @@ LevelSetEquationPropagationTerm:: } template -typename LevelSetEquationPropagationTerm::LevelSetOutputRealType +auto LevelSetEquationPropagationTerm::Value(const LevelSetInputIndexType & iP) + -> LevelSetOutputRealType { LevelSetGradientType backwardGradient = this->m_CurrentLevelSetPointer->EvaluateBackwardGradient(iP); LevelSetGradientType forwardGradient = this->m_CurrentLevelSetPointer->EvaluateForwardGradient(iP); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx index 11b24678853..4c62d6983f6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermBase.hxx @@ -38,8 +38,8 @@ LevelSetEquationTermBase::LevelSetEquationTermB // ---------------------------------------------------------------------------- template -const typename LevelSetEquationTermBase::RequiredDataType & -LevelSetEquationTermBase::GetRequiredData() const +auto +LevelSetEquationTermBase::GetRequiredData() const -> const RequiredDataType & { return this->m_RequiredData; } @@ -63,8 +63,9 @@ LevelSetEquationTermBase::SetLevelSetContainer( // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermBase::LevelSetOutputRealType +auto LevelSetEquationTermBase::Evaluate(const LevelSetInputIndexType & iP) + -> LevelSetOutputRealType { if (itk::Math::abs(this->m_Coefficient) > NumericTraits::epsilon()) { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx index 5bc50d6de0c..73fac246923 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.hxx @@ -34,32 +34,32 @@ LevelSetEquationTermContainer::LevelSetEquation // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::Iterator -LevelSetEquationTermContainer::Begin() +auto +LevelSetEquationTermContainer::Begin() -> Iterator { return Iterator(this->m_Container.begin()); } // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::Iterator -LevelSetEquationTermContainer::End() +auto +LevelSetEquationTermContainer::End() -> Iterator { return Iterator(this->m_Container.end()); } // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::ConstIterator -LevelSetEquationTermContainer::Begin() const +auto +LevelSetEquationTermContainer::Begin() const -> ConstIterator { return ConstIterator(this->m_Container.begin()); } // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::ConstIterator -LevelSetEquationTermContainer::End() const +auto +LevelSetEquationTermContainer::End() const -> ConstIterator { return ConstIterator(this->m_Container.end()); } @@ -180,8 +180,8 @@ LevelSetEquationTermContainer::PushTerm(TermTyp // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::TermType * -LevelSetEquationTermContainer::GetTerm(const std::string & iName) +auto +LevelSetEquationTermContainer::GetTerm(const std::string & iName) -> TermType * { MapTermContainerIteratorType it = m_Container.find(iName); @@ -195,8 +195,8 @@ LevelSetEquationTermContainer::GetTerm(const st // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::TermType * -LevelSetEquationTermContainer::GetTerm(const TermIdType & iId) +auto +LevelSetEquationTermContainer::GetTerm(const TermIdType & iId) -> TermType * { auto it = m_Container.find(iId); @@ -257,8 +257,9 @@ LevelSetEquationTermContainer::InitializeParame // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::LevelSetOutputRealType +auto LevelSetEquationTermContainer::Evaluate(const LevelSetInputIndexType & iP) + -> LevelSetOutputRealType { auto term_it = m_Container.begin(); auto term_end = m_Container.end(); @@ -329,8 +330,8 @@ LevelSetEquationTermContainer::Update() // ---------------------------------------------------------------------------- template -typename LevelSetEquationTermContainer::LevelSetOutputRealType -LevelSetEquationTermContainer::ComputeCFLContribution() const +auto +LevelSetEquationTermContainer::ComputeCFLContribution() const -> LevelSetOutputRealType { auto term_it = m_Container.begin(); auto term_end = m_Container.end(); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx index ced6570dd11..6c359ce68d4 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetQuadEdgeMesh.hxx @@ -24,8 +24,8 @@ namespace itk { template -typename LevelSetQuadEdgeMesh::OutputType -LevelSetQuadEdgeMesh::Evaluate(const InputType & iP) const +auto +LevelSetQuadEdgeMesh::Evaluate(const InputType & iP) const -> OutputType { OutputType oValue = 0.; this->m_Mesh->GetPointData(iP, &oValue); @@ -33,16 +33,16 @@ LevelSetQuadEdgeMesh::Evaluate(const InputType & iP) const } template -typename LevelSetQuadEdgeMesh::GradientType -LevelSetQuadEdgeMesh::EvaluateGradient(const InputType & itkNotUsed(iP)) const +auto +LevelSetQuadEdgeMesh::EvaluateGradient(const InputType & itkNotUsed(iP)) const -> GradientType { itkWarningMacro(<< "to be implemented"); return Self::GradientType(); // Create a new object with default initializer } template -typename LevelSetQuadEdgeMesh::HessianType -LevelSetQuadEdgeMesh::EvaluateHessian(const InputType & itkNotUsed(iP)) const +auto +LevelSetQuadEdgeMesh::EvaluateHessian(const InputType & itkNotUsed(iP)) const -> HessianType { itkWarningMacro(<< "to be implemented"); return Self::HessianType(); // Create a new objet with default initializer diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx index f7aa6a8b8b6..77cc3b1ba99 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetSparseImage.hxx @@ -25,8 +25,8 @@ namespace itk { template -typename LevelSetSparseImage::LayerIdType -LevelSetSparseImage::Status(const InputType & inputIndex) const +auto +LevelSetSparseImage::Status(const InputType & inputIndex) const -> LayerIdType { InputType mapIndex = inputIndex - this->m_DomainOffset; return this->m_LabelMap->GetPixel(mapIndex); @@ -89,8 +89,8 @@ LevelSetSparseImage::Graft(const DataObject * data) template -const typename LevelSetSparseImage::LayerType & -LevelSetSparseImage::GetLayer(LayerIdType value) const +auto +LevelSetSparseImage::GetLayer(LayerIdType value) const -> const LayerType & { auto it = m_Layers.find(value); if (it == m_Layers.end()) @@ -102,8 +102,8 @@ LevelSetSparseImage::GetLayer(LayerIdType value) const template -typename LevelSetSparseImage::LayerType & -LevelSetSparseImage::GetLayer(LayerIdType value) +auto +LevelSetSparseImage::GetLayer(LayerIdType value) -> LayerType & { auto it = m_Layers.find(value); if (it == m_Layers.end()) diff --git a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx index 8d7b34d53a3..f40bcea5da6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkMalcolmSparseLevelSetImage.hxx @@ -33,8 +33,8 @@ MalcolmSparseLevelSetImage::MalcolmSparseLevelSetImage() // ---------------------------------------------------------------------------- template -typename MalcolmSparseLevelSetImage::OutputType -MalcolmSparseLevelSetImage::Evaluate(const InputType & inputPixel) const +auto +MalcolmSparseLevelSetImage::Evaluate(const InputType & inputPixel) const -> OutputType { InputType mapIndex = inputPixel - this->m_DomainOffset; auto layerIt = this->m_Layers.begin(); @@ -70,8 +70,8 @@ MalcolmSparseLevelSetImage::Evaluate(const InputType & inputPixel) c // ---------------------------------------------------------------------------- template -typename MalcolmSparseLevelSetImage::HessianType -MalcolmSparseLevelSetImage::EvaluateHessian(const InputType & inputPixel) const +auto +MalcolmSparseLevelSetImage::EvaluateHessian(const InputType & inputPixel) const -> HessianType { (void)inputPixel; itkGenericExceptionMacro(<< "The approximation of the hessian in the Malcolm's" @@ -84,8 +84,8 @@ MalcolmSparseLevelSetImage::EvaluateHessian(const InputType & inputP // ---------------------------------------------------------------------------- template -typename MalcolmSparseLevelSetImage::OutputRealType -MalcolmSparseLevelSetImage::EvaluateLaplacian(const InputType & inputPixel) const +auto +MalcolmSparseLevelSetImage::EvaluateLaplacian(const InputType & inputPixel) const -> OutputRealType { (void)inputPixel; itkGenericExceptionMacro(<< "The approximation of the hessian in the Malcolm's" @@ -98,8 +98,8 @@ MalcolmSparseLevelSetImage::EvaluateLaplacian(const InputType & inpu // ---------------------------------------------------------------------------- template -typename MalcolmSparseLevelSetImage::OutputRealType -MalcolmSparseLevelSetImage::EvaluateMeanCurvature(const InputType & inputPixel) const +auto +MalcolmSparseLevelSetImage::EvaluateMeanCurvature(const InputType & inputPixel) const -> OutputRealType { (void)inputPixel; itkGenericExceptionMacro(<< "The approximation of the hessian in the Malcolm's" diff --git a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx index 010b91153f0..e6d302aca74 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkShiSparseLevelSetImage.hxx @@ -32,8 +32,8 @@ ShiSparseLevelSetImage::ShiSparseLevelSetImage() } template -typename ShiSparseLevelSetImage::OutputType -ShiSparseLevelSetImage::Evaluate(const InputType & inputIndex) const +auto +ShiSparseLevelSetImage::Evaluate(const InputType & inputIndex) const -> OutputType { InputType mapIndex = inputIndex - this->m_DomainOffset; auto layerIt = this->m_Layers.begin(); @@ -70,8 +70,8 @@ ShiSparseLevelSetImage::Evaluate(const InputType & inputIndex) const template -typename ShiSparseLevelSetImage::HessianType -ShiSparseLevelSetImage::EvaluateHessian(const InputType & itkNotUsed(inputIndex)) const +auto +ShiSparseLevelSetImage::EvaluateHessian(const InputType & itkNotUsed(inputIndex)) const -> HessianType { itkGenericExceptionMacro(<< "The approximation of the hessian in the Shi's" << " representation is poor, and far to be representative." @@ -82,8 +82,8 @@ ShiSparseLevelSetImage::EvaluateHessian(const InputType & itkNotUsed template -typename ShiSparseLevelSetImage::OutputRealType -ShiSparseLevelSetImage::EvaluateLaplacian(const InputType & itkNotUsed(inputIndex)) const +auto +ShiSparseLevelSetImage::EvaluateLaplacian(const InputType & itkNotUsed(inputIndex)) const -> OutputRealType { itkGenericExceptionMacro(<< "The approximation of the hessian in the Shi's" << " representation is poor, and far to be representative." @@ -94,8 +94,9 @@ ShiSparseLevelSetImage::EvaluateLaplacian(const InputType & itkNotUs template -typename ShiSparseLevelSetImage::OutputRealType +auto ShiSparseLevelSetImage::EvaluateMeanCurvature(const InputType & itkNotUsed(inputIndex)) const + -> OutputRealType { itkGenericExceptionMacro(<< "The approximation of the hessian in the Shi's" << " representation is poor, and far to be representative." diff --git a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx index 64f640f1e58..6d796074a51 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkWhitakerSparseLevelSetImage.hxx @@ -32,8 +32,8 @@ WhitakerSparseLevelSetImage::WhitakerSparseLevelSetImage() } template -typename WhitakerSparseLevelSetImage::OutputType -WhitakerSparseLevelSetImage::Evaluate(const InputType & inputIndex) const +auto +WhitakerSparseLevelSetImage::Evaluate(const InputType & inputIndex) const -> OutputType { InputType mapIndex = inputIndex - this->m_DomainOffset; auto layerIt = this->m_Layers.begin(); diff --git a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetTestFunction.hxx b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetTestFunction.hxx index a0af5a4a630..07f66c02114 100644 --- a/Modules/Segmentation/LevelSetsv4/test/itkLevelSetTestFunction.hxx +++ b/Modules/Segmentation/LevelSetsv4/test/itkLevelSetTestFunction.hxx @@ -25,16 +25,16 @@ namespace itk { template -typename LevelSetTestFunction::OutputRealType -LevelSetTestFunction::Evaluate(const PointType & point) const +auto +LevelSetTestFunction::Evaluate(const PointType & point) const -> OutputRealType { return static_cast( std::sqrt((point[0] - 7.0) * (point[0] - 7.0) + (point[1] - 4.0) * (point[1] - 4.0)) - 3.0); } template -typename LevelSetTestFunction::GradientType -LevelSetTestFunction::EvaluateGradient(const PointType & point) const +auto +LevelSetTestFunction::EvaluateGradient(const PointType & point) const -> GradientType { GradientType gradient; gradient[0] = (point[0] - 7.0) / std::sqrt((point[0] - 7.0) * (point[0] - 7.0) + (point[1] - 4.0) * (point[1] - 4.0)); diff --git a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx index 9e4d3db6e7c..9cf280bebc4 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkConfidenceConnectedImageFilter.hxx @@ -74,8 +74,8 @@ ConfidenceConnectedImageFilter::AddSeed(const IndexTy /** Method to access seed container */ template -const typename ConfidenceConnectedImageFilter::SeedsContainerType & -ConfidenceConnectedImageFilter::GetSeeds() const +auto +ConfidenceConnectedImageFilter::GetSeeds() const -> const SeedsContainerType & { itkDebugMacro("returning Seeds"); return this->m_Seeds; diff --git a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx index f04de7febbe..b37c954f5bd 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.hxx @@ -70,8 +70,8 @@ ConnectedThresholdImageFilter::ClearSeeds() } template -const typename ConnectedThresholdImageFilter::SeedContainerType & -ConnectedThresholdImageFilter::GetSeeds() const +auto +ConnectedThresholdImageFilter::GetSeeds() const -> const SeedContainerType & { return this->m_Seeds; } @@ -165,8 +165,8 @@ ConnectedThresholdImageFilter::SetLower(const InputIm } template -typename ConnectedThresholdImageFilter::InputPixelObjectType * -ConnectedThresholdImageFilter::GetLowerInput() +auto +ConnectedThresholdImageFilter::GetLowerInput() -> InputPixelObjectType * { typename InputPixelObjectType::Pointer lower = static_cast(this->ProcessObject::GetInput(1)); if (!lower) @@ -182,8 +182,8 @@ ConnectedThresholdImageFilter::GetLowerInput() } template -typename ConnectedThresholdImageFilter::InputPixelObjectType * -ConnectedThresholdImageFilter::GetUpperInput() +auto +ConnectedThresholdImageFilter::GetUpperInput() -> InputPixelObjectType * { typename InputPixelObjectType::Pointer upper = static_cast(this->ProcessObject::GetInput(2)); if (!upper) @@ -199,8 +199,8 @@ ConnectedThresholdImageFilter::GetUpperInput() } template -typename ConnectedThresholdImageFilter::InputImagePixelType -ConnectedThresholdImageFilter::GetLower() const +auto +ConnectedThresholdImageFilter::GetLower() const -> InputImagePixelType { typename InputPixelObjectType::Pointer lower = const_cast(this)->GetLowerInput(); @@ -208,8 +208,8 @@ ConnectedThresholdImageFilter::GetLower() const } template -typename ConnectedThresholdImageFilter::InputImagePixelType -ConnectedThresholdImageFilter::GetUpper() const +auto +ConnectedThresholdImageFilter::GetUpper() const -> InputImagePixelType { typename InputPixelObjectType::Pointer upper = const_cast(this)->GetUpperInput(); diff --git a/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx index 3c33cf57459..2d0ac79bda3 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkIsolatedConnectedImageFilter.hxx @@ -157,16 +157,16 @@ IsolatedConnectedImageFilter::ClearSeeds2() } template -const typename IsolatedConnectedImageFilter::SeedsContainerType & -IsolatedConnectedImageFilter::GetSeeds1() const +auto +IsolatedConnectedImageFilter::GetSeeds1() const -> const SeedsContainerType & { itkDebugMacro("returning Seeds1"); return this->m_Seeds1; } template -const typename IsolatedConnectedImageFilter::SeedsContainerType & -IsolatedConnectedImageFilter::GetSeeds2() const +auto +IsolatedConnectedImageFilter::GetSeeds2() const -> const SeedsContainerType & { itkDebugMacro("returning Seeds2"); return this->m_Seeds2; diff --git a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx index f41daaf5f28..7a374713d28 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx +++ b/Modules/Segmentation/RegionGrowing/include/itkVectorConfidenceConnectedImageFilter.hxx @@ -346,22 +346,22 @@ VectorConfidenceConnectedImageFilter::GenerateData() } template -const typename VectorConfidenceConnectedImageFilter::CovarianceMatrixType & -VectorConfidenceConnectedImageFilter::GetCovariance() const +auto +VectorConfidenceConnectedImageFilter::GetCovariance() const -> const CovarianceMatrixType & { return m_ThresholdFunction->GetCovariance(); } template -const typename VectorConfidenceConnectedImageFilter::MeanVectorType & -VectorConfidenceConnectedImageFilter::GetMean() const +auto +VectorConfidenceConnectedImageFilter::GetMean() const -> const MeanVectorType & { return m_ThresholdFunction->GetMean(); } template -const typename VectorConfidenceConnectedImageFilter::SeedsContainerType & -VectorConfidenceConnectedImageFilter::GetSeeds() const +auto +VectorConfidenceConnectedImageFilter::GetSeeds() const -> const SeedsContainerType & { itkDebugMacro("returning Seeds"); return this->m_Seeds; diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx index 5a61d468aae..37f3902b289 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkPCAShapeSignedDistanceFunction.hxx @@ -162,8 +162,9 @@ PCAShapeSignedDistanceFunction::Initialize() // Evaluate the signed distance template -typename PCAShapeSignedDistanceFunction::OutputType +auto PCAShapeSignedDistanceFunction::Evaluate(const PointType & point) const + -> OutputType { // transform the point into the shape model space PointType mappedPoint = m_Transform->TransformPoint(point); diff --git a/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx b/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx index 8b4205e4566..15cb413d7a4 100644 --- a/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx +++ b/Modules/Segmentation/SignedDistanceFunction/include/itkSphereSignedDistanceFunction.hxx @@ -67,8 +67,8 @@ SphereSignedDistanceFunction::PrintSelf(std::ostream // Evaluate the signed distance template -typename SphereSignedDistanceFunction::OutputType -SphereSignedDistanceFunction::Evaluate(const PointType & point) const +auto +SphereSignedDistanceFunction::Evaluate(const PointType & point) const -> OutputType { using RealType = typename NumericTraits::RealType; RealType output = 0.0; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.hxx index e5cf5e8e386..de6faea0b38 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2D.hxx @@ -90,8 +90,8 @@ VoronoiDiagram2D::GetCellId(CellIdentifier cellId, CellAutoPointe template -typename VoronoiDiagram2D::EdgeInfo -VoronoiDiagram2D::GetSeedsIDAroundEdge(VoronoiEdge * task) +auto +VoronoiDiagram2D::GetSeedsIDAroundEdge(VoronoiEdge * task) -> EdgeInfo { EdgeInfo answer; @@ -102,56 +102,56 @@ VoronoiDiagram2D::GetSeedsIDAroundEdge(VoronoiEdge * task) template -typename VoronoiDiagram2D::VoronoiEdgeIterator -VoronoiDiagram2D::EdgeBegin() +auto +VoronoiDiagram2D::EdgeBegin() -> VoronoiEdgeIterator { return m_EdgeList.begin(); } template -typename VoronoiDiagram2D::VoronoiEdgeIterator -VoronoiDiagram2D::EdgeEnd() +auto +VoronoiDiagram2D::EdgeEnd() -> VoronoiEdgeIterator { return m_EdgeList.end(); } template -typename VoronoiDiagram2D::NeighborIdIterator -VoronoiDiagram2D::NeighborIdsBegin(int seeds) +auto +VoronoiDiagram2D::NeighborIdsBegin(int seeds) -> NeighborIdIterator { return m_CellNeighborsID[seeds].begin(); } template -typename VoronoiDiagram2D::NeighborIdIterator -VoronoiDiagram2D::NeighborIdsEnd(int seeds) +auto +VoronoiDiagram2D::NeighborIdsEnd(int seeds) -> NeighborIdIterator { return m_CellNeighborsID[seeds].end(); } template -typename VoronoiDiagram2D::VertexIterator -VoronoiDiagram2D::VertexBegin() +auto +VoronoiDiagram2D::VertexBegin() -> VertexIterator { return this->m_PointsContainer->Begin(); } template -typename VoronoiDiagram2D::VertexIterator -VoronoiDiagram2D::VertexEnd() +auto +VoronoiDiagram2D::VertexEnd() -> VertexIterator { return this->m_PointsContainer->End(); } template -typename VoronoiDiagram2D::PointType -VoronoiDiagram2D::GetSeed(int SeedID) +auto +VoronoiDiagram2D::GetSeed(int SeedID) -> PointType { PointType answer; diff --git a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx index 2d91f70e9a2..9278637eae4 100644 --- a/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx +++ b/Modules/Segmentation/Voronoi/include/itkVoronoiDiagram2DGenerator.hxx @@ -144,8 +144,8 @@ VoronoiDiagram2DGenerator::AddOneSeed(PointType inputSeed) } template -typename VoronoiDiagram2DGenerator::PointType -VoronoiDiagram2DGenerator::GetSeed(int SeedID) +auto +VoronoiDiagram2DGenerator::GetSeed(int SeedID) -> PointType { PointType answer; @@ -587,8 +587,8 @@ VoronoiDiagram2DGenerator::dist(FortuneSite * s1, FortuneSite * s } template -typename VoronoiDiagram2DGenerator::FortuneHalfEdge * -VoronoiDiagram2DGenerator::ELgethash(int b) +auto +VoronoiDiagram2DGenerator::ELgethash(int b) -> FortuneHalfEdge * { if ((b < 0) || (b >= static_cast(m_ELhashsize))) { @@ -613,8 +613,8 @@ VoronoiDiagram2DGenerator::ELgethash(int b) } template -typename VoronoiDiagram2DGenerator::FortuneHalfEdge * -VoronoiDiagram2DGenerator::findLeftHE(PointType * p) +auto +VoronoiDiagram2DGenerator::findLeftHE(PointType * p) -> FortuneHalfEdge * { int i; auto bucket = (int)((((*p)[0]) - m_Pxmin) / m_Deltax * m_ELhashsize); @@ -667,8 +667,8 @@ VoronoiDiagram2DGenerator::findLeftHE(PointType * p) } template -typename VoronoiDiagram2DGenerator::FortuneSite * -VoronoiDiagram2DGenerator::getRightReg(FortuneHalfEdge * he) +auto +VoronoiDiagram2DGenerator::getRightReg(FortuneHalfEdge * he) -> FortuneSite * { if ((he->m_Edge) == nullptr) { @@ -685,8 +685,8 @@ VoronoiDiagram2DGenerator::getRightReg(FortuneHalfEdge * he) } template -typename VoronoiDiagram2DGenerator::FortuneSite * -VoronoiDiagram2DGenerator::getLeftReg(FortuneHalfEdge * he) +auto +VoronoiDiagram2DGenerator::getLeftReg(FortuneHalfEdge * he) -> FortuneSite * { if ((he->m_Edge) == nullptr) { @@ -807,8 +807,8 @@ VoronoiDiagram2DGenerator::intersect(FortuneSite * newV, FortuneH } template -typename VoronoiDiagram2DGenerator::FortuneHalfEdge * -VoronoiDiagram2DGenerator::getPQmin() +auto +VoronoiDiagram2DGenerator::getPQmin() -> FortuneHalfEdge * { FortuneHalfEdge * curr = m_PQHash[m_PQmin].m_Next; diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx index 9795a5dde1e..ab9d505b61a 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedRelabeler.hxx @@ -34,8 +34,8 @@ Relabeler::Relabeler() } template -typename Relabeler::DataObjectPointer -Relabeler::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) +auto +Relabeler::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) -> DataObjectPointer { return ImageType::New().GetPointer(); } diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx index 98aafd1b027..eba845e084e 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx @@ -36,8 +36,8 @@ SegmentTreeGenerator::SegmentTreeGenerator() } template -typename SegmentTreeGenerator::DataObjectPointer -SegmentTreeGenerator::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) +auto +SegmentTreeGenerator::MakeOutput(DataObjectPointerArraySizeType itkNotUsed(idx)) -> DataObjectPointer { return SegmentTreeType::New().GetPointer(); } diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx index c4798ee5e7a..1921c274401 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedSegmenter.hxx @@ -1241,8 +1241,8 @@ Segmenter::Threshold(InputImageTypePointer destination, ---------------------------------------------------------------------------- */ template -typename Segmenter::DataObjectPointer -Segmenter::MakeOutput(DataObjectPointerArraySizeType idx) +auto +Segmenter::MakeOutput(DataObjectPointerArraySizeType idx) -> DataObjectPointer { if (idx == 0) { diff --git a/Modules/Video/Core/include/itkRingBuffer.hxx b/Modules/Video/Core/include/itkRingBuffer.hxx index 5f8853a90a1..51acf31ec58 100644 --- a/Modules/Video/Core/include/itkRingBuffer.hxx +++ b/Modules/Video/Core/include/itkRingBuffer.hxx @@ -139,8 +139,8 @@ RingBuffer::SetBufferContents(OffsetValueType offset, ElementPointer e // GetNumberOfBuffers // template -typename RingBuffer::SizeValueType -RingBuffer::GetNumberOfBuffers() +auto +RingBuffer::GetNumberOfBuffers() -> SizeValueType { return static_cast::SizeValueType>(this->m_PointerVector.size()); } @@ -197,8 +197,8 @@ RingBuffer::SetNumberOfBuffers(SizeValueType n) // GetOffsetBufferIndex // template -typename RingBuffer::OffsetValueType -RingBuffer::GetOffsetBufferIndex(OffsetValueType offset) +auto +RingBuffer::GetOffsetBufferIndex(OffsetValueType offset) -> OffsetValueType { OffsetValueType moddedOffset = itk::Math::abs(offset) % this->GetNumberOfBuffers(); auto signedHeadIndex = static_cast(m_HeadIndex); diff --git a/Modules/Video/Core/include/itkVideoSource.hxx b/Modules/Video/Core/include/itkVideoSource.hxx index 202b487bc81..f173b5252da 100644 --- a/Modules/Video/Core/include/itkVideoSource.hxx +++ b/Modules/Video/Core/include/itkVideoSource.hxx @@ -54,8 +54,8 @@ VideoSource::PrintSelf(std::ostream & os, Indent indent) con // GetOutput() // template -typename VideoSource::OutputVideoStreamType * -VideoSource::GetOutput() +auto +VideoSource::GetOutput() -> OutputVideoStreamType * { // Make sure there is at least 1 output if (this->GetNumberOfOutputs() < 1) diff --git a/Modules/Video/Core/include/itkVideoStream.hxx b/Modules/Video/Core/include/itkVideoStream.hxx index 3f19997b084..af613ce9e08 100644 --- a/Modules/Video/Core/include/itkVideoStream.hxx +++ b/Modules/Video/Core/include/itkVideoStream.hxx @@ -219,8 +219,9 @@ VideoStream::SetFrameNumberOfComponentsPerPixel(SizeValueType frameN } template -const typename VideoStream::NumberOfComponentsPerPixelType & +auto VideoStream::GetFrameNumberOfComponentsPerPixel(SizeValueType frameNumber) const + -> const NumberOfComponentsPerPixelType & { return const_cast(this)->m_NumberOfComponentsPerPixelCache[frameNumber]; } @@ -358,8 +359,8 @@ VideoStream::SetFrame(SizeValueType frameNumber, FramePointer frame) template -typename VideoStream::FrameType * -VideoStream::GetFrame(SizeValueType frameNumber) +auto +VideoStream::GetFrame(SizeValueType frameNumber) -> FrameType * { // Fetch the frame @@ -370,8 +371,8 @@ VideoStream::GetFrame(SizeValueType frameNumber) template -const typename VideoStream::FrameType * -VideoStream::GetFrame(SizeValueType frameNumber) const +auto +VideoStream::GetFrame(SizeValueType frameNumber) const -> const FrameType * { typename BufferType::ElementPointer element = m_DataObjectBuffer->GetBufferContents(frameNumber); FrameConstPointer frame = dynamic_cast(element.GetPointer()); diff --git a/Modules/Video/IO/include/itkVideoFileReader.hxx b/Modules/Video/IO/include/itkVideoFileReader.hxx index 07716939d13..e074a94f129 100644 --- a/Modules/Video/IO/include/itkVideoFileReader.hxx +++ b/Modules/Video/IO/include/itkVideoFileReader.hxx @@ -116,8 +116,8 @@ VideoFileReader::UpdateOutputInformation() } template -typename VideoFileReader::FrameOffsetType -VideoFileReader::GetCurrentPositionFrame() +auto +VideoFileReader::GetCurrentPositionFrame() -> FrameOffsetType { if (m_VideoIO.IsNull()) { @@ -127,8 +127,8 @@ VideoFileReader::GetCurrentPositionFrame() } template -typename VideoFileReader::TemporalRatioType -VideoFileReader::GetCurrentPositionRatio() +auto +VideoFileReader::GetCurrentPositionRatio() -> TemporalRatioType { if (m_VideoIO.IsNull()) { @@ -138,8 +138,8 @@ VideoFileReader::GetCurrentPositionRatio() } template -typename VideoFileReader::TemporalRatioType -VideoFileReader::GetCurrentPositionMSec() +auto +VideoFileReader::GetCurrentPositionMSec() -> TemporalRatioType { if (m_VideoIO.IsNull()) { @@ -149,8 +149,8 @@ VideoFileReader::GetCurrentPositionMSec() } template -typename VideoFileReader::FrameOffsetType -VideoFileReader::GetNumberOfFrames() +auto +VideoFileReader::GetNumberOfFrames() -> FrameOffsetType { if (m_VideoIO.IsNull()) { @@ -160,8 +160,8 @@ VideoFileReader::GetNumberOfFrames() } template -typename VideoFileReader::TemporalRatioType -VideoFileReader::GetFramesPerSecond() +auto +VideoFileReader::GetFramesPerSecond() -> TemporalRatioType { if (m_VideoIO.IsNull()) { diff --git a/Modules/Video/IO/include/itkVideoFileWriter.hxx b/Modules/Video/IO/include/itkVideoFileWriter.hxx index 2924894cfc1..5553866cedf 100644 --- a/Modules/Video/IO/include/itkVideoFileWriter.hxx +++ b/Modules/Video/IO/include/itkVideoFileWriter.hxx @@ -56,8 +56,8 @@ VideoFileWriter::SetInput(const VideoStreamType * input) } template -const typename VideoFileWriter::VideoStreamType * -VideoFileWriter::GetInput() +auto +VideoFileWriter::GetInput() -> const VideoStreamType * { if (this->GetNumberOfInputs() < 1) {