]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Image/LabelledSeedsInterface.hxx
a9a73c937184dd1413f5990f2b726e2bc28476e8
[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 _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
14 void
15 fpa::Image::LabelledSeedsInterface< _TVertex, _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 _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
30 const typename 
31 fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
32 TLabelImage*
33 fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
34 GetLabels( ) const
35 {
36   return( this->m_LabelImage );
37 }
38
39 // -------------------------------------------------------------------------
40 template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
41 void fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
42 SetLabels( const TLabelImage* image )
43 {
44   this->m_LabelImage = image;
45 }
46
47 // -------------------------------------------------------------------------
48 template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
49 fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
50 LabelledSeedsInterface( itk::ProcessObject* filter )
51   : Superclass( filter )
52 {
53 }
54
55 // -------------------------------------------------------------------------
56 template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
57 fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
58 ~LabelledSeedsInterface( )
59 {
60 }
61
62 #endif // __fpa__Image__LabelledSeedsInterface__hxx__
63
64 // eof - $RCSfile$