Skip to content

Commit 9d24e4f

Browse files
committed
ENH: Improve modifiers for method arguments
Remove references for constant intrinsic variables. Add const modifier for arguments not modified.
1 parent 990f9b9 commit 9d24e4f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

include/itkCoocurrenceTextureFeaturesImageFilter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ class ITK_TEMPLATE_EXPORT CoocurrenceTextureFeaturesImageFilter:public ImageToIm
209209
virtual ~CoocurrenceTextureFeaturesImageFilter() {}
210210

211211
bool IsInsideNeighborhood(const OffsetType &iteratedOffset);
212-
void ComputeFeatures( vnl_matrix<unsigned int> &hist, const unsigned int &totalNumberOfFreq,
212+
void ComputeFeatures(const vnl_matrix<unsigned int> &hist, const unsigned int totalNumberOfFreq,
213213
typename TOutputImage::PixelType &outputPixel);
214-
void ComputeMeansAndVariances(vnl_matrix<unsigned int> &hist,
215-
const unsigned int &totalNumberOfFreq,
214+
void ComputeMeansAndVariances(const vnl_matrix<unsigned int> &hist,
215+
const unsigned int totalNumberOfFreq,
216216
double & pixelMean,
217217
double & marginalMean,
218218
double & marginalDevSquared,

include/itkCoocurrenceTextureFeaturesImageFilter.hxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ CoocurrenceTextureFeaturesImageFilter< TInputImage, TOutputImage >
3232
m_NumberOfBinsPerAxis( itkGetStaticConstMacro( DefaultBinsPerAxis ) ),
3333
m_Min( NumericTraits<PixelType>::NonpositiveMin() ),
3434
m_Max( NumericTraits<PixelType>::max() ),
35-
m_InsidePixelValue( NumericTraits<PixelType>::OneValue() ){
35+
m_InsidePixelValue( NumericTraits<PixelType>::OneValue() )
36+
{
3637
this->SetNumberOfRequiredInputs( 1 );
3738
this->SetNumberOfRequiredOutputs( 1 );
3839

@@ -313,7 +314,7 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
313314
template<typename TInputImage, typename TOutputImage>
314315
void
315316
CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
316-
::ComputeFeatures( vnl_matrix<unsigned int> &hist,const unsigned int &totalNumberOfFreq,
317+
::ComputeFeatures( const vnl_matrix<unsigned int> &hist, const unsigned int totalNumberOfFreq,
317318
typename TOutputImage::PixelType &outputPixel)
318319
{
319320
// Now get the various means and variances. This is takes two passes
@@ -390,8 +391,8 @@ CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
390391
template<typename TInputImage, typename TOutputImage>
391392
void
392393
CoocurrenceTextureFeaturesImageFilter<TInputImage, TOutputImage>
393-
::ComputeMeansAndVariances(vnl_matrix<unsigned int> &hist,
394-
const unsigned int &totalNumberOfFreq,
394+
::ComputeMeansAndVariances(const vnl_matrix<unsigned int> &hist,
395+
const unsigned int totalNumberOfFreq,
395396
double & pixelMean,
396397
double & marginalMean,
397398
double & marginalDevSquared,

0 commit comments

Comments
 (0)