X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FFunctors%2FRegionGrowThresholdFunction.h;h=55a5d53b7fc63b53f88b59a8442b5b38e109607e;hb=8fafb83c41ab35dfc25eb637170882a612924433;hp=1ac7c8f080c3acfc155f390a35f2d75720011945;hpb=ab4b440668b2007d94345967ac154c4b20aa389f;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/Functors/RegionGrowThresholdFunction.h b/lib/fpa/Image/Functors/RegionGrowThresholdFunction.h index 1ac7c8f..55a5d53 100644 --- a/lib/fpa/Image/Functors/RegionGrowThresholdFunction.h +++ b/lib/fpa/Image/Functors/RegionGrowThresholdFunction.h @@ -45,6 +45,7 @@ namespace fpa virtual bool Evaluate( const TIndex& idx ) const { const I* img = this->GetSpace( ); + if( img != NULL ) { TPixel v = img->GetPixel( idx ); @@ -58,10 +59,11 @@ namespace fpa protected: RegionGrowThresholdFunction( ) - : Superclass( ), - m_LowerThreshold( itk::NumericTraits< TPixel >::min( ) ), - m_UpperThreshold( itk::NumericTraits< TPixel >::max( ) ) - { } + : Superclass( ) + { + itk::NumericTraits< TPixel >::min( this->m_LowerThreshold ); + itk::NumericTraits< TPixel >::max( this->m_UpperThreshold ); + } virtual ~RegionGrowThresholdFunction( ) { }