From df57675ac2b934e7a869592b9d945c0ccd29c792 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Sat, 4 Mar 2023 11:55:29 +0100 Subject: [PATCH] STYLE: Add in-class `{}` member initializers having trailing comments Previous commits that added `{}` initializers to data members by means of regular expressions had overlooked member declarations that had a trailing comment. Follow-up to pull request https://github.com/InsightSoftwareConsortium/ITK/pull/3851 commit 5e2c49f9eb80e78903ce8f9fd2b5952062653cab "STYLE: Add in-class `{}` member initializers to objects created by New()" --- .../Deprecated/include/itkTreeIteratorBase.h | 2 +- Modules/Core/Common/include/itkBoundingBox.h | 4 +-- Modules/Core/Common/include/itkDataObject.h | 4 +-- .../Common/include/itkImageConstIterator.h | 6 ++-- .../include/itkImageRegionConstIterator.h | 6 ++-- .../itkImageRegionReverseConstIterator.h | 4 +-- .../include/itkImageReverseConstIterator.h | 6 ++-- .../include/itkImageScanlineConstIterator.h | 4 +-- .../Common/include/itkLineConstIterator.h | 2 +- Modules/Core/Common/include/itkOctree.h | 4 +-- .../itkPhasedArray3DSpecialCoordinatesImage.h | 4 +-- .../Core/Common/include/itkSmapsFileParser.h | 4 +-- .../GPUCommon/include/itkGPUContextManager.h | 2 +- .../GPUCommon/include/itkGPUDataManager.h | 2 +- .../include/itkGPUImageDataManager.h | 4 +-- .../itkBSplineInterpolateImageFunction.h | 22 +++++++------- .../include/itkAutomaticTopologyMeshSource.h | 2 +- .../Mesh/include/itkBinaryMask3DMeshSource.h | 2 +- .../itkTriangleMeshToBinaryImageFilter.h | 2 +- .../include/itkGeometricalQuadEdge.h | 4 +-- .../Core/QuadEdgeMesh/include/itkQuadEdge.h | 4 +-- .../include/itkQuadEdgeMeshBaseIterator.h | 8 ++--- ...EdgeMeshEulerOperatorSplitVertexFunction.h | 2 +- .../TestKernel/include/itkRandomImageSource.h | 12 ++++---- .../Transform/include/itkScaleTransform.h | 2 +- .../include/itkTranslationTransform.h | 4 +-- .../itkInverseDisplacementFieldImageFilter.h | 16 +++++----- .../itkTransformToDisplacementFieldFilter.h | 10 +++---- ...tkSignedDanielssonDistanceMapImageFilter.h | 6 ++-- .../itkCannyEdgeDetectionImageFilter.h | 4 +-- .../itkGradientVectorFlowImageFilter.h | 20 ++++++------- .../itkBSplineResampleImageFilterBase.h | 14 ++++----- .../include/itkInterpolateImagePointsFilter.h | 4 +-- .../include/itkResampleImageFilter.h | 24 +++++++-------- .../ImageGrid/include/itkWarpImageFilter.h | 4 +-- .../itkPeakSignalToNoiseRatioCalculator.h | 4 +-- .../include/itkGenerateImageSource.h | 2 +- .../include/itkImageMomentsCalculator.h | 16 +++++----- .../Filtering/Path/include/itkChainCodePath.h | 4 +-- .../Path/include/itkChainCodePath2D.h | 2 +- Modules/Filtering/Path/include/itkPath.h | 4 +-- .../Path/include/itkPathConstIterator.h | 2 +- Modules/IO/IPL/include/itkIPLFileNameList.h | 4 +-- .../include/itkArchetypeSeriesFileNames.h | 4 +-- .../IO/ImageBase/include/itkImageFileReader.h | 4 +-- Modules/IO/MRC/include/itkMRCHeaderObject.h | 4 +-- .../IO/MeshBase/include/itkMeshFileReader.h | 6 ++-- .../IO/MeshBase/include/itkMeshFileWriter.h | 8 ++--- Modules/IO/MeshOBJ/include/itkOBJMeshIO.h | 4 +-- Modules/IO/MeshOFF/include/itkOFFMeshIO.h | 4 +-- Modules/IO/XML/include/itkXMLFile.h | 4 +-- ...tFourierReconstructionImageToImageFilter.h | 30 +++++++++---------- ...ltiphaseDenseFiniteDifferenceImageFilter.h | 2 +- .../FEM/include/itkFEMImageMetricLoad.h | 2 +- .../FEM/include/itkFEMLoadElementBase.h | 2 +- .../include/itkGaussianMembershipFunction.h | 4 +-- ...itkMahalanobisDistanceMembershipFunction.h | 4 +-- .../include/itkMahalanobisDistanceMetric.h | 4 +-- .../FEM/include/itkFEMRegistrationFilter.h | 8 ++--- .../include/itkRGBGibbsPriorFilter.h | 18 +++++------ 60 files changed, 187 insertions(+), 187 deletions(-) diff --git a/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.h b/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.h index 4b0fb760b82..ca2965967c5 100644 --- a/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.h +++ b/Modules/Compatibility/Deprecated/include/itkTreeIteratorBase.h @@ -273,7 +273,7 @@ class ITK_TEMPLATE_EXPORT TreeIteratorBase TreeIteratorBase(TTreeType * tree, const TreeNodeType * start); TreeIteratorBase(const TTreeType * tree, const TreeNodeType * start); - mutable TreeNodeType * m_Position; // Current position of the iterator + mutable TreeNodeType * m_Position{}; // Current position of the iterator mutable TreeNodeType * m_Begin{}; const TreeNodeType * m_Root{}; TTreeType * m_Tree{}; diff --git a/Modules/Core/Common/include/itkBoundingBox.h b/Modules/Core/Common/include/itkBoundingBox.h index d84661db55b..f928268b2b7 100644 --- a/Modules/Core/Common/include/itkBoundingBox.h +++ b/Modules/Core/Common/include/itkBoundingBox.h @@ -202,8 +202,8 @@ class ITK_TEMPLATE_EXPORT BoundingBox : public Object PointsContainerPointer m_CornersContainer{ PointsContainer::New() }; #endif mutable BoundsArrayType m_Bounds{}; - mutable TimeStamp m_BoundsMTime; // The last time the bounds - // were computed. + mutable TimeStamp m_BoundsMTime{}; // The last time the bounds + // were computed. }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkDataObject.h b/Modules/Core/Common/include/itkDataObject.h index a5789e83cba..97293968a14 100644 --- a/Modules/Core/Common/include/itkDataObject.h +++ b/Modules/Core/Common/include/itkDataObject.h @@ -568,8 +568,8 @@ class ITK_FORCE_EXPORT_MACRO(ITKCommon) DataObject : public Object /** When, in real time, this data was generated. */ RealTimeStamp m_RealTimeStamp{}; - bool m_ReleaseDataFlag; // Data will release after use by a filter if on - bool m_DataReleased; // Keep track of data release during pipeline execution + bool m_ReleaseDataFlag{}; // Data will release after use by a filter if on + bool m_DataReleased{}; // Keep track of data release during pipeline execution /** The maximum MTime of all upstream filters and data objects. * This does not include the MTime of this data object. */ diff --git a/Modules/Core/Common/include/itkImageConstIterator.h b/Modules/Core/Common/include/itkImageConstIterator.h index ad4a273c903..762fead6f91 100644 --- a/Modules/Core/Common/include/itkImageConstIterator.h +++ b/Modules/Core/Common/include/itkImageConstIterator.h @@ -379,11 +379,11 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator protected: // made protected so other iterators can access typename TImage::ConstWeakPointer m_Image{}; - RegionType m_Region; // region to iterate over + RegionType m_Region{}; // region to iterate over OffsetValueType m_Offset{}; - OffsetValueType m_BeginOffset; // offset to first pixel in region - OffsetValueType m_EndOffset; // offset to one pixel past last pixel in region + OffsetValueType m_BeginOffset{}; // offset to first pixel in region + OffsetValueType m_EndOffset{}; // offset to one pixel past last pixel in region const InternalPixelType * m_Buffer{}; diff --git a/Modules/Core/Common/include/itkImageRegionConstIterator.h b/Modules/Core/Common/include/itkImageRegionConstIterator.h index 7030a981898..583dea20f18 100644 --- a/Modules/Core/Common/include/itkImageRegionConstIterator.h +++ b/Modules/Core/Common/include/itkImageRegionConstIterator.h @@ -258,9 +258,9 @@ class ITK_TEMPLATE_EXPORT ImageRegionConstIterator : public ImageConstIterator m_Image; // WeakPointer has to be used here - // to avoid SmartPointer loop + WeakPointer m_Image{}; // WeakPointer has to be used here + // to avoid SmartPointer loop int m_BufferedRegionIndex[ImageType::ImageDimension]{}; int m_BufferedRegionSize[ImageType::ImageDimension]{}; typename GPUDataManager::Pointer m_GPUBufferedRegionIndex{}; diff --git a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h index a4d9cb969f4..e4d6c6a18ee 100644 --- a/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkBSplineInterpolateImageFunction.h @@ -396,17 +396,17 @@ class ITK_TEMPLATE_EXPORT BSplineInterpolateImageFunction : public InterpolateIm void ApplyMirrorBoundaryConditions(vnl_matrix & evaluateIndex, unsigned int splineOrder) const; - Iterator m_CIterator; // Iterator for - // traversing spline - // coefficients. - unsigned long m_MaxNumberInterpolationPoints; // number of - // neighborhood - // points used for - // interpolation - std::vector m_PointsToIndex; // Preallocation of - // interpolation - // neighborhood - // indices + Iterator m_CIterator{}; // Iterator for + // traversing spline + // coefficients. + unsigned long m_MaxNumberInterpolationPoints{}; // number of + // neighborhood + // points used for + // interpolation + std::vector m_PointsToIndex{}; // Preallocation of + // interpolation + // neighborhood + // indices CoefficientFilterPointer m_CoefficientFilter{}; diff --git a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h index ceac620f8db..cd393bd8aae 100644 --- a/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h +++ b/Modules/Core/Mesh/include/itkAutomaticTopologyMeshSource.h @@ -414,7 +414,7 @@ class ITK_TEMPLATE_EXPORT AutomaticTopologyMeshSource : public MeshSource GenerateOutputInformation() override; private: - SizeType m_Size; // size of the output image - SpacingType m_Spacing; // spacing - PointType m_Origin; // origin - DirectionType m_Direction; // direction + SizeType m_Size{}; // size of the output image + SpacingType m_Spacing{}; // spacing + PointType m_Origin{}; // origin + DirectionType m_Direction{}; // direction - typename TOutputImage::PixelType m_Min; // minimum possible value - typename TOutputImage::PixelType m_Max; // maximum possible value + typename TOutputImage::PixelType m_Min{}; // minimum possible value + typename TOutputImage::PixelType m_Max{}; // maximum possible value // The following variables are deprecated, and provided here just for // backward compatibility. It use is discouraged. diff --git a/Modules/Core/Transform/include/itkScaleTransform.h b/Modules/Core/Transform/include/itkScaleTransform.h index de5c5e8dbcc..68fabf81dde 100644 --- a/Modules/Core/Transform/include/itkScaleTransform.h +++ b/Modules/Core/Transform/include/itkScaleTransform.h @@ -214,7 +214,7 @@ class ITK_TEMPLATE_EXPORT ScaleTransform PrintSelf(std::ostream & os, Indent indent) const override; private: - ScaleType m_Scale; // Scales of the transformation + ScaleType m_Scale{}; // Scales of the transformation }; // class ScaleTransform diff --git a/Modules/Core/Transform/include/itkTranslationTransform.h b/Modules/Core/Transform/include/itkTranslationTransform.h index 689b0e7b1af..611042d3487 100644 --- a/Modules/Core/Transform/include/itkTranslationTransform.h +++ b/Modules/Core/Transform/include/itkTranslationTransform.h @@ -252,8 +252,8 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : public Transform diff --git a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h index 6816a9fdcc9..92de6ad6fa3 100644 --- a/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkInverseDisplacementFieldImageFilter.h @@ -195,14 +195,14 @@ class ITK_TEMPLATE_EXPORT InverseDisplacementFieldImageFilter : public ImageToIm PrepareKernelBaseSpline(); private: - SizeType m_Size; // Size of the output image - KernelTransformPointerType m_KernelTransform; // Coordinate transform to - // use - SpacingType m_OutputSpacing; // output image spacing - OriginPointType m_OutputOrigin; // output image origin - - unsigned int m_SubsamplingFactor; // factor to subsample the - // input field. + SizeType m_Size{}; // Size of the output image + KernelTransformPointerType m_KernelTransform{}; // Coordinate transform to + // use + SpacingType m_OutputSpacing{}; // output image spacing + OriginPointType m_OutputOrigin{}; // output image origin + + unsigned int m_SubsamplingFactor{}; // factor to subsample the + // input field. }; } // end namespace itk diff --git a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h index 5f72699cc1d..b5e9ae7e4f8 100644 --- a/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h +++ b/Modules/Filtering/DisplacementField/include/itkTransformToDisplacementFieldFilter.h @@ -187,11 +187,11 @@ class ITK_TEMPLATE_EXPORT TransformToDisplacementFieldFilter : public ImageSourc private: /** Member variables. */ - SizeType m_Size; // size of the output region - IndexType m_OutputStartIndex; // start index of the output region - SpacingType m_OutputSpacing; // output image spacing - OriginType m_OutputOrigin; // output image origin - DirectionType m_OutputDirection; // output image direction cosines + SizeType m_Size{}; // size of the output region + IndexType m_OutputStartIndex{}; // start index of the output region + SpacingType m_OutputSpacing{}; // output image spacing + OriginType m_OutputOrigin{}; // output image origin + DirectionType m_OutputDirection{}; // output image direction cosines bool m_UseReferenceImage{ false }; }; } // end namespace itk diff --git a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h index 1dc39df7fa0..2a7fa41b685 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h @@ -234,9 +234,9 @@ class ITK_TEMPLATE_EXPORT SignedDanielssonDistanceMapImageFilter : public ImageT private: bool m_SquaredDistance{}; bool m_UseImageSpacing{}; - bool m_InsideIsPositive; // ON is treated as inside pixels -}; // end of SignedDanielssonDistanceMapImageFilter - // class + bool m_InsideIsPositive{}; // ON is treated as inside pixels +}; // end of SignedDanielssonDistanceMapImageFilter + // class } // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h index 5538108e9e1..8a1c0e2b37d 100644 --- a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.h @@ -251,8 +251,8 @@ class ITK_TEMPLATE_EXPORT CannyEdgeDetectionImageFilter : public ImageToImageFil ArrayType m_Variance{}; ArrayType m_MaximumError{}; - OutputImagePixelType m_UpperThreshold; // should be float here? - OutputImagePixelType m_LowerThreshold; // should be float here? + OutputImagePixelType m_UpperThreshold{}; // should be float here? + OutputImagePixelType m_LowerThreshold{}; // should be float here? typename OutputImageType::Pointer m_UpdateBuffer1{}; diff --git a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h index 44f3474f19c..caccb559509 100644 --- a/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkGradientVectorFlowImageFilter.h @@ -145,22 +145,22 @@ class ITK_TEMPLATE_EXPORT GradientVectorFlowImageFilter : public ImageToImageFil private: // parameters; - double m_TimeStep; // the timestep of each - // iteration - double m_Steps[Superclass::InputImageDimension]; // set to be 1 in all - // directions in most cases - double m_NoiseLevel; // the noise level of the - // image - int m_IterationNum; // the iteration number + double m_TimeStep{}; // the timestep of each + // iteration + double m_Steps[Superclass::InputImageDimension]{}; // set to be 1 in all + // directions in most cases + double m_NoiseLevel{}; // the noise level of the + // image + int m_IterationNum{}; // the iteration number LaplacianFilterPointer m_LaplacianFilter{}; typename Superclass::InputImagePointer m_IntermediateImage{}; InternalImagePointer m_InternalImages[Superclass::InputImageDimension]{}; - InternalImagePointer m_BImage; // store the "b" value for every pixel + InternalImagePointer m_BImage{}; // store the "b" value for every pixel - typename Superclass::InputImagePointer m_CImage; // store the $c_i$ value for - // every pixel + typename Superclass::InputImagePointer m_CImage{}; // store the $c_i$ value for + // every pixel }; } // end namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h index 8b9f2ebc6cc..752211e41bf 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h +++ b/Modules/Filtering/ImageGrid/include/itkBSplineResampleImageFilterBase.h @@ -173,12 +173,12 @@ class ITK_TEMPLATE_EXPORT BSplineResampleImageFilterBase : public ImageToImageFi void PrintSelf(std::ostream & os, Indent indent) const override; - int m_SplineOrder; // User specified spline order - int m_GSize; // downsampling filter size - int m_HSize; // upsampling filter size + int m_SplineOrder{}; // User specified spline order + int m_GSize{}; // downsampling filter size + int m_HSize{}; // upsampling filter size - std::vector m_G; // downsampling filter coefficients - std::vector m_H; // upsampling filter coefficients + std::vector m_G{}; // downsampling filter coefficients + std::vector m_H{}; // upsampling filter coefficients private: /** Allocate scratch space based on image sizes. */ @@ -195,8 +195,8 @@ class ITK_TEMPLATE_EXPORT BSplineResampleImageFilterBase : public ImageToImageFi void CopyLineToScratch(ConstInputImageIterator & Iter); - std::vector m_Scratch; // temp storage for processing - // of Coefficients + std::vector m_Scratch{}; // temp storage for processing + // of Coefficients }; } // namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h index cf086c7f0e2..2fa78be2269 100644 --- a/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkInterpolateImagePointsFilter.h @@ -189,8 +189,8 @@ class ITK_TEMPLATE_EXPORT InterpolateImagePointsFilter : public ImageToImageFilt using CoordImageRegionType = typename CoordImageType::RegionType; InterpolatorPointer m_Interpolator{}; - PixelType m_DefaultPixelValue; // default pixel value if the - // point is outside the image + PixelType m_DefaultPixelValue{}; // default pixel value if the + // point is outside the image }; } // namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h index 6d1a432c502..d53756ba0c0 100644 --- a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h +++ b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.h @@ -367,18 +367,18 @@ class ITK_TEMPLATE_EXPORT ResampleImageFilter : public ImageToImageFilter GenerateOutputInformation() override; private: - SizeType m_Size; // size of the output image + SizeType m_Size{}; // size of the output image SpacingType m_Spacing{}; PointType m_Origin{}; DirectionType m_Direction{}; diff --git a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h index 357a6e9be07..59b158520b6 100644 --- a/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h +++ b/Modules/Filtering/ImageStatistics/include/itkImageMomentsCalculator.h @@ -217,14 +217,14 @@ class ITK_TEMPLATE_EXPORT ImageMomentsCalculator : public Object PrintSelf(std::ostream & os, Indent indent) const override; private: - bool m_Valid; // Have moments been computed yet? - ScalarType m_M0; // Zeroth moment - VectorType m_M1; // First moments about origin - MatrixType m_M2; // Second moments about origin - VectorType m_Cg; // Center of gravity (physical units) - MatrixType m_Cm; // Second central moments (physical) - VectorType m_Pm; // Principal moments (physical) - MatrixType m_Pa; // Principal axes (physical) + bool m_Valid{}; // Have moments been computed yet? + ScalarType m_M0{}; // Zeroth moment + VectorType m_M1{}; // First moments about origin + MatrixType m_M2{}; // Second moments about origin + VectorType m_Cg{}; // Center of gravity (physical units) + MatrixType m_Cm{}; // Second central moments (physical) + VectorType m_Pm{}; // Principal moments (physical) + MatrixType m_Pa{}; // Principal axes (physical) ImageConstPointer m_Image{}; SpatialObjectConstPointer m_SpatialObjectMask{}; diff --git a/Modules/Filtering/Path/include/itkChainCodePath.h b/Modules/Filtering/Path/include/itkChainCodePath.h index 6ac291dc763..70662429fde 100644 --- a/Modules/Filtering/Path/include/itkChainCodePath.h +++ b/Modules/Filtering/Path/include/itkChainCodePath.h @@ -157,8 +157,8 @@ class ITK_TEMPLATE_EXPORT ChainCodePath : public Path } private: - ChainCode2DType m_Chain2D; // the Freeman-encoded chain code + ChainCode2DType m_Chain2D{}; // the Freeman-encoded chain code // FreemanCode[][] implements a lookup table for converting offsets to a // Freeman code. Within each dimension, the only allowable offset values are diff --git a/Modules/Filtering/Path/include/itkPath.h b/Modules/Filtering/Path/include/itkPath.h index ea1c9eac781..2876d09ba89 100644 --- a/Modules/Filtering/Path/include/itkPath.h +++ b/Modules/Filtering/Path/include/itkPath.h @@ -127,8 +127,8 @@ class ITK_TEMPLATE_EXPORT Path : public DataObject private: // These "constants" are initialized in the constructor - OffsetType m_ZeroOffset; // = 0 for all dimensions - IndexType m_ZeroIndex; // = 0 for all dimensions + OffsetType m_ZeroOffset{}; // = 0 for all dimensions + IndexType m_ZeroIndex{}; // = 0 for all dimensions }; } // namespace itk diff --git a/Modules/Filtering/Path/include/itkPathConstIterator.h b/Modules/Filtering/Path/include/itkPathConstIterator.h index e7ea84b4bb7..756b8fe8543 100644 --- a/Modules/Filtering/Path/include/itkPathConstIterator.h +++ b/Modules/Filtering/Path/include/itkPathConstIterator.h @@ -205,7 +205,7 @@ class ITK_TEMPLATE_EXPORT PathConstIterator protected: // made protected so other iterators can access // This "constant" is initialized in the constructor - OffsetType m_ZeroOffset; // = 0 for all dimensions + OffsetType m_ZeroOffset{}; // = 0 for all dimensions /** Smart pointer to the source image. */ typename ImageType::ConstWeakPointer m_Image{}; diff --git a/Modules/IO/IPL/include/itkIPLFileNameList.h b/Modules/IO/IPL/include/itkIPLFileNameList.h index 950f124b8ae..94589e5c108 100644 --- a/Modules/IO/IPL/include/itkIPLFileNameList.h +++ b/Modules/IO/IPL/include/itkIPLFileNameList.h @@ -285,9 +285,9 @@ class ITKIOIPL_EXPORT IPLFileNameList int m_YDim{}; float m_XRes{}; float m_YRes{}; - int m_Key1; /** Key that must be matched for image to be used, + int m_Key1{}; /** Key that must be matched for image to be used, i.e. seriesNumber, extensionkey */ - int m_Key2; /** Key that must be matched for image to be used, + int m_Key2{}; /** Key that must be matched for image to be used, i.e. echoNumber */ int m_SortOrder{}; }; diff --git a/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h b/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h index ced195ed859..59fc759967d 100644 --- a/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h +++ b/Modules/IO/ImageBase/include/itkArchetypeSeriesFileNames.h @@ -121,8 +121,8 @@ class ITKIOImageBase_EXPORT ArchetypeSeriesFileNames : public Object std::string m_Archetype{}; std::vector m_Groupings{}; - StringVectorType m_FileNames; // ivar for returning by - // reference + StringVectorType m_FileNames{}; // ivar for returning by + // reference TimeStamp m_ArchetypeMTime{}; TimeStamp m_ScanTime{}; diff --git a/Modules/IO/ImageBase/include/itkImageFileReader.h b/Modules/IO/ImageBase/include/itkImageFileReader.h index 72e548d192e..079d635e40e 100644 --- a/Modules/IO/ImageBase/include/itkImageFileReader.h +++ b/Modules/IO/ImageBase/include/itkImageFileReader.h @@ -155,8 +155,8 @@ class ITK_TEMPLATE_EXPORT ImageFileReader : public ImageSource ImageIOBase::Pointer m_ImageIO{}; - bool m_UserSpecifiedImageIO; // keep track whether the - // ImageIO is user specified + bool m_UserSpecifiedImageIO{}; // keep track whether the + // ImageIO is user specified bool m_UseStreaming{}; diff --git a/Modules/IO/MRC/include/itkMRCHeaderObject.h b/Modules/IO/MRC/include/itkMRCHeaderObject.h index ef159087f7d..bb29b5e7279 100644 --- a/Modules/IO/MRC/include/itkMRCHeaderObject.h +++ b/Modules/IO/MRC/include/itkMRCHeaderObject.h @@ -270,8 +270,8 @@ class ITKIOMRC_EXPORT MRCHeaderObject : public LightObject IsOriginalHeaderBigEndian() const; /** Public available data : FIXME : NO MEMBER VARIABLES SHOULD BE PUBLIC. */ - Header m_Header; // FIXME : This should be private and - // should have Get/Set Methods. + Header m_Header{}; // FIXME : This should be private and + // should have Get/Set Methods. protected: MRCHeaderObject(); diff --git a/Modules/IO/MeshBase/include/itkMeshFileReader.h b/Modules/IO/MeshBase/include/itkMeshFileReader.h index 95df5465bce..13b56d6f836 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileReader.h +++ b/Modules/IO/MeshBase/include/itkMeshFileReader.h @@ -182,9 +182,9 @@ class ITK_TEMPLATE_EXPORT MeshFileReader : public MeshSource GenerateData() override; MeshIOBase::Pointer m_MeshIO{}; - bool m_UserSpecifiedMeshIO; // keep track whether the MeshIO is - // user specified - std::string m_FileName; // The file to be read + bool m_UserSpecifiedMeshIO{}; // keep track whether the MeshIO is + // user specified + std::string m_FileName{}; // The file to be read private: template diff --git a/Modules/IO/MeshBase/include/itkMeshFileWriter.h b/Modules/IO/MeshBase/include/itkMeshFileWriter.h index e3fd3676c5b..28188eda8c9 100644 --- a/Modules/IO/MeshBase/include/itkMeshFileWriter.h +++ b/Modules/IO/MeshBase/include/itkMeshFileWriter.h @@ -178,10 +178,10 @@ class ITK_TEMPLATE_EXPORT MeshFileWriter : public ProcessObject private: std::string m_FileName{}; MeshIOBase::Pointer m_MeshIO{}; - bool m_UserSpecifiedMeshIO; // track whether the MeshIO is - // user specified - bool m_FactorySpecifiedMeshIO; // track whether the factory - // mechanism set the MeshIO + bool m_UserSpecifiedMeshIO{}; // track whether the MeshIO is + // user specified + bool m_FactorySpecifiedMeshIO{}; // track whether the factory + // mechanism set the MeshIO bool m_UseCompression{}; bool m_FileTypeIsBINARY{}; }; diff --git a/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h b/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h index 45eb114f0e3..b2a4476bebf 100644 --- a/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h +++ b/Modules/IO/MeshOBJ/include/itkOBJMeshIO.h @@ -186,8 +186,8 @@ class ITKIOMeshOBJ_EXPORT OBJMeshIO : public MeshIOBase private: std::ifstream m_InputFile{}; - std::streampos m_PointsStartPosition; // file position for points relative to - // std::ios::beg + std::streampos m_PointsStartPosition{}; // file position for points relative to + // std::ios::beg }; } // end namespace itk diff --git a/Modules/IO/MeshOFF/include/itkOFFMeshIO.h b/Modules/IO/MeshOFF/include/itkOFFMeshIO.h index c8cf75f22df..270fbd92f45 100644 --- a/Modules/IO/MeshOFF/include/itkOFFMeshIO.h +++ b/Modules/IO/MeshOFF/include/itkOFFMeshIO.h @@ -204,8 +204,8 @@ class ITKIOMeshOFF_EXPORT OFFMeshIO : public MeshIOBase private: std::ifstream m_InputFile{}; - StreamOffsetType m_PointsStartPosition; // file position for points relative to std::ios::beg - bool m_TriangleCellType; // if all cells are triangle it is true. otherwise, it is false. + StreamOffsetType m_PointsStartPosition{}; // file position for points relative to std::ios::beg + bool m_TriangleCellType{}; // if all cells are triangle it is true. otherwise, it is false. }; } // end namespace itk diff --git a/Modules/IO/XML/include/itkXMLFile.h b/Modules/IO/XML/include/itkXMLFile.h index 786cdd9b0d1..483fb192277 100644 --- a/Modules/IO/XML/include/itkXMLFile.h +++ b/Modules/IO/XML/include/itkXMLFile.h @@ -216,8 +216,8 @@ class ITK_TEMPLATE_EXPORT XMLWriterBase : public LightProcessObject #endif protected: - T * m_InputObject; // object to write out to an XML file - std::string m_Filename; // name of file to write. + T * m_InputObject{}; // object to write out to an XML file + std::string m_Filename{}; // name of file to write. }; } // namespace itk #endif diff --git a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h index ad025d6fe8f..206c11cd070 100644 --- a/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h +++ b/Modules/Nonunit/Review/include/itkDirectFourierReconstructionImageToImageFilter.h @@ -165,24 +165,24 @@ class ITK_TEMPLATE_EXPORT DirectFourierReconstructionImageToImageFilter /** 2D output slice iterator */ using OutputSliceIteratorType = ImageRegionIteratorWithIndex; - unsigned short m_ZeroPadding; /**< n-fold zero-padding */ - unsigned short m_OverSampling; /**< n-fold oversampling */ - - double m_Cutoff; /**< Radial lowpass cut-off frequency - */ - double m_AlphaRange; /**< Covered angular range */ - - unsigned short m_ZDirection; /**< Axial index in the input image */ - unsigned short m_AlphaDirection; /**< Angular index in the input image - */ - unsigned short m_RDirection; /**< Radial index in the input image - */ - unsigned short m_RadialSplineOrder; /**< Spline order for the radial + unsigned short m_ZeroPadding{}; /**< n-fold zero-padding */ + unsigned short m_OverSampling{}; /**< n-fold oversampling */ + + double m_Cutoff{}; /**< Radial lowpass cut-off frequency + */ + double m_AlphaRange{}; /**< Covered angular range */ + + unsigned short m_ZDirection{}; /**< Axial index in the input image */ + unsigned short m_AlphaDirection{}; /**< Angular index in the input image + */ + unsigned short m_RDirection{}; /**< Radial index in the input image + */ + unsigned short m_RadialSplineOrder{}; /**< Spline order for the radial BSpline interpolation */ - double m_PI; /**< The constant pi.... */ + double m_PI{}; /**< The constant pi.... */ - RegionType m_InputRequestedRegion; /**< The region requested from* the input + RegionType m_InputRequestedRegion{}; /**< The region requested from* the input image */ }; } // namespace itk diff --git a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h index 69d67e60ce4..350453d9272 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseDenseFiniteDifferenceImageFilter.h @@ -212,7 +212,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseDenseFiniteDifferenceImageFilter void ApplyUpdate(TimeStepType dt) override; - unsigned int m_ReinitializeCounter; // FIXME: Should this be a boolean ? + unsigned int m_ReinitializeCounter{}; // FIXME: Should this be a boolean ? // unsigned int m_UpdateCounter; // FIXME: Should this be a boolean ? private: diff --git a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h index a1aa707b62c..c93a03442db 100644 --- a/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h +++ b/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.h @@ -358,7 +358,7 @@ class ITK_TEMPLATE_EXPORT ImageMetricLoad : public LoadElement GradientImageType * m_MetricGradientImage{}; MovingPointer m_RefImage{}; FixedPointer m_TarImage{}; - MovingRadiusType m_MetricRadius; /** used by the metric to set + MovingRadiusType m_MetricRadius{}; /** used by the metric to set region size for fixed image*/ typename MovingType::SizeType m_RefSize{}; typename FixedType::SizeType m_TarSize{}; diff --git a/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h b/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h index ea423e4c8e6..664b19c8ff0 100644 --- a/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h +++ b/Modules/Numerics/FEM/include/itkFEMLoadElementBase.h @@ -116,7 +116,7 @@ class ITKFEM_EXPORT LoadElement : public Load PrintSelf(std::ostream & os, Indent indent) const override; void AddNextElementInternal(const Element * e); - ElementPointersVectorType m_Element; /** pointers to element objects on which the + ElementPointersVectorType m_Element{}; /** pointers to element objects on which the load acts */ }; } // end namespace fem diff --git a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h index 7438a348bbf..210456d1e70 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h +++ b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.h @@ -126,8 +126,8 @@ class ITK_TEMPLATE_EXPORT GaussianMembershipFunction : public MembershipFunction PrintSelf(std::ostream & os, Indent indent) const override; private: - MeanVectorType m_Mean; // mean - CovarianceMatrixType m_Covariance; // covariance matrix + MeanVectorType m_Mean{}; // mean + CovarianceMatrixType m_Covariance{}; // covariance matrix // inverse covariance matrix. automatically calculated // when covariance matrix is set. diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h index 9f8bb5ff185..a124dc844a8 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.h @@ -130,8 +130,8 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMembershipFunction : public Members PrintSelf(std::ostream & os, Indent indent) const override; private: - MeanVectorType m_Mean; // mean - CovarianceMatrixType m_Covariance; // covariance matrix + MeanVectorType m_Mean{}; // mean + CovarianceMatrixType m_Covariance{}; // covariance matrix // inverse covariance matrix. automatically calculated // when covariance matrix is set. diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h index 5c3762af94b..ad952d845ca 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.h @@ -122,8 +122,8 @@ class ITK_TEMPLATE_EXPORT MahalanobisDistanceMetric : public DistanceMetric m_NumberOfIntegrationPoints; // resolution of integration - vnl_vector m_MetricWidth; // number of iterations at each level + vnl_vector m_NumberOfIntegrationPoints{}; // resolution of integration + vnl_vector m_MetricWidth{}; // number of iterations at each level vnl_vector m_Maxiters{}; unsigned int m_TotalIterations{ 0 }; // total number of iterations that were run unsigned int m_MaxLevel{ 1 }; @@ -687,7 +687,7 @@ class ITK_TEMPLATE_EXPORT FEMRegistrationFilter : public ImageToImageFilter m_Rho{}; vnl_vector m_Gamma{}; Float m_Energy{ 0.0 }; // current value of energy - Float m_MinE; // minimum recorded energy + Float m_MinE{}; // minimum recorded energy Float m_MinJacobian{ 1.0 }; // minimum recorded energy Float m_Alpha{ 1.0 }; @@ -711,7 +711,7 @@ class ITK_TEMPLATE_EXPORT FEMRegistrationFilter : public ImageToImageFilter m_LabelStatus{ nullptr }; /** array for the state of each pixel. */ - InputImagePointer m_MediumImage; /** the medium image to store intermedium + InputImagePointer m_MediumImage{}; /** the medium image to store intermedium result */ - unsigned int m_Temp{ 0 }; /** for SA algo. */ - IndexType m_StartPoint; /** the seed of object */ + unsigned int m_Temp{ 0 }; /** for SA algo. */ + IndexType m_StartPoint{}; /** the seed of object */ unsigned int m_ImageWidth{ 0 }; /** image size. */ unsigned int m_ImageHeight{ 0 }; @@ -260,8 +260,8 @@ class ITK_TEMPLATE_EXPORT RGBGibbsPriorFilter : public MRFImageFilter m_Region{ nullptr }; /** for region erase. */ std::unique_ptr m_RegionCount{ nullptr }; /** for region erase. */