]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbcreaMaracasVisuSetPosition.cxx
#3469 ImageActor Interpolation
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuSetPosition.cxx
index c83106922cc2a71e468d8e89af92aac48e4e09a7..64c93c60c8dfab33dd67631f16f53ec6b0c8e8fd 100644 (file)
@@ -33,24 +33,28 @@ void SetPosition::Process()
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
 
-       if (bbGetInputwxVtkBaseView()!=NULL)
+       if (bbGetInputActive()==true)
        {
-               vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
-               if (bbGetInputPoint().size()==3)
+               if (bbGetInputwxVtkBaseView()!=NULL)
                {
-                       vtkmprbasedata->SetX( bbGetInputPoint()[0] );
-                       vtkmprbasedata->SetY( bbGetInputPoint()[1] );
-                       vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
-                       vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
-                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
-//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
-#if wxMAJOR_VERSION <= 2
-                       bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
-#else
-                       bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
-#endif                         
-               } // if bbGetInputPosition
-       } // bbGetInputwxVtkBaseView
+                       vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
+                       if (bbGetInputPoint().size()==3)
+                       {
+                               vtkmprbasedata->SetX( bbGetInputPoint()[0] );
+                               vtkmprbasedata->SetY( bbGetInputPoint()[1] );
+                               vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
+                               vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
+                               wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+       //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+       #if wxMAJOR_VERSION <= 2
+                               bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
+       #else
+                               bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
+       #endif                          
+                       } // if bbGetInputPosition
+               } // bbGetInputwxVtkBaseView    
+       } // Active
+       
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
@@ -60,8 +64,9 @@ void SetPosition::bbUserSetDefaultValues()
 
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
-   bbSetInputwxVtkBaseView( NULL ) ;
-   bbSetInputFixAxis2D( false ) ;
+       bbSetInputActive(true);
+       bbSetInputwxVtkBaseView( NULL ) ;
+       bbSetInputFixAxis2D( false ) ;
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)