X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FImageFunctorFilter.hxx;fp=lib%2FcpExtensions%2FAlgorithms%2FImageFunctorFilter.hxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=73777daaa0fb55656d1c96a0cc92a834786f8bec;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/ImageFunctorFilter.hxx b/lib/cpExtensions/Algorithms/ImageFunctorFilter.hxx deleted file mode 100644 index 73777da..0000000 --- a/lib/cpExtensions/Algorithms/ImageFunctorFilter.hxx +++ /dev/null @@ -1,65 +0,0 @@ -// ------------------------------------------------------------------------- -// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) -// ------------------------------------------------------------------------- - -#ifndef __cpExtensions__Algorithms__ImageFunctorFilter__hxx__ -#define __cpExtensions__Algorithms__ImageFunctorFilter__hxx__ - -#include -#include -#include - -// ------------------------------------------------------------------------- -template< class _TInputImage, class _TOutputImage > -cpExtensions::Algorithms::ImageFunctorFilter< _TInputImage, _TOutputImage >:: -ImageFunctorFilter( ) - : Superclass( ) -{ -} - -// ------------------------------------------------------------------------- -template< class _TInputImage, class _TOutputImage > -cpExtensions::Algorithms::ImageFunctorFilter< _TInputImage, _TOutputImage >:: -~ImageFunctorFilter( ) -{ -} - -// ------------------------------------------------------------------------- -template< class _TInputImage, class _TOutputImage > -void -cpExtensions::Algorithms::ImageFunctorFilter< _TInputImage, _TOutputImage >:: -ThreadedGenerateData( const TRegion& region, itk::ThreadIdType threadId ) -{ - // Configure data for this thread - const typename TRegion::SizeType& regionSize = region.GetSize( ); - if( regionSize[ 0 ] == 0 ) - return; - const TInputImage* in = this->GetInput( ); - TOutputImage* out = this->GetOutput( 0 ); - const size_t nLines = region.GetNumberOfPixels( ) / regionSize[ 0 ]; - itk::ProgressReporter progress( this, threadId, nLines ); - - // Iterate over this region - itk::ImageScanlineConstIterator< TInputImage > iIt( in, region ); - itk::ImageScanlineIterator< TOutputImage > oIt( out, region ); - iIt.GoToBegin( ); - oIt.GoToBegin( ); - while( !iIt.IsAtEnd( ) ) - { - while( !iIt.IsAtEndOfLine( ) ) - { - oIt.Set( this->m_Functor->Evaluate( iIt.Get( ) ) ); - ++iIt; - ++oIt; - - } // elihw - iIt.NextLine( ); - oIt.NextLine( ); - progress.CompletedPixel( ); - - } // elihw -} - -#endif // __cpExtensions__Algorithms__ImageFunctorFilter__hxx__ - -// eof - $RCSfile$