diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h index b6aa1be39a5..fef76af9cff 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageConstIteratorWithIndex.h @@ -287,15 +287,15 @@ class ITK_TEMPLATE_EXPORT ImageConstIteratorWithIndex protected: // made protected so other iterators can access typename TImage::ConstWeakPointer m_Image; - IndexType m_PositionIndex; // Index where we currently are - IndexType m_BeginIndex; // Index to start iterating over - IndexType m_EndIndex; // Index to finish iterating: - // one pixel past the end of each - // row, col, slice, etc.... + IndexType m_PositionIndex{ { 0 } }; // Index where we currently are + IndexType m_BeginIndex{ { 0 } }; // Index to start iterating over + IndexType m_EndIndex{ { 0 } }; // Index to finish iterating: + // one pixel past the end of each + // row, col, slice, etc.... RegionType m_Region; // region to iterate over - OffsetValueType m_OffsetTable[ImageDimension + 1]; + OffsetValueType m_OffsetTable[ImageDimension + 1]{}; const InternalPixelType * m_Position; const InternalPixelType * m_Begin; diff --git a/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h b/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h index 89e667b13ed..3c3db6c28e1 100644 --- a/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h +++ b/Modules/Core/Common/include/itkImageConstIteratorWithOnlyIndex.h @@ -256,15 +256,15 @@ class ITK_TEMPLATE_EXPORT ImageConstIteratorWithOnlyIndex protected: // made protected so other iterators can access typename TImage::ConstPointer m_Image; - IndexType m_PositionIndex; // Index where we currently are - IndexType m_BeginIndex; // Index to start iterating over - IndexType m_EndIndex; // Index to finish iterating: - // one pixel past the end of each - // row, col, slice, etc.... + IndexType m_PositionIndex{ { 0 } }; // Index where we currently are + IndexType m_BeginIndex{ { 0 } }; // Index to start iterating over + IndexType m_EndIndex{ { 0 } }; // Index to finish iterating: + // one pixel past the end of each + // row, col, slice, etc.... RegionType m_Region; // region to iterate over - OffsetValueType m_OffsetTable[ImageDimension + 1]; + OffsetValueType m_OffsetTable[ImageDimension + 1]{}; bool m_Remaining; };