X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FLabelledSeedsInterface.hxx;h=98cc3347f70534fe1bd723f11c1c2c33b159a9b7;hb=fe01e92d9bce3519fa2a0936b6180ca7b057a87a;hp=a9a73c937184dd1413f5990f2b726e2bc28476e8;hpb=c4efafee513539e9a58c4a8b8369450ada1df5d8;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/LabelledSeedsInterface.hxx b/lib/fpa/Image/LabelledSeedsInterface.hxx index a9a73c9..98cc334 100644 --- a/lib/fpa/Image/LabelledSeedsInterface.hxx +++ b/lib/fpa/Image/LabelledSeedsInterface.hxx @@ -10,9 +10,9 @@ #include // ------------------------------------------------------------------------- -template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > +template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > void -fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: +fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: AddSeed( const TVertex& seed ) { std::ostringstream msg; @@ -26,35 +26,51 @@ AddSeed( const TVertex& seed ) } // ------------------------------------------------------------------------- -template< class _TVertex, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > +template< class _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > +void +fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: +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 _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > const typename -fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: +fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: TLabelImage* -fpa::Image::LabelledSeedsInterface< _TVertex, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: +fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: 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 _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > +void fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: 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 _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > +fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: 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 _TVertex, class _TPoint, class _TInputValue, class _TOutputValue, class _TFrontId, class _TCompare > +fpa::Image::LabelledSeedsInterface< _TVertex, _TPoint, _TInputValue, _TOutputValue, _TFrontId, _TCompare >:: ~LabelledSeedsInterface( ) { }