Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkDerivativeOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace itk
using DerivativeOperatorType = itk::DerivativeOperator<float, 2>;
DerivativeOperatorType derivativeOperator;
derivativeOperator.SetDirection(0); // X dimension
auto radius = itk::Size<2>::Filled(1); // A radius of 1 in both dimensions is a 3x3 operator
constexpr auto radius = itk::Size<2>::Filled(1); // A radius of 1 in both dimensions is a 3x3 operator
derivativeOperator.CreateToRadius(radius);
\endcode
* and creates a kernel that looks like:
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkLaplacianOperator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ LaplacianOperator<TPixel, VDimension, TAllocator>::GenerateCoefficients() -> Coe

// Here we set the radius to 1's, here the
// operator is 3x3 for 2D, 3x3x3 for 3D.
auto r = SizeType::Filled(1);
constexpr auto r = SizeType::Filled(1);
this->SetRadius(r);

// Create a vector of the correct size to hold the coefficients.
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkSobelOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace itk
* 1) Set the direction by calling \code SetDirection \endcode
* 2) call
\code
auto radius = itk::Size<2>::Filled(1);
constexpr auto radius = itk::Size<2>::Filled(1);
sobelOperator.CreateToRadius(radius);
\endcode
* 3) You may optionally scale the coefficients of this operator using the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class ITK_TEMPLATE_EXPORT WindowedSincInterpolateImageFunction : public Interpol
SizeType
GetRadius() const override
{
auto radius = SizeType::Filled(VRadius);
constexpr auto radius = SizeType::Filled(VRadius);
return radius;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ WindowedSincInterpolateImageFunction<TInputImage, VRadius, TWindowFunction, TBou
}

// Set the radius for the neighborhood
auto radius = Size<ImageDimension>::Filled(VRadius);
constexpr auto radius = Size<ImageDimension>::Filled(VRadius);

