Program: bbtk
Module: $RCSfile: bbwxCommandButton.cxx,v $
Language: C++
- Date: $Date: 2008/11/24 15:45:51 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/11/25 11:31:03 $
+ Version: $Revision: 1.13 $
=========================================================================*/
/* ---------------------------------------------------------------------
lstColour.push_back(0.75);
lstColour.push_back(0.75);
bbSetInputColour(lstColour);
+ bbSetOutputWidget(0);
}
void CommandButton::Process()
{
- UpdateColour();
- UpdateLabel();
+ CommandButtonWidget* w = (CommandButtonWidget*)bbGetOutputWidget();
+ if (w)
+ {
+ UpdateColour();
+ UpdateLabel();
+ }
}
void CommandButton::UpdateColour()
include vtk/boxes/bbLoadHola
load wxvtk
-load wx
new LoadHola image
new Viewer2D viewer
connect image.Out viewer.In
-load std
-
+# To get the string to int adaptor and set the slice
+load std
set viewer.Slice 20
-#Quick and dirty fix for a known bug
-# viewer2D does not display image when first executed :
-# have to re-execute it after it has been created for example using a button
-new CommandButton refresh
- set refresh.Label "Click here to Refresh"
-
-new LayoutSplit layout
- set layout.Proportion 80
-connect viewer.Widget layout.Widget1
-connect refresh.Widget layout.Widget2
-connect refresh.BoxChange viewer.BoxExecute
-
-set layout.WinTitle "ExampleViewer2D"
-set layout.WinWidth 400
-set layout.WinHeight 400
-
-
-exec layout
+exec viewer
Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.cxx,v $
Language: C++
- Date: $Date: 2008/11/24 15:45:53 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2008/11/25 11:31:08 $
+ Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
z = ext[5]; // Why not?
}
+ std::cout << "V2D Render "<<std::endl;
wxvtkrenderwindowinteractor->Update();
wxvtkrenderwindowinteractor->Render();
imageViewer->GetRenderer()->ResetCameraClippingRange();
{
bbSetInputIn(NULL);
bbSetInputSlice(0);
- bbSetOutputWidget(0);
+ bbSetOutputWidget(0);
bbSetInputOrientation(0);
}
// when window is shown
void Viewer2D::OnShowWidget()
{
-
+ std::cout << "V2D::OnShow"<<std::endl;
+ ((Viewer2DWidget*)bbGetOutputWidget())->Update();
+ ((Viewer2DWidget*)bbGetOutputWidget())->UpdateView();
#if defined(_WIN32)
// ((Viewer2DWidget*)bbGetOutputWidget())->Refresh();
((Viewer2DWidget*)bbGetOutputWidget())->Update();
((Viewer2DWidget*)bbGetOutputWidget())->Update();
((Viewer2DWidget*)bbGetOutputWidget())->UpdateView();
*/
+ std::cout << "V2D::OnShow OK"<<std::endl;
}