Skip to content

Commit 39bb122

Browse files
committed
ENH: prefer vnl_matrix::fill over loop.
1 parent be038a0 commit 39bb122

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

include/itkCoocurrenceTextureFeaturesImageFilter.hxx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,8 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
182182
continue;
183183
}
184184
// Initialisation of the histogram
185-
for(unsigned int a = 0; a < m_NumberOfBinsPerAxis; a++)
186-
{
187-
for(unsigned int b = 0; b < m_NumberOfBinsPerAxis; b++)
188-
{
189-
hist[a][b] = 0;
190-
}
191-
}
185+
hist.fill(0);
186+
192187
totalNumberOfFreq = 0;
193188
// Iteration over all the offsets
194189
for( offsets = m_Offsets->Begin(); offsets != m_Offsets->End(); ++offsets )

0 commit comments

Comments
 (0)