Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
13aadd7
STYLE: Default default-constructor of ConstantBoundaryCondition
N-Dekker Feb 16, 2023
0c4de3f
STYLE: Default default-constructor of CompensatedSummation
N-Dekker Feb 16, 2023
4812c9f
COMP: Fix warning: unused variable 'compensatedSum' [-Wunused-variable]
N-Dekker Feb 17, 2023
222f049
STYLE: Default default-constructor of SpatialFunction classes
N-Dekker Feb 16, 2023
7dad3a3
STYLE: Default default-constructor of Image classes
N-Dekker Feb 16, 2023
d8ed914
STYLE: Default default-constructor of ImageRandom ConstIterator classes
N-Dekker Feb 16, 2023
38f4584
STYLE: Default default-constructor of ConstNeighborhoodIterator
N-Dekker Feb 16, 2023
b93358c
STYLE: Default default-constructor ImageVectorOptimizerParametersHelper
N-Dekker Feb 16, 2023
7e6d14e
STYLE: Default default-constructor of ImportImageContainer and Filter
N-Dekker Feb 16, 2023
f752fc4
STYLE: Default default-constructor of MinimumMaximumImageCalculator
N-Dekker Feb 16, 2023
5a200f9
STYLE: Default default-constructor of ObjectStore and MemoryBlock
N-Dekker Feb 16, 2023
5918bdf
STYLE: Default default-constructor of PointSet
N-Dekker Feb 16, 2023
76937ea
STYLE: Default default-constructor of PriorityQueueContainer
N-Dekker Feb 16, 2023
3de9994
STYLE: Default default-constructor of RegularizedHeavisideStepFunction
N-Dekker Feb 16, 2023
8e7a0de
STYLE: Default default-constructor of ThreadedImageRegionPartitioner
N-Dekker Feb 16, 2023
dca046a
STYLE: Default default-constructor of VariableLengthVector
N-Dekker Feb 16, 2023
d5fa8ae
STYLE: Default default-constructor of Versor
N-Dekker Feb 16, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ class ITK_TEMPLATE_EXPORT BinaryThresholdSpatialFunction
Evaluate(const InputType & point) const override;

protected:
BinaryThresholdSpatialFunction();
BinaryThresholdSpatialFunction() = default;
~BinaryThresholdSpatialFunction() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;

FunctionOutputType m_LowerThreshold{};
FunctionOutputType m_UpperThreshold{};
FunctionOutputType m_LowerThreshold{ NumericTraits<FunctionOutputType>::NonpositiveMin() };
FunctionOutputType m_UpperThreshold{ NumericTraits<FunctionOutputType>::max() };

typename FunctionType::Pointer m_Function{};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@

