From: eduardo.davila@creatis.insa-lyon.fr Date: Wed, 24 Sep 2025 09:00:55 +0000 (+0200) Subject: #3582 ResetRefresh mechanism X-Git-Url: http://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b37ea932a538fe2a72095d0d0b04ac730371656e;p=creaMaracasVisu.git #3582 ResetRefresh mechanism --- diff --git a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx index b526102..34e8ebf 100644 --- a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx +++ b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.cxx @@ -75,6 +75,8 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ColorLayerImageView,bbtk::WxBlackBox); //===== void ColorLayerImageView::Process() { + printf("EED ColorLayerImageView::Process Start \n"); + if (bbGetInputIn()!=NULL) { if ( !( (bbGetInputWxVtkBaseView()==NULL) && (bbGetInputWxVtkBaseView1()==NULL) && (bbGetInputWxVtkBaseView2()==NULL)) ) { @@ -86,21 +88,29 @@ void ColorLayerImageView::Process() // firsttime=false; clivp->SetActive( bbGetInputActive() ); } + + printf("EED ColorLayerImageView::Process 1 \n"); std::vector range = bbGetInputlstRangeForColorBar(); std::vector colorbarposition = bbGetInputColorBarPosition(); std::vector base_color = bbGetInputlstBaseColor(); std::vector grey_level_boundaries = bbGetInputlstGreyLevelBoundaries(); std::vector transparence_level_boundaries = bbGetInputlstTransparenceBoundaries(); + printf("EED ColorLayerImageView::Process 1.1 \n"); clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , bbGetInputWxVtkBaseView() ); clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 1 , bbGetInputWxVtkBaseView1() ); clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 2 , bbGetInputWxVtkBaseView2() ); + printf("EED ColorLayerImageView::Process 1.2 \n"); clivp->GetColorLayerImageViewManager()->ResetRefresh( ); + printf("EED ColorLayerImageView::Process 1.3 \n"); clivp->GetColorLayerImageViewManager()->SetRangeForColorBar( range ); + printf("EED ColorLayerImageView::Process 1.4 \n"); clivp->GetColorLayerImageViewManager()->SetColorBarPosition( colorbarposition ); clivp->GetColorLayerImageViewManager()->SetBaseColors( base_color ); clivp->GetColorLayerImageViewManager()->SetGreyLevelBoundaries( grey_level_boundaries ); + printf("EED ColorLayerImageView::Process 1.5 \n"); clivp->GetColorLayerImageViewManager()->SetBaseTransparence( transparence_level_boundaries ); clivp->GetColorLayerImageViewManager()->SetPlainOrGradientColor( bbGetInputPlainOrGradientColor() ); + printf("EED ColorLayerImageView::Process 1.6 \n"); clivp->SetFittingMode( bbGetInputFittingMode() ); clivp->SetImage( bbGetInputIn() ); @@ -108,6 +118,7 @@ void ColorLayerImageView::Process() bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) ); bbSetOutputOutOpacity( clivp->GetOpacity() ); bbSetOutputInterpolation( clivp->GetInterpolation() ); + printf("EED ColorLayerImageView::Process 2 \n"); if (firsttime==true) { firsttime=false; @@ -119,6 +130,9 @@ void ColorLayerImageView::Process() printf("EED Error!!! ColorLayerImageView::Process (%s) Missing Inputs: WxVtkBaseView , WxVtkBaseView1 , WxVtkBaseView2 \n", bbGetFullName().c_str() ); }// if xxVtkBaseView } // if In + + printf("EED ColorLayerImageView::Process End \n"); + } //===== // Don't edit this file. This file is generated from xml description.. diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx index 4a39be9..e69f291 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageViewManager.cxx @@ -57,9 +57,14 @@ ColorLayerImageViewManager::~ColorLayerImageViewManager() void ColorLayerImageViewManager::ResetRefresh() { int i,size =_colorLayerImageViewLst.size(); - for (i=0;iResetRefresh(); + printf("EED ColorLayerImageViewManager::ResetRefresh 1 %p \n", _colorLayerImageViewLst[i] ); + if ( _colorLayerImageViewLst[i] !=NULL ) + { + _colorLayerImageViewLst[i]->ResetRefresh(); + } + printf("EED ColorLayerImageViewManager::ResetRefresh 2 \n"); } // for i } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx index 7ec645c..f6c85e7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx @@ -363,9 +363,11 @@ void LayerImageBase::GetRangeForColorBar(double &minRange, double &maxRange) //---------------------------------------------------------------------------- void LayerImageBase::ResetRefresh() { + printf("EED LayerImageBase::ResetRefresh A \n"); _Xback = -9999; _Yback = -9999; _Zback = -9999; + printf("EED LayerImageBase::ResetRefresh B \n"); } //---------------------------------------------------------------------------- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx index d2b2e7c..e2e7c36 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkBaseData.cxx @@ -96,7 +96,7 @@ void vtkBaseData::Configure() // virtual } //------------------------------------------------------------------- -void vtkBaseData::SetZ(double z, bool withObserver) // default withObserver=true +void vtkBaseData::SetZ(double z, bool withObserver) { //int maxZ; // int dim[3]; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h index e78285f..6a43c62 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.h @@ -23,13 +23,9 @@ # knowledge of the CeCILL-B license and that you accept its terms. # ------------------------------------------------------------------------ */ - - #ifndef __WX_VTK__BASE__VIEW__H #define __WX_VTK__BASE__VIEW__H - - #include #include #include @@ -39,7 +35,6 @@ #include #include - #include #include @@ -48,8 +43,6 @@ #include - - #include #include "marTypes.h" @@ -61,7 +54,6 @@ //class vtkInteractorStyleBaseView; */ - #include "vtkInteractorStyleImage.h" class creaMaracasVisu_EXPORT wxVtkBaseView{