- ImageFunctorFilter( )
- : Superclass( )
- {
- }
- virtual ~ImageFunctorFilter( )
- {
- }
-
- virtual void ThreadedGenerateData(
- const TRegion& region,
- itk::ThreadIdType threadId
- )
- {
- const typename TRegion::SizeType& regionSize = region.GetSize( );
- if( regionSize[ 0 ] == 0 )
- return;
- const I* in = this->GetInput( );
- O* out = this->GetOutput( 0 );
-
- const size_t nLines = region.GetNumberOfPixels( ) / regionSize[ 0 ];
- itk::ProgressReporter progress( this, threadId, nLines );
-
- // Define the iterators
- itk::ImageScanlineConstIterator< I > inIt( in, region );
- itk::ImageScanlineIterator< O > outIt( out, region );
-
- inIt.GoToBegin( );
- outIt.GoToBegin( );
- while( !inIt.IsAtEnd( ) )
- {
- while( !inIt.IsAtEndOfLine( ) )
- {
- outIt.Set( this->m_Functor( inIt.Get( ) ) );
- ++inIt;
- ++outIt;
-
- } // elihw
- inIt.NextLine( );
- outIt.NextLine( );
- progress.CompletedPixel( );
-
- } // elihw
- }
+ ImageFunctorFilter( );
+ virtual ~ImageFunctorFilter( );
+
+ virtual void ThreadedGenerateData( const TRegion& region, itk::ThreadIdType threadId ) override;