// Initialize the neighborhood
IteratorType it(radius, image, image->GetBufferedRegion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ BSplineDeformableTransform<TParametersValueType, VDimension, VSplineOrder>::Comp
// Zero all components of jacobian
jacobian.SetSize(SpaceDimension, this->GetNumberOfParameters());
jacobian.Fill(0.0);
auto supportSize = SizeType::Filled(SplineOrder + 1);
constexpr auto supportSize = SizeType::Filled(SplineOrder + 1);

ContinuousIndexType index =
this->m_CoefficientImages[0]
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Transform/include/itkBSplineTransform.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ BSplineTransform<TParametersValueType, VDimension, VSplineOrder>::BSplineTransfo

DirectionType meshDirection;
meshDirection.SetIdentity();
auto meshSize = MeshSizeType::Filled(1);
constexpr auto meshSize = MeshSizeType::Filled(1);

this->m_FixedParameters.SetSize(VDimension * (VDimension + 3));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ typename PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>::ThreadDataSt
using FaceCalculatorType = typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>;
using FaceListType = typename FaceCalculatorType::FaceListType;

auto radius = InputImageType::SizeType::Filled(1);
constexpr auto radius = InputImageType::SizeType::Filled(1);

if (m_NumIndependentComponents != 1)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ ContourDirectedMeanDistanceImageFilter<TInputImage1, TInputImage2>::ThreadedGene
InputImage1ConstPointer input = this->GetInput();

// Find the data-set boundary "faces"
auto radius = SizeType::Filled(1);
constexpr auto radius = SizeType::Filled(1);

using FaceListType = typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImage1Type>::FaceListType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ FastMarchingImageFilterBase<TInput, TOutput>::FastMarchingImageFilterBase()
m_StartIndex.Fill(0);
m_LastIndex.Fill(0);

auto outputSize = OutputSizeType::Filled(16);
constexpr auto outputSize = OutputSizeType::Filled(16);

NodeType outputIndex{};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ CannyEdgeDetectionImageFilter<TInputImage, TOutputImage>::ThreadedCompute2ndDeri
typename OutputImageType::Pointer input = m_GaussianFilter->GetOutput();

// Set iterator radius
auto radius = Size<ImageDimension>::Filled(1);
constexpr auto radius = Size<ImageDimension>::Filled(1);

// Find the data-set boundary "faces"
NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TInputImage> bC;
Expand Down Expand Up @@ -320,7 +320,7 @@ CannyEdgeDetectionImageFilter<TInputImage, TOutputImage>::FollowEdge(IndexType
ListNodeType * node;

// Assign iterator radius
auto radius = Size<ImageDimension>::Filled(1);
constexpr auto radius = Size<ImageDimension>::Filled(1);

ConstNeighborhoodIterator<TOutputImage> oit(
radius, multiplyImageFilterOutput, multiplyImageFilterOutput->GetRequestedRegion());
Expand Down Expand Up @@ -395,7 +395,7 @@ CannyEdgeDetectionImageFilter<TInputImage, TOutputImage>::ThreadedCompute2ndDeri
typename InputImageType::Pointer output = m_UpdateBuffer1;

// Set iterator radius
auto radius = Size<ImageDimension>::Filled(1);
constexpr auto radius = Size<ImageDimension>::Filled(1);

// Find the data-set boundary "faces"
NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TInputImage> bC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ MaskFeaturePointSelectionFilter<TImage, TMask, TFeatures>::GenerateData()
if (m_ComputeStructureTensors)
{
// tensor calculations access points in 2 X m_BlockRadius + 1 radius
auto onesSize = SizeType::Filled(1);
constexpr auto onesSize = SizeType::Filled(1);
// Define the area in which tensors are going to be computed.
const SizeType blockSize = m_BlockRadius + m_BlockRadius + onesSize;
safeIndex += blockSize;
Expand Down Expand Up @@ -230,7 +230,7 @@ MaskFeaturePointSelectionFilter<TImage, TMask, TFeatures>::GenerateData()

Matrix<SpacePrecisionType, ImageDimension, 1> gradI; // vector declared as column matrix

auto radius = SizeType::Filled(1); // iterate over neighbourhood of a voxel
constexpr auto radius = SizeType::Filled(1); // iterate over neighbourhood of a voxel

RegionType center;
center.SetSize(radius);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ AttributeMorphologyBaseImageFilter<TInputImage, TOutputImage, TAttribute, TFunct

SizeValueType buffsize = output->GetRequestedRegion().GetNumberOfPixels();

auto kernelRadius = SizeType::Filled(1);
constexpr auto kernelRadius = SizeType::Filled(1);
using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TInputImage>;
FaceCalculatorType faceCalculator;
typename FaceCalculatorType::FaceListType faceList =
Expand Down
2 changes: 1 addition & 1 deletion Modules/Numerics/FEM/include/itkFEMSolver.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ Solver<VDimension>::InitializeInterpolationGrid(const InterpolationGridSizeType
// Set the interpolation grid (image) size, origin and spacing
// from the given vectors, so that physical point of v1 is (0,0,0) and
// physical point v2 is (size[0],size[1],size[2]).
auto image_size = InterpolationGridSizeType::Filled(1);
constexpr auto image_size = InterpolationGridSizeType::Filled(1);
for (unsigned int i = 0; i < FEMDimension; ++i)
{
image_size[i] = size[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ TimeVaryingBSplineVelocityFieldImageRegistrationMethod<TFixedImage,
RealType spatialNorm{};
RealType spatioTemporalNorm{};

auto radius = TimeVaryingVelocityFieldType::SizeType::Filled(1);
constexpr auto radius = TimeVaryingVelocityFieldType::SizeType::Filled(1);

using FaceCalculatorType = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TimeVaryingVelocityFieldType>;
FaceCalculatorType faceCalculator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ TimeVaryingVelocityFieldImageRegistrationMethodv4<TFixedImage,
RealType spatialNorm{};
RealType spatioTemporalNorm{};

auto radius = TimeVaryingVelocityFieldType::SizeType::Filled(1);
constexpr auto radius = TimeVaryingVelocityFieldType::SizeType::Filled(1);

using FaceCalculatorType = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TimeVaryingVelocityFieldType>;
FaceCalculatorType faceCalculator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ConnectedComponentFunctorImageFilter<TInputImage, TOutputImage, TFunctor, TMaskI
using InputNeighborhoodIteratorType = ConstShapedNeighborhoodIterator<TInputImage>;
using OutputNeighborhoodIteratorType = ConstShapedNeighborhoodIterator<TOutputImage>;

auto kernelRadius = SizeType::Filled(1);
constexpr auto kernelRadius = SizeType::Filled(1);

InputNeighborhoodIteratorType init(kernelRadius, input, output->GetRequestedRegion());
OutputNeighborhoodIteratorType onit(kernelRadius, output, output->GetRequestedRegion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ SLICImageFilter<TInputImage, TOutputImage, TDistancePixel>::ThreadedPerturbClust
unsigned long stride[ImageDimension];


auto searchRadius = InputImageType::SizeType::Filled(1);
constexpr auto searchRadius = InputImageType::SizeType::Filled(1);


using NeighborhoodType = ConstNeighborhoodIterator<TInputImage>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ MorphologicalWatershedFromMarkersImageFilter<TInputImage, TLabelImage>::Generate
MapType fah;

// the radius which will be used for all the shaped iterators
auto radius = Size<ImageDimension>::Filled(1);
constexpr auto radius = Size<ImageDimension>::Filled(1);

// iterator for the marker image
using MarkerIteratorType = ConstShapedNeighborhoodIterator<LabelImageType>;
Expand Down