]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/LabelledSeedsInterface.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / LabelledSeedsInterface.hxx
index a9a73c937184dd1413f5990f2b726e2bc28476e8..5b184f1db5e53151ecae81fcb22d78139ec9336a 100644 (file)
@@ -10,9 +10,8 @@
 #include <itkExceptionObject.h>
 
 // -------------------------------------------------------------------------
-template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
-void
-fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
+template< class _TTraits >
+void fpa::Image::LabelledSeedsInterface< _TTraits >::
 AddSeed( const TVertex& seed )
 {
   std::ostringstream msg;
@@ -26,35 +25,48 @@ AddSeed( const TVertex& seed )
 }
 
 // -------------------------------------------------------------------------
-template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
-const typename 
-fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
-TLabelImage*
-fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
+template< class _TTraits >
+void fpa::Image::LabelledSeedsInterface< _TTraits >::
+AddSeed( const TPoint& seed )
+{
+  std::ostringstream msg;
+  msg << "itk::ERROR: fpa::Image::LabelledSeedsInterface (" << this
+      << "): \"AddSeed( const TPoint& seed )\" is not valid for this class. "
+      << "Use \"SetLabels( TLabelImage* labels )\" instead.";
+  ::itk::ExceptionObject e(
+    __FILE__, __LINE__, msg.str( ).c_str( ), ITK_LOCATION
+    );
+  throw e;
+}
+
+// -------------------------------------------------------------------------
+template< class _TTraits >
+const typename  fpa::Image::LabelledSeedsInterface< _TTraits >::
+TLabelImage* fpa::Image::LabelledSeedsInterface< _TTraits >::
 GetLabels( ) const
 {
   return( this->m_LabelImage );
 }
 
 // -------------------------------------------------------------------------
-template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
-void fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
+template< class _TTraits >
+void fpa::Image::LabelledSeedsInterface< _TTraits >::
 SetLabels( const TLabelImage* image )
 {
   this->m_LabelImage = image;
 }
 
 // -------------------------------------------------------------------------
-template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
-fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
+template< class _TTraits >
+fpa::Image::LabelledSeedsInterface< _TTraits >::
 LabelledSeedsInterface( itk::ProcessObject* filter )
   : Superclass( filter )
 {
 }
 
 // -------------------------------------------------------------------------
-template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare >
-fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >::
+template< class _TTraits >
+fpa::Image::LabelledSeedsInterface< _TTraits >::
 ~LabelledSeedsInterface( )
 {
 }