} // rof
+ // Fix indices
+ for( unsigned int d = 0; d < _TImage::ImageDimension; ++d )
+ {
+ min_idx[ d ] -= long( this->m_PAD );
+ max_idx[ d ] += long( this->m_PAD );
+
+ if( min_idx[ d ] < region.GetIndex( )[ d ] )
+ min_idx[ d ] = region.GetIndex( )[ d ];
+ if( max_idx[ d ] > region.GetIndex( )[ d ] + region.GetSize( )[ d ] )
+ max_idx[ d ] = region.GetIndex( )[ d ] + region.GetSize( )[ d ];
+
+ } // rof
+
} // fi
typename _TImage::SizeType size;
ImageToBoundingBoxFromThreshold( )
: Superclass( ),
m_LowerThreshold( std::numeric_limits< TPixel >::min( ) ),
- m_UpperThreshold( std::numeric_limits< TPixel >::max( ) )
+ m_UpperThreshold( std::numeric_limits< TPixel >::max( ) ),
+ m_PAD( 0 )
{
}