X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FVTK%2FImage3DObserver.hxx;h=e9f9770aa7f588781bc8bbc861f2738ff73a9555;hb=79df4abfecefc36c0dfca7d9f6f2978882de95dc;hp=001924a70c077cd1ecfcf7e4070fac1adb898ec3;hpb=97940c7ac873a39428e8739b2d47ca8485cff70e;p=FrontAlgorithms.git diff --git a/lib/fpa/VTK/Image3DObserver.hxx b/lib/fpa/VTK/Image3DObserver.hxx index 001924a..e9f9770 100644 --- a/lib/fpa/VTK/Image3DObserver.hxx +++ b/lib/fpa/VTK/Image3DObserver.hxx @@ -28,13 +28,14 @@ template< class F, class R > void fpa::VTK::Image3DObserver< F, R >:: Execute( const itk::Object* c, const itk::EventObject& e ) { - typedef itk::ImageBase< 3 > _TImage; - typedef typename F::TEvent _TEvent; - typedef typename F::TFrontEvent _TFrontEvent; - typedef typename F::TMarkEvent _TMarkEvent; - typedef typename F::TCollisionEvent _TCollisionEvent; - typedef typename F::TEndEvent _TEndEvent; - typedef typename F::TBacktrackingEvent _TBacktrackingEvent; + typedef itk::ImageBase< 3 > _TImage; + typedef typename F::TEvent _TEvent; + typedef typename F::TFrontEvent _TFrontEvent; + typedef typename F::TMarkEvent _TMarkEvent; + typedef typename F::TCollisionEvent _TCollisionEvent; + typedef typename F::TEndEvent _TEndEvent; + typedef typename F::TBacktrackingEvent _TBacktrackingEvent; + typedef typename F::TEndBacktrackingEvent _TEndBacktrackingEvent; // Check inputs if( this->m_RenderWindow == NULL ) @@ -158,6 +159,8 @@ Execute( const itk::Object* c, const itk::EventObject& e ) { const _TBacktrackingEvent* bevt = dynamic_cast< const _TBacktrackingEvent* >( &e ); + const _TEndBacktrackingEvent* ebevt = + dynamic_cast< const _TEndBacktrackingEvent* >( &e ); if( bevt != NULL ) { static const unsigned long nColors = 10; @@ -173,12 +176,18 @@ Execute( const itk::Object* c, const itk::EventObject& e ) this->m_Data->GetPointData( )-> GetScalars( )->InsertNextTuple1( back_id ); this->m_Data->Modified( ); - this->m_RenderWindow->Render( ); return; } // fi + if( ebevt != NULL ) + { + this->m_RenderWindow->Render( ); + return; + + } // fi + } // fi }