]> Creatis software - creaMaracasVisu.git/commitdiff
Clean code
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 20 Dec 2024 13:10:01 +0000 (14:10 +0100)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 20 Dec 2024 13:10:01 +0000 (14:10 +0100)
bbtk/src/bbcreaMaracasVisuSetPosition.cxx

index bd799c75a1fda7508250bed6a63a188e181847da..29261b6c8bd1bfa0b31639f3c25f2e09be1e1bd8 100644 (file)
@@ -16,7 +16,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(SetPosition,bbtk::AtomicBlackBox);
 //===== 
 void SetPosition::Process()
 {
-auto start1 = std::chrono::high_resolution_clock::now();
 // THE MAIN PROCESSING METHOD BODY
 //   Here we simply set the input 'In' value to the output 'Out'
 //   And print out the output value
@@ -35,11 +34,12 @@ auto start1 = std::chrono::high_resolution_clock::now();
                        vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
                        if (bbGetInputPoint().size()==3)
                        {
+auto start1 = std::chrono::high_resolution_clock::now();
                                vtkmprbasedata->SetX( bbGetInputPoint()[0] );
                                vtkmprbasedata->SetY( bbGetInputPoint()[1] );
                                vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
                 bool tmpFixAxis = vtkmprbasedata->GetFixAxis2D(  );
-//                             vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
+                               vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
                 int codeEvent;
                 if (bbGetInputType()==0)
                 {
@@ -50,19 +50,19 @@ auto start1 = std::chrono::high_resolution_clock::now();
                     codeEvent = 22222;    // Refresh without box reactivity
                 }
                 wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,codeEvent);
+auto stop1       = std::chrono::high_resolution_clock::now();
+auto duration1   = std::chrono::duration_cast<std::chrono::microseconds>(stop1 - start1);
+printf("EED SetPosition::Process time= %ld  \n", duration1.count() , this->bbGetFullName().c_str() );
        //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
//               vtkmprbasedata->SetFixAxis2D( tmpFixAxis );
+                vtkmprbasedata->SetFixAxis2D( tmpFixAxis );
                        } // if bbGetInputPosition
                } // bbGetInputwxVtkBaseView    
        } // Active
-auto stop1       = std::chrono::high_resolution_clock::now();
-auto duration1   = std::chrono::duration_cast<std::chrono::microseconds>(stop1 - start1);
-printf("EED SetPosition::Process time= %ld  \n", duration1.count() , this->bbGetFullName().c_str() );
 }
 
 //=====