]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Base/SingleSeedInterface.hxx
6db301c8220517057abbda389daafc5721e533e9
[FrontAlgorithms.git] / lib / fpa / Base / SingleSeedInterface.hxx
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Base__SingleSeedInterface__hxx__
7 #define __fpa__Base__SingleSeedInterface__hxx__
8
9 // -------------------------------------------------------------------------
10 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
11 const typename
12 fpa::Base::SingleSeedInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
13 TSeeds&
14 fpa::Base::SingleSeedInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
15 GetSeeds( ) const
16 {
17   return( this->m_Seeds );
18 }
19
20 // -------------------------------------------------------------------------
21 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
22 void
23 fpa::Base::SingleSeedInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
24 SetSeed( const TVertex& seed )
25 {
26   TSeed s;
27   s.Vertex = seed;
28   s.IsPoint = false;
29   this->m_Seeds[ 0 ] = s;
30   if( this->m_Filter != NULL )
31     this->m_Filter->Modified( );
32 }
33
34 // -------------------------------------------------------------------------
35 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
36 void
37 fpa::Base::SingleSeedInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
38 SetSeed( const TPoint& seed )
39 {
40   TSeed s;
41   s.Point = seed;
42   s.IsPoint = true;
43   this->m_Seeds[ 0 ] = s;
44   if( this->m_Filter != NULL )
45     this->m_Filter->Modified( );
46 }
47
48 // -------------------------------------------------------------------------
49 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
50 fpa::Base::SingleSeedInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
51 SingleSeedInterface( itk::ProcessObject* filter )
52   : m_Filter( filter )
53 {
54   this->m_Seeds = TSeeds( 1 );
55 }
56
57 // -------------------------------------------------------------------------
58 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
59 fpa::Base::SingleSeedInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
60 ~SingleSeedInterface( )
61 {
62   this->m_Seeds.clear( );
63 }
64
65 #endif // __fpa__Base__SingleSeedInterface__hxx__
66
67 // eof - $RCSfile$