]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/LabelledSeedsInterface.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / LabelledSeedsInterface.hxx
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __fpa__Image__LabelledSeedsInterface__hxx__
7 #define __fpa__Image__LabelledSeedsInterface__hxx__
8
9 #include <sstream>
10 #include <itkExceptionObject.h>
11
12 // -------------------------------------------------------------------------
13 template< class _TTraits >
14 void fpa::Image::LabelledSeedsInterface< _TTraits >::
15 AddSeed( const TVertex& seed )
16 {
17   std::ostringstream msg;
18   msg << "itk::ERROR: fpa::Image::LabelledSeedsInterface (" << this
19       << "): \"AddSeed( const TVertex& seed )\" is not valid for this class. "
20       << "Use \"SetLabels( TLabelImage* labels )\" instead.";
21   ::itk::ExceptionObject e(
22     __FILE__, __LINE__, msg.str( ).c_str( ), ITK_LOCATION
23     );
24   throw e;
25 }
26
27 // -------------------------------------------------------------------------
28 template< class _TTraits >
29 void fpa::Image::LabelledSeedsInterface< _TTraits >::
30 AddSeed( const TPoint& seed )
31 {
32   std::ostringstream msg;
33   msg << "itk::ERROR: fpa::Image::LabelledSeedsInterface (" << this
34       << "): \"AddSeed( const TPoint& seed )\" is not valid for this class. "
35       << "Use \"SetLabels( TLabelImage* labels )\" instead.";
36   ::itk::ExceptionObject e(
37     __FILE__, __LINE__, msg.str( ).c_str( ), ITK_LOCATION
38     );
39   throw e;
40 }
41
42 // -------------------------------------------------------------------------
43 template< class _TTraits >
44 const typename  fpa::Image::LabelledSeedsInterface< _TTraits >::
45 TLabelImage* fpa::Image::LabelledSeedsInterface< _TTraits >::
46 GetLabels( ) const
47 {
48   return( this->m_LabelImage );
49 }
50
51 // -------------------------------------------------------------------------
52 template< class _TTraits >
53 void fpa::Image::LabelledSeedsInterface< _TTraits >::
54 SetLabels( const TLabelImage* image )
55 {
56   this->m_LabelImage = image;
57 }
58
59 // -------------------------------------------------------------------------
60 template< class _TTraits >
61 fpa::Image::LabelledSeedsInterface< _TTraits >::
62 LabelledSeedsInterface( itk::ProcessObject* filter )
63   : Superclass( filter )
64 {
65 }
66
67 // -------------------------------------------------------------------------
68 template< class _TTraits >
69 fpa::Image::LabelledSeedsInterface< _TTraits >::
70 ~LabelledSeedsInterface( )
71 {
72 }
73
74 #endif // __fpa__Image__LabelledSeedsInterface__hxx__
75
76 // eof - $RCSfile$