+ typedef itk::BinaryThresholdImageFilter< I, I > _TBinFilter;
+
+ // Binarize, inplace, the grown region
+ if( this->m_Histogram.size( ) > 1 )
+ {
+ typename _TBinFilter::Pointer bin = _TBinFilter::New( );
+ bin->SetInput( this->GetOutput( ) );
+ bin->SetInsideValue( this->m_InsideValue );
+ bin->SetOutsideValue( this->m_OutsideValue );
+ bin->InPlaceOn( );
+ if( this->m_StopForced )
+ bin->SetUpperThreshold( this->m_StopThreshold );
+ else
+ bin->SetUpperThreshold( this->m_Histogram.rbegin( )->first );
+ bin->GraftOutput( this->GetOutput( ) );
+ bin->Update( );
+ this->GraftOutput( bin->GetOutput( ) );
+
+ } // fi
+