]> 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 _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
14 void
15 fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
16 AddSeed( const TVertex& seed )
17 {
18   std::ostringstream msg;
19   msg << "itk::ERROR: fpa::Image::LabelledSeedsInterface (" << this
20       << "): \"AddSeed( const TVertex& seed )\" is not valid for this class. "
21       << "Use \"SetLabels( TLabelImage* labels )\" instead.";
22   ::itk::ExceptionObject e(
23     __FILE__, __LINE__, msg.str( ).c_str( ), ITK_LOCATION
24     );
25   throw e;
26 }
27
28 // -------------------------------------------------------------------------
29 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
30 void
31 fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
32 AddSeed( const TPoint& seed )
33 {
34   std::ostringstream msg;
35   msg << "itk::ERROR: fpa::Image::LabelledSeedsInterface (" << this
36       << "): \"AddSeed( const TPoint& seed )\" is not valid for this class. "
37       << "Use \"SetLabels( TLabelImage* labels )\" instead.";
38   ::itk::ExceptionObject e(
39     __FILE__, __LINE__, msg.str( ).c_str( ), ITK_LOCATION
40     );
41   throw e;
42 }
43
44 // -------------------------------------------------------------------------
45 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
46 const typename 
47 fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
48 TLabelImage*
49 fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
50 GetLabels( ) const
51 {
52   return( this->m_LabelImage );
53 }
54
55 // -------------------------------------------------------------------------
56 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
57 void fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
58 SetLabels( const TLabelImage* image )
59 {
60   this->m_LabelImage = image;
61 }
62
63 // -------------------------------------------------------------------------
64 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
65 fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
66 LabelledSeedsInterface( itk::ProcessObject* filter )
67   : Superclass( filter )
68 {
69 }
70
71 // -------------------------------------------------------------------------
72 template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
73 fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
74 ~LabelledSeedsInterface( )
75 {
76 }
77
78 #endif // __fpa__Image__LabelledSeedsInterface__hxx__
79
80 // eof - $RCSfile$