]> Creatis software - cpPlugins.git/blobdiff - appli/ImageMPR/ImageMPR.cxx
More widgets added
[cpPlugins.git] / appli / ImageMPR / ImageMPR.cxx
index 58276cb7433b6b7027347130614d0e8ee7c057d2..ca29aaacf20080d69902a447d4f814567f3dad30 100644 (file)
@@ -18,9 +18,6 @@ ImageMPR( QWidget* parent )
 {
   this->m_UI->setupUi( this );
 
-  // Associate callbacks
-  this->m_UI->MPR->AddCursorCommand( Self::_CursorCommand, this );
-
   // Connect actions
   ImageMPR_ConnectAction( OpenImage );
   ImageMPR_ConnectAction( OpenSegmentation );
@@ -182,48 +179,46 @@ _execPlugin( )
 }
 
 // -------------------------------------------------------------------------
-void ImageMPR::
-_CursorCommand( double* pos, int axis, void* data )
-{
-  Self* app = reinterpret_cast< Self* >( data );
-  if( app == NULL )
-    return;
-  if( !( app->m_Flooding ) )
-    return;
-
-  cpPlugins::Interface::ProcessObject::Pointer filter =
-    app->m_UI->MPR->CreateFilter(
-      "cpPlugins::BasicFilters::FloodFillImageFilter"
-      );
-  if( filter.IsNull( ) )
-    return;
-
-  cpPlugins::Interface::Parameters* params = filter->GetParameters( );
-  params->SetPoint( "Seed", 3, pos );
-  params->SetReal( "Window", app->m_UI->MPR->GetWindow( ) );
-  params->SetReal( "Level", app->m_UI->MPR->GetLevel( ) );
-  params->SetUint( "InsideValue", 1 );
-  params->SetUint( "OutsideValue", 0 );
-  filter->SetInput( "Input", app->m_UI->MPR->GetImage( app->m_ImageLoaded ) );
-  app->m_UI->MPR->Block( );
-  std::string err = filter->Update( );
-  cpPlugins::Interface::BaseMPRWindow::TImage::Pointer image = filter->GetOutput< cpPlugins::Interface::BaseMPRWindow::TImage >( "Output" );
-  filter->DisconnectOutputs( );
-  app->m_UI->MPR->AddImage( "Segmentation", image );
-  app->m_UI->MPR->Unblock( );
-
-
-
-  /* TODO
-     std::cout
-     << "CursorCommand ==> "
-     << pos[ 0 ] << " "
-     << pos[ 1 ] << " "
-    << pos[ 2 ] << " : "
-    << axis << " "
-    << data << std::endl;
-  */
-}
+/* TODO
+   void ImageMPR::
+   _CursorCommand( double* pos, int axis, void* data )
+   {
+   Self* app = reinterpret_cast< Self* >( data );
+   if( app == NULL )
+   return;
+   if( !( app->m_Flooding ) )
+   return;
+
+   cpPlugins::Interface::ProcessObject::Pointer filter =
+   app->m_UI->MPR->CreateFilter(
+   "cpPlugins::BasicFilters::FloodFillImageFilter"
+   );
+   if( filter.IsNull( ) )
+   return;
+
+   cpPlugins::Interface::Parameters* params = filter->GetParameters( );
+   params->SetPoint( "Seed", 3, pos );
+   params->SetReal( "Window", app->m_UI->MPR->GetWindow( ) );
+   params->SetReal( "Level", app->m_UI->MPR->GetLevel( ) );
+   params->SetUint( "InsideValue", 1 );
+   params->SetUint( "OutsideValue", 0 );
+   filter->SetInput( "Input", app->m_UI->MPR->GetImage( app->m_ImageLoaded ) );
+   app->m_UI->MPR->Block( );
+   std::string err = filter->Update( );
+   cpPlugins::Interface::BaseMPRWindow::TImage::Pointer image = filter->GetOutput< cpPlugins::Interface::BaseMPRWindow::TImage >( "Output" );
+   filter->DisconnectOutputs( );
+   app->m_UI->MPR->AddImage( "Segmentation", image );
+   app->m_UI->MPR->Unblock( );
+
+   std::cout
+   << "CursorCommand ==> "
+   << pos[ 0 ] << " "
+   << pos[ 1 ] << " "
+   << pos[ 2 ] << " : "
+   << axis << " "
+   << data << std::endl;
+   }
+*/
 
 /*
 #include "MementoState.h"