X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FPathsToImageFilter.hxx;fp=lib%2Ffpa%2FImage%2FPathsToImageFilter.hxx;h=0000000000000000000000000000000000000000;hb=3c639e5da479c7216a0a302ffa156ac6762caeed;hp=487b9c8ed3d115df54d0f32f90460d5e174e229d;hpb=5bf766068f54d061d3816f4950a076c3cf3a4d8b;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/PathsToImageFilter.hxx b/lib/fpa/Image/PathsToImageFilter.hxx deleted file mode 100644 index 487b9c8..0000000 --- a/lib/fpa/Image/PathsToImageFilter.hxx +++ /dev/null @@ -1,79 +0,0 @@ -// ========================================================================= -// @author Leonardo Florez Valencia -// @email florez-l@javeriana.edu.co -// ========================================================================= - -#ifndef __fpa__Image__PathsToImageFilter__hxx__ -#define __fpa__Image__PathsToImageFilter__hxx__ - -// ------------------------------------------------------------------------- -template< class _TMST, class _TOutputPixelValue > -void fpa::Image::PathsToImageFilter< _TMST, _TOutputPixelValue >:: -AddPath( - const TIndex& start, const TIndex& end, - const TOutputPixelValue& r, - const TOutputPixelValue& g, - const TOutputPixelValue& b - ) -{ - if( start != end ) - { - TPathData d; - d.Start = start; - d.End = end; - d.Red = r; - d.Green = g; - d.Blue = b; - this->m_Paths.push_back( d ); - this->Modified( ); - - } // fi -} - -// ------------------------------------------------------------------------- -template< class _TMST, class _TOutputPixelValue > -fpa::Image::PathsToImageFilter< _TMST, _TOutputPixelValue >:: -PathsToImageFilter( ) - : Superclass( ) -{ -} - -// ------------------------------------------------------------------------- -template< class _TMST, class _TOutputPixelValue > -fpa::Image::PathsToImageFilter< _TMST, _TOutputPixelValue >:: -~PathsToImageFilter( ) -{ -} - -// ------------------------------------------------------------------------- -template< class _TMST, class _TOutputPixelValue > -void fpa::Image::PathsToImageFilter< _TMST, _TOutputPixelValue >:: -GenerateData( ) -{ - TOutputPixel color; - color.Fill( 0 ); - - const TMST* mst = this->GetInput( ); - TOutputImage* output = this->GetOutput( ); - output->SetBufferedRegion( mst->GetBufferedRegion( ) ); - output->Allocate( ); - output->FillBuffer( color ); - - typename TPaths::const_iterator d = this->m_Paths.begin( ); - for( ; d != this->m_Paths.end( ); ++d ) - { - typename TMST::TVertices path = mst->GetPath( d->Start, d->End ); - color[ 0 ] = d->Red; - color[ 1 ] = d->Green; - color[ 2 ] = d->Blue; - color[ 3 ] = std::numeric_limits< TOutputPixelValue >::max( ); - typename TMST::TVertices::const_iterator i = path.begin( ); - for( ; i != path.end( ); ++i ) - output->SetPixel( *i, color ); - - } // rof -} - -#endif // __fpa__Image__PathsToImageFilter__hxx__ - -// eof - $RCSfile$