for( fit = faceList.begin( ); fit != faceList.end( ); ++fit )
{
bit = itk::ConstNeighborhoodIterator< TInputImage >( this->GetRadius( ), input, *fit );
- neighborhoodSize = bit.Size( );
+ neighborhoodSize = TOutputPixel( bit.Size( ) );
it = itk::ImageRegionIterator< TOutputImage >( output, *fit );
bit.OverrideBoundaryCondition( &nbc );
bit.GoToBegin( );
sum1 += v;
sum2 += v * v;
}
- TOutputPixel mean = ( sum1 / TOutputPixel( neighborhoodSize ) );
TOutputPixel var =
- ( sum2 - ( ( sum1 * sum1 ) / TOutputPixel( neighborhoodSize ) ) ) /
- ( TOutputPixel( neighborhoodSize ) - TOutputPixel( 1 ) );
+ ( sum2 - ( ( sum1 * sum1 ) / neighborhoodSize ) ) /
+ ( neighborhoodSize - TOutputPixel( 1 ) );
if( this->m_UseSquareRoot )
it.Set( std::sqrt( double( var ) ) );
else