+++ /dev/null
-// =========================================================================
-// @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$