# ----------------------------------
-# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
-# - /Users/davila/Creatis/C11/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbg
+# - BBTKGEditor v 1.6 BBG BlackBox Diagram file
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbg
# ----------------------------------
APP_START
CATEGORY:<VOID>
DESCRIPTION:Description ??
AUTHOR:Author ??
+EXPORTFORMAT:0
COMPLEXBOX:TRUE
COMPLEXBOXNAME:ManualPaint2
PACKAGENAME:creaMaracasVisu
BOX
creaMaracasVisu:ManualPaint_Model:Box00
ISEXEC:FALSE
--66.621926:-17.429511:-900.000000
--31.541926:-19.929511:-900.000000
+-67.601620:-24.409982:-900.000000
+-32.521620:-26.909982:-900.000000
PORT
2D3D:"1"
PORT
BOX
wx:RadioButton:Box01
ISEXEC:FALSE
--86.702341:31.013095:-900.000000
--49.862341:28.513095:-900.000000
+-86.702341:30.347478:-900.000000
+-48.102341:27.847478:-900.000000
PORT
In0:"Deselect"
PORT
creaMaracasVisu:ColorLayerImageView:Box03
ISEXEC:FALSE
45.427915:-19.888628:-900.000000
-85.787915:-22.388628:-900.000000
+87.547915:-22.388628:-900.000000
PORT
TypeControlsInterface:"2"
PORT
wx:LayoutLine:Box09
ISEXEC:FALSE
-70.041427:-48.732937:-900.000000
--36.721427:-51.232937:-900.000000
+-34.961427:-51.232937:-900.000000
FIN_BOX
BOX
std:GetVectorStringElement:Box11
BOX
std:TransposeVectorVectorString:Box17
ISEXEC:FALSE
--82.333286:36.474034:-900.000000
--58.898286:33.974034:-900.000000
+-80.170031:40.301330:-900.000000
+-56.735031:37.801330:-900.000000
PORT
In0:"Desactivate Big-Blue Small-Blue Big-Clean Small-Clean"
FIN_BOX
wx:RadioButton:Box18
ISEXEC:FALSE
-229.150922:28.930314:-900.000000
--192.310922:26.430314:-900.000000
+-190.550922:26.430314:-900.000000
PORT
In:"1"
PORT
wx:LayoutLine:Box19
ISEXEC:FALSE
-96.084954:-41.834911:-900.000000
--62.764954:-44.334911:-900.000000
+-61.004954:-44.334911:-900.000000
PORT
Orientation:"H"
FIN_BOX
vtk:UpdateRender:Box27
ISEXEC:FALSE
63.631767:-39.284768:-900.000000
-85.656768:-41.784768:-900.000000
+85.656767:-41.784768:-900.000000
PORT
Active:"true"
FIN_BOX
wx:LayoutLine:Box29
ISEXEC:FALSE
-150.508630:-5.278624:-900.000000
--117.188630:-7.778624:-900.000000
+-115.428630:-7.778624:-900.000000
FIN_BOX
BOX
wx:CommandButton:Box30
ISEXEC:FALSE
-168.207844:3.758670:-900.000000
--145.932844:1.258670:-900.000000
+-145.447844:1.258670:-900.000000
PORT
Label:"Undo"
FIN_BOX
wx:CommandButton:Box31
ISEXEC:FALSE
-143.662996:4.444256:-900.000000
--121.387996:1.944256:-900.000000
+-120.902996:1.944256:-900.000000
PORT
Label:"Redo"
FIN_BOX
wx:LayoutLine:Box36
ISEXEC:FALSE
-206.209254:13.022267:-900.000000
--172.889254:10.522267:-900.000000
+-171.129254:10.522267:-900.000000
PORT
Orientation:"H"
FIN_BOX
wx:RadioButton:Box37
ISEXEC:FALSE
-176.103448:28.466673:-900.000000
--139.263448:25.966673:-900.000000
+-137.503448:25.966673:-900.000000
PORT
In:"1"
PORT
wx:RadioButton:Box39
ISEXEC:FALSE
-151.360228:22.778994:-900.000000
--114.520228:20.278994:-900.000000
+-112.760228:20.278994:-900.000000
PORT
In:"1"
PORT
PORT
In2:"XY"
FIN_BOX
-CONNECTIONS:85
+CONNECTIONS:86
CONNECTION
Box01:Out:Box02:In
NumberOfControlPoints:0
CONNECTION
Box36:Widget:Box19:Widget1
NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box03:BoxExecute
+NumberOfControlPoints:0
APP_END
# ----------------------------------
-# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
-# - /Users/davila/Creatis/C11/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbs
+# - BBTKGEditor v 1.6 BBS BlackBox Script (Complex Box)
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/ManualPaint2.bbs
# ----------------------------------
include std
connect Box39.Out Box00.Direction
connect Box29.Widget Box19.Widget6
connect Box36.Widget Box19.Widget1
+connect Box00.BoxChange Box03.BoxExecute
# Complex input ports
input TitleOptions Box20.In " "
clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , bbGetInputWxVtkBaseView() );
clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 1 , bbGetInputWxVtkBaseView1() );
clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 2 , bbGetInputWxVtkBaseView2() );
+ clivp->GetColorLayerImageViewManager()->ResetRefresh( );
clivp->GetColorLayerImageViewManager()->SetRangeForColorBar( range );
clivp->GetColorLayerImageViewManager()->SetColorBarPosition( colorbarposition );
clivp->GetColorLayerImageViewManager()->SetBaseColors( base_color );
}
//=========================================================================
-
+//----------------------------------------------------------------------------
+void ColorLayerImageViewManager::ResetRefresh()
+{
+ int i,size =_colorLayerImageViewLst.size();
+ for (i=0;i<size;i++)
+ {
+ _colorLayerImageViewLst[i]->ResetRefresh();
+ } // for i
+}
//----------------------------------------------------------------------------
void ColorLayerImageViewManager::SetwxVtkBaseView(int id, wxVtkBaseView *baseview)
virtual int GetX();
virtual int GetY();
virtual int GetZ();
+ void ResetRefresh();
void SetwxVtkBaseView(int id, wxVtkBaseView *baseview);
wxVtkBaseView* GetwxVtkBaseView(int id);
void SetBaseColors(std::vector<double> & base_color);
_baseView = NULL;
_imageReslicer = vtkImageReslice::New();
_imageChangeInformation = vtkImageChangeInformation::New();
+ this->ResetRefresh(); // _Xback=-9999 _Yback=-9999 _Zback=-9999
}
//----------------------------------------------------------------------------
{
vtkImageData *imagebase = GetwxVtkBaseView()->GetVtkBaseData()->GetImageData();
if (imagebase!=NULL)
- {
-
+ {
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
imagebase->GetWholeExtent(ext);
#else
imagebase->GetExtent(ext);
#endif
-
- dimBase[0]=ext[1]-ext[0]+1;
- dimBase[1]=ext[3]-ext[2]+1;
- dimBase[2]=ext[5]-ext[4]+1;
+ dimBase[0] = ext[1]-ext[0]+1;
+ dimBase[1] = ext[3]-ext[2]+1;
+ dimBase[2] = ext[5]-ext[4]+1;
SetDimensionBase(dimBase);
imagebase->GetSpacing(spcBase);
SetSpcBase(spcBase);
-
if ((_X<0) || (_X>dimBase[0])) { SetX( dimBase[0]/2 ); }
if ((_Y<0) || (_Y>dimBase[1])) { SetY( dimBase[1]/2 ); }
- if ((_Z<0) || (_Z>dimBase[2])) { SetZ( dimBase[2]/2 ); }
-
-
+ if ((_Z<0) || (_Z>dimBase[2])) { SetZ( dimBase[2]/2 ); }
} // if imagebase
} // if wxvtkbaseview
_image->GetScalarRange( _range );
// _thresholdTable = vtkLookupTable::New();
-
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_imageChangeInformation->SetInput(_image);
_rangeForColorBar=range;
}
-
//------------------------------------------------------------------------------
void LayerImageBase::GetRangeForColorBar(double &minRange, double &maxRange)
{
}
}
-
+//----------------------------------------------------------------------------
+void LayerImageBase::ResetRefresh()
+{
+ _Xback = -9999;
+ _Yback = -9999;
+ _Zback = -9999;
+}
//----------------------------------------------------------------------------
void LayerImageBase::SetwxVtkBaseView(wxVtkBaseView *baseview)
{
- if (_baseView==NULL)
+ if (_baseView==NULL)
{
- _baseView = baseview;
- ColorLayerObserver *colorlayerobserver = ColorLayerObserver::New();
- _baseView->GetVtkBaseData()->AddObserver( 1, colorlayerobserver );
- colorlayerobserver->SetLayerImageBase(this);
- } // if _baseView
+ _baseView = baseview;
+ ColorLayerObserver *colorlayerobserver = ColorLayerObserver::New();
+ _baseView->GetVtkBaseData()->AddObserver( 1, colorlayerobserver );
+ colorlayerobserver->SetLayerImageBase(this);
+ } // if _baseView
}
//----------------------------------------------------------------------------
} // if _baseView
}
-
//----------------------------------------------------------------------------
vtkLookupTable* LayerImageBase::GetThresholdTable()
{
}
}
+// EED 2025-09-16 Borrame
+// ok=true;
+//
+
if ( (_image!=NULL) && (_baseView!=NULL) && (ok==true) )
{
double x = GetX();
void GetRangeForColorBar(double &minRange, double &maxRange);
void SetColorBarPosition(std::vector<int> &colorbarposition);
void UpdateColorBarPosition();
+ void ResetRefresh();
void SetwxVtkBaseView(wxVtkBaseView *baseview);
void onThreshold();