<process>
<PRE>
- SetInput(bbGetInputIn1());
- SetInput(bbGetInputIn2());
- SetInput(bbGetInputIn3());
- SetInput(bbGetInputIn4());
- SetInput(bbGetInputIn5());
+ bbSetOutput((vtkPolyData *)0);
Update();
</PRE>
* TYPE is the C++ type of the input/output
(the one provided in the attribute 'type' of the tag 'input') -->
- <process><PRE>
+ <process>
+ <PRE>
bbSetOutputOut( bbGetInputIn() );
std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
- </PRE></process>
+ </PRE>
+ </process>
<!--=====================================================================-->
<!--========================================================================
THE CONSTRUCTION METHOD BODY :
Here initializes the input 'In' to 0
This is also where you should allocate the output pointers -->
- <constructor><PRE>
+ <constructor>
+ <PRE>
bbSetInputIn(0);
- </PRE></constructor>
+ </PRE>
+ </constructor>
<!-- THE COPY-CONSTRUCTION METHOD BODY :
Here does nothing
But this is where you should allocate the output pointers if any
and copy the pointed values (to avoid bug caused by multiple references)-->
- <copyconstructor><PRE>
- </PRE></copyconstructor>
+ <copyconstructor>
+ <PRE>
+ </PRE>
+ </copyconstructor>
<!-- THE DESTRUCTION METHOD BODY :
Here does nothing
but this is where you should desallocate the output pointers if any -->
- <destructor><PRE>
- </PRE></destructor>
+ <destructor>
+ <PRE>
+ </PRE>
+ </destructor>
<!--=====================================================================-->
<!--=======================================================================-->
# (the one provided in the attribute 'name' of the tag <input>)
# * TYPE is the C++ type of the input/output
# (the one provided in the attribute 'type' of the tag <input>)
- <process><PRE>
+ <process>
+ <PRE>
bbSetOutputOut( bbGetInputIn() );
std::cout << "Here I am !" << std::endl;
- </PRE></process>
+ </PRE>
+ </process>
#============================================================================
#============================================================================
# This is also where you should allocate the output pointers
<constructor><PRE>
bbSetInputIn(0);
- </PRE></constructor>
+ </PRE>
+ </constructor>
# THE COPY-CONSTRUCTION METHOD BODY :
# Here does nothing
# But this is where you should allocate the output pointers if any
# and copy the pointed values (to avoid bug caused by multiple references)
- <copyconstructor><PRE>
- </PRE></copyconstructor>
+ <copyconstructor>
+ <PRE>
+
+ </PRE>
+ </copyconstructor>
# THE DESTRUCTION METHOD BODY :
# Here does nothing
# but this is where you should desallocate the output pointers if any
- <destructor><PRE>
- </PRE></destructor>
+
+ <destructor>
+ <PRE>
+ </PRE>
+ </destructor>
#============================================================================
#============================================================================
{
bbtk::GetTextOrClear(BB.getChildNode("constructor"),mUserConstructor);
}
+
// UserCopyConstructor body
if (BB.nChildNode("copyconstructor"))
{
bbtk::GetTextOrClear(BB.getChildNode("copyconstructor"),mUserCopyConstructor);
}
+
// UserDestructor body
if (BB.nChildNode("destructor"))
{
{
bbtk::GetTextOrClear(BB.getChildNode("process"),mProcess);
}
+
// CreateWidget
// createwidget tag given ?
if (BB.nChildNode("createwidget"))
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/07/23 11:46:11 $
- Version: $Revision: 1.69 $
+ Date: $Date: 2008/09/10 12:01:46 $
+ Version: $Revision: 1.70 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
info.argmax = 2;
info.code = cWorkspace;
info.syntax = "workspace < ( freeze | unfreeze ) | ( rename <newname> ) >";
- info.help = "Configures the workspace.\n 'freeze' allow to block execution commands while keeping definition commands active. 'unfreeze' turns back the worspace in 'normal' mode.\n 'rename' allow to set a new name to the workspace.";
+ info.help = "Configures the workspace.\n 'freeze' allows to block execution commands while keeping definition commands active. 'unfreeze' turns back the worspace in 'normal' mode.\n 'rename' allow to set a new name to the workspace.";
mCommandDict[info.keyword] = info;
*/
c = mCommandDict.find(s);
if ( c == mCommandDict.end() ) {
bbtkError(s<<" : Unknown command");
- }
+ }
// std::cout << " " << s << " : "<< std::endl;
// CommandParamDictType::iterator i;
// for ( i = c->second.begin();
0, // performance and mapping flags
s, // wide-character string
l, // number of chars in string
- NULL, // buffer for new string
+ NULL, // buffer for new string
0, // size of buffer
NULL, // default for unmappable chars
NULL // set when default char used
);
if (i<0) return NULL;
char *d=(char*)malloc(i+1);
- WideCharToMultiByte(codePage, // code page
+ WideCharToMultiByte(codePage,// code page
0, // performance and mapping flags
s, // wide-character string
l, // number of chars in string
=== Here are the current categories ===
-Those with a ? are submitted for approval ...
--> This list is now on
-http://www.creatis.insa-lyon.fr/mywiki/Informatique/bbtk
+http://www.creatis.insa-lyon.fr/mywiki/Informatique/bbtk : ?!? JPRx
adaptor : Adaptor box
-application : Final application
+application : Final application, end user intended
atomic box : System category.
Automatically assigned to Atomic Black Boxes (c++ defined)
complex box : System category.
Automatically assigned to Complex Black Boxes (script defined)
-command line : Script which defines a command line application (no embedded GUI, but command line imput parameters)
+command line : Script which defines a command line application
+ (no embedded GUI, but command line imput parameters)
demo : Demonstration
-? devel : Developer tool (bbCreatePackage.bbs, ...)
+devel : Developer tool (bbCreatePackage.bbs,
example : Example script showing a box use-case
-filter :
+filter : Image processing box
image : Image processing related box
interaction :
-math :
+math : Mathematical operations
mesh : Mesh processing related box
misc : A box that cannot be put in other category !
read/write : Box that read or write data from or to disk
-test : REMOVED : UPDATE BOXES !
-? tool : ?
viewer : Box which displays some data
widget : Piece of graphical interface
-
+3D object creator : Sophisticated 3D widget
+toolsbbtk : Component of bbStudio
set rb.In2 "Two/Dos/Thayn"
set rb.In4 "Four/Quatro/Arbaa"
set rb.In5 "Five/Cinco/Khamsin"
- set rb.In8 "Twelve/Ocho/Thamanya"
+ set rb.In8 "Eight/Ocho/Thamanya"
set rb.In 2
-
-print $rb.Out$\n
+ set rb.WinHeight 160
+ set rb.WinWidth 300
+
+print $Initial value : rb.Out$\n
new OutputText t
set t.Title "This is what you clicked"
define LayoutTDown wx
-description "Creates a complex box : Down {UpLeft, UpRight} "
+description "Creates a 'T like' complex container : Down {UpLeft, UpRight} "
author "jean-pierre.roux@creatis.univ-lyon1.fr"
category "complex box, widget"
new LayoutSplit up
connect up.Widget currentBox.Widget1
-
+
set up.Orientation H
- input Widget1 up.Widget1 "UpLeft"
- input Widget2 up.Widget2 "UpRight"
- input Widget3 currentBox.Widget2 "Down"
+new MultipleInputs m
+ connect currentBox.BoxChange m.In1
+ connect up.BoxChange m.In2
+
+ input WinTitle currentBox.Title "Title of the window (*)"
+ input WinHeight currentBox.WinHeight "Height of the window (*)"
+ input WinHide currentBox.WinHide "Any signal received hides the window (*)"
+ input WinClose currentBox.WinClose "Any signal received closes the window (*)"
+ input WinWidth currentBox.WinWidth "Width of the window (* : only used if the widget is not connected to a Layout box)"
+
+ input Widget1 up.Widget1 "UpLeft container"
+ input Widget2 up.Widget2 "UpRight container"
+ input Widget3 currentBox.Widget2 "Down container"
+ output Widget currentBox.Widget "Widget"
+
+ output BoxChange m.Out "BoxChange"
endefine
define LayoutTLeft wx
-description "Creates a complex box : Left {RigthUp, RightDown}"
+description "Creates a 'T like' complex container: Left {RigthUp, RightDown}"
author "jean-pierre.roux@creatis.univ-lyon1.fr"
category "complex box, widget"
set right.Orientation V
- input Widget1 currentBox.Widget1 "Left"
- input Widget2 right.Widget1 "RightUp"
- input Widget3 right.Widget2 "RightDown"
+ input Widget1 currentBox.Widget1 "Left container"
+ input Widget2 right.Widget1 "RightUp container"
+ input Widget3 right.Widget2 "RightDown container"
endefine
// ---------------
define LayoutTRight wx
-description "Creates a complex box : Right {LeftUp, LeftDown}"
+description "Creates a 'T like' complex container : Right {LeftUp, LeftDown}"
author "jean-pierre.roux@creatis.univ-lyon1.fr"
category "complex box, widget"
set left.Orientation V
- input Widget1 left.Widget1 "LeftUp"
- input Widget2 currentBox.Widget2 "Right"
- input Widget3 left.Widget2 "LeftDown"
+ input Widget1 left.Widget1 "LeftUp container"
+ input Widget2 currentBox.Widget2 "Right container"
+ input Widget3 left.Widget2 "LeftDown container"
endefine
// ----------------
define LayoutTUp wx
-description "Creates a complex box : Up {DownLeft, DownRight} as w1{w2,w3}"
+description "Creates a 'T like' complex container : Up {DownLeft, DownRight} as w1{w2,w3}"
author "jean-pierre.roux@creatis.univ-lyon1.fr"
category "complex box, widget"
set down.Orientation H
- input Widget1 currentBox.Widget1 "Up"
- input Widget2 down.Widget1 "DownLeft"
- input Widget3 down.Widget2 "DownRight"
+ input Widget1 currentBox.Widget1 "Up container"
+ input Widget2 down.Widget1 "DownLeft container"
+ input Widget3 down.Widget2 "DownRight container"
endefine
Program: bbtk
Module: $RCSfile: bbwxColourSelector.cxx,v $
Language: C++
- Date: $Date: 2008/06/26 07:37:11 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/09/10 12:01:47 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
/**
- * \file
- * \brief
+ * \file
+ * \brief Short description in one line
+ *
+ * Long
+ * description
+ *
*/
#ifdef _USE_WXWIDGETS_
{
}
- void ColourSelector::Process()
- {
+ void ColourSelector::Process()
+ {
bbtkDebugMessageInc("Core",9,"ColourSelector::Process() ["
<<bbGetFullName()<<"]"<<std::endl);
wxColour& c = colordialog->GetColourData().GetColour();
sprintf(col,"%f %f %f",c.Red()/255.,c.Green()/255.,c.Blue()/255.);
bbSetOutputOut( col );
- } else {
+ } else {
bbSetOutputOut("");
}
- bbtkDebugDecTab("Core",9);
+ bbtkDebugDecTab("Core",9);
}
// void ColourSelector::CreateWidget()
Program: bbtk
Module: $RCSfile: bbwxColourSelector.h,v $
Language: C++
- Date: $Date: 2008/07/25 07:44:12 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/09/10 12:01:47 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
+
=========================================================================*/
- /**
+/**
* \file
* \brief Short description in one line
*
#ifdef _USE_WXWIDGETS_
-
+// Prevents multiple inclusions : use symbols of the form
+// __FILENAME_INCLUDED__
+// where FILENAME must be replaced by the actual file name
#ifndef __bbWxColourSelector_h__
#define __bbWxColourSelector_h__
+// Include wxBlackBox definition
#include "bbtkWxBlackBox.h"
// Namespace of the package "wx" is "bbwx"
// private:
// wxColourSelector* mColorDialog;
};
- //=================================================================
//=================================================================
// UserBlackBox description
BBTK_NAME("ColourSelector");
BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
BBTK_DESCRIPTION("Colour Selector dialog (bbfication of wxColourSelector)");
- BBTK_OUTPUT(ColourSelector,Out,"The colour selected by the user",std::string,"colour");
+ BBTK_OUTPUT(ColourSelector,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string,"colour");
BBTK_END_DESCRIBE_BLACK_BOX(ColourSelector);
//=================================================================
-}
-
-//namespace bbtk
-#endif //__bbtkWxColourSelector_h__
+}//namespace bbtk
+#endif // __bbtkWxColourSelector_h__
#endif //_USE_WXWIDGETS_
Program: bbtk
Module: $RCSfile: bbwxColourSelectorButton.cxx,v $
Language: C++
- Date: $Date: 2008/04/18 12:59:52 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/09/10 12:01:47 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
/**
- * \file
+ * \file
* \brief Short description in one line
*
- * Long
+ * Long
* description
- *
- */
+ *
+ */
#ifdef _USE_WXWIDGETS_
namespace bbwx
{
-
//-------------------------------------------------------------------------
-wxColourPickerCtrlWidget::wxColourPickerCtrlWidget( ColourSelectorButton* box,
+wxColourPickerCtrlWidget::wxColourPickerCtrlWidget( ColourSelectorButton* box,
wxWindow *parent,
unsigned char cr,
unsigned char cg,
);
picker->SetPickerCtrlGrowable(false);
picker->SetTextCtrlGrowable(false);
-
+
Connect ( picker->GetId(),
wxEVT_COMMAND_COLOURPICKER_CHANGED,
wxColourPickerEventHandler( wxColourPickerCtrlWidget::OnColorChange ) );
-
+
bbtkDebugMessage("Process",9,"<= wxColourPickerCtrlWidget::wxColourPickerCtrlWidget"<<std::endl);
wxFlexGridSizer *sizer = new wxFlexGridSizer(10);
sizer -> AddGrowableRow(0);
- sizer -> Add( picker, 1, wxEXPAND, 0 );
+ sizer -> Add( picker, 1, wxEXPAND, 0 );
panel -> SetSizer(sizer);
}
Program: bbtk
Module: $RCSfile: bbwxColourSelectorButton.h,v $
Language: C++
- Date: $Date: 2008/07/25 07:44:12 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/09/10 12:01:47 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
-
+
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
-
+
=========================================================================*/
+
/**
* \file
* \brief Short description in one line
namespace bbwx
{
+ //=================================================================
class ColourSelectorButton;
class wxColourPickerCtrlWidget :public wxPanel
{
public:
- wxColourPickerCtrlWidget( ColourSelectorButton* box,
- wxWindow *parent,
+ wxColourPickerCtrlWidget( ColourSelectorButton* box,
+ wxWindow *parent,
unsigned char cr,
unsigned char cg,
unsigned char cb );
void OnColorChange(wxColourPickerEvent& e);
void UpdateBox();
private:
- wxColourPickerCtrl *picker;
+ wxColourPickerCtrl *picker;
ColourSelectorButton *mBox;
};
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
-
-
-
//------------------------------------------------------------------------
// The black box
class /*BBTK_EXPORT*/ ColourSelectorButton : public bbtk::WxBlackBox
- {
+ {
BBTK_BLACK_BOX_INTERFACE(ColourSelectorButton,bbtk::WxBlackBox);
BBTK_DECLARE_INPUT(In,std::string);
BBTK_DECLARE_OUTPUT(Out,std::string);
void CreateWidget();
protected:
- virtual void bbUserConstructor();
-
+ virtual void bbUserConstructor();
+
private:
wxColourPickerCtrlWidget* pickerWidget;
};
-
+
//=================================================================
// UserBlackBox description
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourSelectorButton,bbtk::WxBlackBox);
+ // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_NAME("ColourSelectorButton");
BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
- // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
BBTK_DESCRIPTION("A button which displays a colour picker dialog when clicked");
BBTK_INPUT(ColourSelectorButton,In,"Initial colour",std::string,"colour");
BBTK_OUTPUT(ColourSelectorButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string,"colour");
BBTK_END_DESCRIBE_BLACK_BOX(ColourSelectorButton);
//=================================================================
-
-
-}//namespace bbwx
-#endif // __bbwxColourSelectorButton_h_INCLUDED_H__
+}//namespace bbtk
+#endif // __bbtkWxColourSelector_h__
#endif //_USE_WXWIDGETS_
define DoubleSlicer
- description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#DemoDoubleSlicer'>DemoDoubleSlicer.bbs</a>."
+ description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#ExampleDoubleSlicer'>ExampleDoubleSlicer.bbs</a>."
author "laurent.guigues at creatis.insa-lyon.fr"
new LayoutLine main
define SimpleSlicer wxvtk
- description "Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#DemoSimpleSlicer'>DemoSimpleSlicer.bbs</a>. Screenshot : <center><img src='DemoSimpleSlicer.png'></center>"
+ description "Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See <a href='#ExampleSimpleSlicer'>ExampleSimpleSlicer.bbs</a>. Screenshot : <center><img src='ExampleSimpleSlicer.png'></center>"
author "laurent.guigues@creatis.insa-lyon.fr"
category "viewer"
new LayoutLine main
new Viewer2D viewer2D
new Slider slider
- # WE NEED A MultipleInputs BOX TO CONNECT BOTH
- # slider.BoxChange AND THE INPUT BoxExecute
- # OF THE COMPLEX BOX TO viewer2D.BoxExecute
+
+ # WE NEED a MultipleInputs Box to connect BOTH
+ # slider.BoxChange AND the input BoxExecute
+ # of the Complex box to viewer2D.BoxExecute
+
new MultipleInputs refresh
connect viewer2D.Widget main.Widget1
Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.h,v $
Language: C++
- Date: $Date: 2008/07/03 13:59:37 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2008/09/10 12:01:48 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_BEGIN_DESCRIBE_BLACK_BOX(Viewer2D,bbtk::WxBlackBox);
BBTK_NAME("Viewer2D");
BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
- BBTK_DESCRIPTION("Viewer2D widget (vtk)");
+ BBTK_DESCRIPTION("2D Viewer widget (vtk)");
BBTK_CATEGORY("viewer");
BBTK_INPUT(Viewer2D,Slice,"Initial Slice number",int,"");
BBTK_INPUT(Viewer2D,Orientation,"Slicing orientation : 0:yz / 1:xz / 2:xy",int,"");
Program: bbtk
Module: $RCSfile: bbwxvtkViewer3D.h,v $
Language: C++
- Date: $Date: 2008/06/26 18:45:58 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/09/10 12:01:48 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_BEGIN_DESCRIBE_BLACK_BOX(Viewer3D,bbtk::WxBlackBox);
BBTK_NAME("Viewer3D");
BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
- BBTK_DESCRIPTION("3D Viewer (vtk)");
+ BBTK_DESCRIPTION("3D Viewer widget (vtk)");
BBTK_CATEGORY("viewer");
BBTK_INPUT(Viewer3D,In1,"Input actor",vtkProp3D *,"");
BBTK_INPUT(Viewer3D,In2,"Input actor",vtkProp3D *,"");