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

index 6d7f89e6331b4567101c4eb27eb8737fcea328c0..3e06018a6b37ddcbd5be2bdc656b10cdb18dc9c0 100644 (file)
@@ -2,8 +2,6 @@
 // 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)
 //===== 
 
-#include <chrono>
-
 #include "bbcreaMaracasVisuSetPosition.h"
 #include "bbcreaMaracasVisuPackage.h"
 #include <wxMPRBaseData.h>
@@ -33,9 +31,6 @@ void SetPosition::Process()
        {
                if (bbGetInputwxVtkBaseView()!=NULL)
                {
-            
-            printf("SetPosition::Process %s\n", bbGetInputwxVtkBaseView()->GetRenWin()->ReportCapabilities() );
-            
                        vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (bbGetInputwxVtkBaseView()->GetVtkBaseData());
                        if (bbGetInputPoint().size()==3)
                        {
@@ -58,11 +53,7 @@ void SetPosition::Process()
        #if wxMAJOR_VERSION <= 2
                                bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
        #else
-auto start = std::chrono::high_resolution_clock::now();
                                bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
-auto stop       = std::chrono::high_resolution_clock::now();
-auto duration   = std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
-printf("EED SetPosition::Process time= %ld  %s \n", duration.count() , bbGetFullName().c_str() );
        #endif
                 vtkmprbasedata->SetFixAxis2D( tmpFixAxis );
                        } // if bbGetInputPosition
index 07c3b40883287f0a82f433099e67fa4baf0c6d43..e797e844dfabdf17137e33907f1f48b8f10328a9 100644 (file)
@@ -23,6 +23,8 @@
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------ */
 
+#include <chrono>
+
 #include "bbmaracasvisuViewerNV.h"
 #include "bbcreaMaracasVisuPackage.h"
 namespace bbcreaMaracasVisu
@@ -73,7 +75,13 @@ void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event)
         //ED2024-11-01
         bool ok=true;
         if  (mbbViewerNV->bbGetInputReactivityType()==0) { ok=false; }
+auto start1 = std::chrono::high_resolution_clock::now();
         mbbViewerNV->bbSignalOutputModification(std::string("Point"),ok);
+auto stop1       = std::chrono::high_resolution_clock::now();
+auto duration1   = std::chrono::duration_cast<std::chrono::microseconds>(stop1 - start1);
+printf("EED bbwxMaracas_N_ViewersWidget::OnRefreshView time= %ld  \n", duration1.count() , mbbViewerNV->bbGetFullName().c_str() );
+
+        
         
 //             if  (mbbViewerNV->bbGetInputReactivityType()==1)
 //             {
@@ -82,7 +90,11 @@ void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event)
         
        } // if X Y Z
 
+auto start2 = std::chrono::high_resolution_clock::now();
        wxMaracas_N_ViewersWidget::OnRefreshView(event);
+auto stop2       = std::chrono::high_resolution_clock::now();
+auto duration2   = std::chrono::duration_cast<std::chrono::microseconds>(stop2 - start2);
+printf("EED bbwxMaracas_N_ViewersWidget::OnRefreshView time= %ld  \n", duration2.count() , mbbViewerNV->bbGetFullName().c_str() );
 
 }