From: eduardo.davila@creatis.insa-lyon.fr Date: Fri, 20 Dec 2024 12:16:17 +0000 (+0100) Subject: Clean code X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2163e3fdc01c238ecb310e400fc2549a65914a67;p=creaMaracasVisu.git Clean code --- diff --git a/bbtk/src/bbcreaMaracasVisuSetPosition.cxx b/bbtk/src/bbcreaMaracasVisuSetPosition.cxx index 6d7f89e..3e06018 100644 --- a/bbtk/src/bbcreaMaracasVisuSetPosition.cxx +++ b/bbtk/src/bbcreaMaracasVisuSetPosition.cxx @@ -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 - #include "bbcreaMaracasVisuSetPosition.h" #include "bbcreaMaracasVisuPackage.h" #include @@ -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(stop - start); -printf("EED SetPosition::Process time= %ld %s \n", duration.count() , bbGetFullName().c_str() ); #endif vtkmprbasedata->SetFixAxis2D( tmpFixAxis ); } // if bbGetInputPosition diff --git a/bbtk/src/bbmaracasvisuViewerNV.cxx b/bbtk/src/bbmaracasvisuViewerNV.cxx index 07c3b40..e797e84 100644 --- a/bbtk/src/bbmaracasvisuViewerNV.cxx +++ b/bbtk/src/bbmaracasvisuViewerNV.cxx @@ -23,6 +23,8 @@ # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ */ +#include + #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(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(stop2 - start2); +printf("EED bbwxMaracas_N_ViewersWidget::OnRefreshView time= %ld \n", duration2.count() , mbbViewerNV->bbGetFullName().c_str() ); }