namespace itk
{
template <typename TFunction>
BinaryThresholdSpatialFunction<TFunction>::BinaryThresholdSpatialFunction()
{
m_LowerThreshold = NumericTraits<FunctionOutputType>::NonpositiveMin();
m_UpperThreshold = NumericTraits<FunctionOutputType>::max();
m_Function = nullptr;
}

template <typename TFunction>
void
Expand Down
6 changes: 3 additions & 3 deletions Modules/Core/Common/include/itkCompensatedSummation.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ITK_TEMPLATE_EXPORT CompensatedSummation
using Self = CompensatedSummation;

/** Constructors. */
CompensatedSummation();
CompensatedSummation() = default;
CompensatedSummation(FloatType value);

/** Copy constructor. */
Expand Down Expand Up @@ -120,8 +120,8 @@ class ITK_TEMPLATE_EXPORT CompensatedSummation
explicit operator FloatType() const;

private:
AccumulateType m_Sum;
AccumulateType m_Compensation;
AccumulateType m_Sum{};
AccumulateType m_Compensation{};

// Maybe support more types in the future with template specialization.
#ifdef ITK_USE_CONCEPT_CHECKING
Expand Down
7 changes: 0 additions & 7 deletions Modules/Core/Common/include/itkCompensatedSummation.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ CompensatedSummationAddElement(TFloat & compensation, TFloat & sum, const TFloat
# endif // _MSC_VER
#endif // not itkCompensatedSummation_cxx

template <typename TFloat>
CompensatedSummation<TFloat>::CompensatedSummation()
: m_Sum(NumericTraits<AccumulateType>::ZeroValue())
, m_Compensation(NumericTraits<AccumulateType>::ZeroValue())
{}


template <typename TFloat>
CompensatedSummation<TFloat>::CompensatedSummation(const TFloat value)
: m_Sum(value)
Expand Down
10 changes: 5 additions & 5 deletions Modules/Core/Common/include/itkConstNeighborhoodIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIterator
using ImageBoundaryConditionConstPointerType = const ImageBoundaryCondition<ImageType, OutputImageType> *;

/** Default constructor */
ConstNeighborhoodIterator();
ConstNeighborhoodIterator() = default;

/** Virtual destructor */
~ConstNeighborhoodIterator() override = default;
Expand Down Expand Up @@ -612,11 +612,14 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIterator
* within the buffer. */
OffsetType m_WrapOffset{ { 0 } };

/** Default boundary condition. */
TBoundaryCondition m_InternalBoundaryCondition{};

/** Pointer to the actual boundary condition that will be used.
* By default this points to m_BoundaryCondition, but
* OverrideBoundaryCondition allows a user to point this variable an external
* boundary condition. */
ImageBoundaryConditionPointerType m_BoundaryCondition{};
ImageBoundaryConditionPointerType m_BoundaryCondition{ &m_InternalBoundaryCondition };

/** Denotes which of the iterators dimensional sides spill outside
* region of interest boundaries. By default `false` for each dimension. */
Expand All @@ -636,9 +639,6 @@ class ITK_TEMPLATE_EXPORT ConstNeighborhoodIterator
/** Upper threshold of in-bounds loop counter values. */
IndexType m_InnerBoundsHigh{};

/** Default boundary condition. */
TBoundaryCondition m_InternalBoundaryCondition{};

/** Does the specified region need to worry about boundary conditions? */
bool m_NeedToUseBoundaryCondition{ false };

Expand Down
6 changes: 0 additions & 6 deletions Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,6 @@ ConstNeighborhoodIterator<TImage, TBoundaryCondition>::GetBoundingBoxAsImageRegi
return ans;
}

template <typename TImage, typename TBoundaryCondition>
ConstNeighborhoodIterator<TImage, TBoundaryCondition>::ConstNeighborhoodIterator()
{
m_BoundaryCondition = &m_InternalBoundaryCondition;
}

template <typename TImage, typename TBoundaryCondition>
ConstNeighborhoodIterator<TImage, TBoundaryCondition>::ConstNeighborhoodIterator(const Self & orig)
: Neighborhood<InternalPixelType *, Dimension>(orig)
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkConstantBoundaryCondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ITK_TEMPLATE_EXPORT ConstantBoundaryCondition : public ImageBoundaryCondit
static constexpr unsigned int ImageDimension = Superclass::ImageDimension;

/** Default constructor. */
ConstantBoundaryCondition();
ConstantBoundaryCondition() = default;

/** Utility for printing the boundary condition. */
void
Expand Down
7 changes: 0 additions & 7 deletions Modules/Core/Common/include/itkConstantBoundaryCondition.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
namespace itk
{

template <typename TInputImage, typename TOutputImage>
ConstantBoundaryCondition<TInputImage, TOutputImage>::ConstantBoundaryCondition()
{
OutputPixelType p{};
m_Constant = NumericTraits<OutputPixelType>::ZeroValue(p);
}

template <typename TInputImage, typename TOutputImage>
typename ConstantBoundaryCondition<TInputImage, TOutputImage>::OutputPixelType
ConstantBoundaryCondition<TInputImage, TOutputImage>::operator()(const OffsetType &,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ITK_TEMPLATE_EXPORT EllipsoidInteriorExteriorSpatialFunction
Evaluate(const InputType & position) const override;

protected:
EllipsoidInteriorExteriorSpatialFunction();
EllipsoidInteriorExteriorSpatialFunction() = default;
~EllipsoidInteriorExteriorSpatialFunction() override = default;

void
Expand All @@ -92,7 +92,7 @@ class ITK_TEMPLATE_EXPORT EllipsoidInteriorExteriorSpatialFunction
InputType m_Center{};

/** The axes lengths of the ellipsoid. */
InputType m_Axes{};
InputType m_Axes{ MakeFilled<InputType>(1.0f) };

/** The orientation vectors (must be orthogonal) of the ellipsoid axes. */
OrientationType m_Orientations{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@

namespace itk
{
template <unsigned int VDimension, typename TInput>
EllipsoidInteriorExteriorSpatialFunction<VDimension, TInput>::EllipsoidInteriorExteriorSpatialFunction()
{
m_Axes.Fill(1.0f); // Lengths of ellipsoid axes.
m_Center.Fill(0.0f); // Origin of ellipsoid
}

template <unsigned int VDimension, typename TInput>
auto
EllipsoidInteriorExteriorSpatialFunction<VDimension, TInput>::Evaluate(const InputType & position) const -> OutputType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeSpatialFunction : public SpatialFunc
itkGetConstMacro(Direction, unsigned int);

protected:
GaussianDerivativeSpatialFunction();
GaussianDerivativeSpatialFunction() = default;
~GaussianDerivativeSpatialFunction() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
Expand All @@ -101,13 +101,13 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeSpatialFunction : public SpatialFunc
mutable unsigned int m_Direction{};

/** The standard deviation in each direction. */
ArrayType m_Sigma{};
ArrayType m_Sigma{ ArrayType::Filled(1.0) };

/** The mean in each direction. */
ArrayType m_Mean{};

/** A scale factor multiplied by the true value of the Gaussian. */
double m_Scale{};
double m_Scale{ 1.0 };

/** Whether or not to normalize the Gaussian. */
bool m_Normalized{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@

namespace itk
{
template <typename TOutput, unsigned int VImageDimension, typename TInput>
GaussianDerivativeSpatialFunction<TOutput, VImageDimension, TInput>::GaussianDerivativeSpatialFunction()
{
m_Mean = ArrayType::Filled(0.0);
m_Sigma = ArrayType::Filled(1.0);
m_Scale = 1.0;
m_Normalized = false;
m_Direction = 0;
}

template <typename TOutput, unsigned int VImageDimension, typename TInput>
auto
GaussianDerivativeSpatialFunction<TOutput, VImageDimension, TInput>::Evaluate(const TInput & position) const
Expand Down
6 changes: 3 additions & 3 deletions Modules/Core/Common/include/itkGaussianSpatialFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ class ITK_TEMPLATE_EXPORT GaussianSpatialFunction : public SpatialFunction<TOutp
itkGetConstMacro(Mean, ArrayType);

protected:
GaussianSpatialFunction();
GaussianSpatialFunction() = default;
~GaussianSpatialFunction() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;

private:
ArrayType m_Sigma{};
ArrayType m_Sigma{ ArrayType::Filled(5.0) };

ArrayType m_Mean{};
ArrayType m_Mean{ ArrayType::Filled(10.0) };

double m_Scale{ 1.0 };

Expand Down
8 changes: 0 additions & 8 deletions Modules/Core/Common/include/itkGaussianSpatialFunction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@

namespace itk
{
template <typename TOutput, unsigned int VImageDimension, typename TInput>
GaussianSpatialFunction<TOutput, VImageDimension, TInput>::GaussianSpatialFunction()

{
m_Mean = ArrayType::Filled(10.0);
m_Sigma = ArrayType::Filled(5.0);
}

template <typename TOutput, unsigned int VImageDimension, typename TInput>
auto
GaussianSpatialFunction<TOutput, VImageDimension, TInput>::Evaluate(const TInput & position) const -> OutputType
Expand Down
4 changes: 2 additions & 2 deletions Modules/Core/Common/include/itkImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class ITK_TEMPLATE_EXPORT Image : public ImageBase<VImageDimension>
}

protected:
Image();
Image() = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
void
Expand All @@ -393,7 +393,7 @@ class ITK_TEMPLATE_EXPORT Image : public ImageBase<VImageDimension>

private:
/** Memory for the current buffer. */
PixelContainerPointer m_Buffer{};
PixelContainerPointer m_Buffer{ PixelContainer::New() };
};
} // end namespace itk

Expand Down
7 changes: 0 additions & 7 deletions Modules/Core/Common/include/itkImage.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@
namespace itk
{

template <typename TPixel, unsigned int VImageDimension>
Image<TPixel, VImageDimension>::Image()
{
m_Buffer = PixelContainer::New();
}


template <typename TPixel, unsigned int VImageDimension>
void
Image<TPixel, VImageDimension>::Allocate(bool initializePixels)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithIndex : public ImageConstI
using typename Superclass::SizeValueType;

/** Default constructor. Needed since we provide a cast constructor. */
ImageRandomConstIteratorWithIndex();
ImageRandomConstIteratorWithIndex() = default;
~ImageRandomConstIteratorWithIndex() override = default;

/** Constructor establishes an iterator to walk a particular image and a
Expand Down Expand Up @@ -224,7 +224,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithIndex : public ImageConstI
RandomJump();

using GeneratorPointer = typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer;
GeneratorPointer m_Generator{};
GeneratorPointer m_Generator{ Statistics::MersenneTwisterRandomVariateGenerator::New() };
SizeValueType m_NumberOfSamplesRequested{};
SizeValueType m_NumberOfSamplesDone{};
SizeValueType m_NumberOfPixelsInRegion{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@
namespace itk
{

template <typename TImage>
ImageRandomConstIteratorWithIndex<TImage>::ImageRandomConstIteratorWithIndex()
: ImageConstIteratorWithIndex<TImage>()
{
m_NumberOfPixelsInRegion = 0L;
m_NumberOfSamplesRequested = 0L;
m_NumberOfSamplesDone = 0L;
m_Generator = Statistics::MersenneTwisterRandomVariateGenerator::New();
}

template <typename TImage>
ImageRandomConstIteratorWithIndex<TImage>::ImageRandomConstIteratorWithIndex(const ImageType * ptr,
const RegionType & region)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithOnlyIndex : public ImageCo
using typename Superclass::SizeValueType;

/** Default constructor. Needed since we provide a cast constructor. */
ImageRandomConstIteratorWithOnlyIndex();
ImageRandomConstIteratorWithOnlyIndex() = default;
~ImageRandomConstIteratorWithOnlyIndex() override = default;

/** Constructor establishes an iterator to walk a particular image and a
Expand Down Expand Up @@ -226,7 +226,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomConstIteratorWithOnlyIndex : public ImageCo
RandomJump();

using GeneratorPointer = typename Statistics::MersenneTwisterRandomVariateGenerator::Pointer;
GeneratorPointer m_Generator{};
GeneratorPointer m_Generator{ Statistics::MersenneTwisterRandomVariateGenerator::New() };
SizeValueType m_NumberOfSamplesRequested{};
SizeValueType m_NumberOfSamplesDone{};
SizeValueType m_NumberOfPixelsInRegion{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@
namespace itk
{

template <typename TImage>
ImageRandomConstIteratorWithOnlyIndex<TImage>::ImageRandomConstIteratorWithOnlyIndex()
: ImageConstIteratorWithOnlyIndex<TImage>()
{
m_NumberOfPixelsInRegion = 0L;
m_NumberOfSamplesRequested = 0L;
m_NumberOfSamplesDone = 0L;
m_Generator = Statistics::MersenneTwisterRandomVariateGenerator::New();
}

template <typename TImage>
ImageRandomConstIteratorWithOnlyIndex<TImage>::ImageRandomConstIteratorWithOnlyIndex(const ImageType * ptr,
const RegionType & region)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class ITK_TEMPLATE_EXPORT ImageRandomNonRepeatingConstIteratorWithIndex : public
using typename Superclass::SizeValueType;

/** Default constructor. Needed since we provide a cast constructor. */
ImageRandomNonRepeatingConstIteratorWithIndex();
ImageRandomNonRepeatingConstIteratorWithIndex() = default;
~ImageRandomNonRepeatingConstIteratorWithIndex() override { delete m_Permutation; }

/** Constructor establishes an iterator to walk a particular image and a
Expand Down Expand Up @@ -343,10 +343,10 @@ class ITK_TEMPLATE_EXPORT ImageRandomNonRepeatingConstIteratorWithIndex : public
void
UpdatePosition();

SizeValueType m_NumberOfSamplesRequested;
SizeValueType m_NumberOfSamplesDone;
SizeValueType m_NumberOfPixelsInRegion;
RandomPermutation * m_Permutation;
SizeValueType m_NumberOfSamplesRequested{};
SizeValueType m_NumberOfSamplesDone{};
SizeValueType m_NumberOfPixelsInRegion{};
RandomPermutation * m_Permutation{};
};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@
namespace itk
{

template <typename TImage>
ImageRandomNonRepeatingConstIteratorWithIndex<TImage>::ImageRandomNonRepeatingConstIteratorWithIndex()
: ImageConstIteratorWithIndex<TImage>()
{
m_NumberOfPixelsInRegion = 0L;
m_NumberOfSamplesRequested = 0L;
m_NumberOfSamplesDone = 0L;
m_Permutation = nullptr;
}

template <typename TImage>
ImageRandomNonRepeatingConstIteratorWithIndex<TImage>::ImageRandomNonRepeatingConstIteratorWithIndex(
const ImageType * ptr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ITK_TEMPLATE_EXPORT ImageVectorOptimizerParametersHelper : public Optimize
using typename Superclass::CommonContainerType;

/** Default constructor. */
ImageVectorOptimizerParametersHelper();
ImageVectorOptimizerParametersHelper() = default;

/** Set a new data pointer for *both* the Array and parameter image,
* pointing both to a different memory block.
Expand Down
Loading