1 % ==========================================
2 \documentclass[11pt,final,a4paper]{article}
17 \bbtk version \bbtkVersion
21 Last modified on : October 12, 2008 \\
26 Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
29 CREATIS-LRMN, Centre de Recherche en Imagerie Medicale \\ CNRS UMR 5220, INSERM U620\\
31 Universit\'e Claude-Bernard Lyon 1
34 % ==========================================
36 % ==========================================
44 % ==========================================
46 % ==========================================
48 % ==========================================
50 \section{What is bbtk ?}
51 % ==========================================
52 \BBTK(\bbtkns) is a set of tools
53 (\CPP libraries and executables)
54 providing a \CPP framework for the definition
55 of elementary processing \emph{units}, called {\bf black boxes},
56 and the definition and execution of processing \emph{chains}
57 made up of these black boxes. \\
58 It's a part of the \texttt{Creatools suite} composed mainly of :
66 which depend on the OpenSource libraries:
74 % ==========================================
75 \subsection{The black box philosophy}
76 % ==========================================
78 \href{http://www.answers.com/topic/black-box-theater}{The Answers Dictionary} defines a {\bf black box} as
79 \emph{``A device or theoretical construct with known or specified performance characteristics
80 but unknown or unspecified constituents and means of operation''} \\
81 \href{http://en.wikipedia.org/wiki/Black_box_\%28disambiguation\%29}{Wikipedia}
82 defines a {\bf black box} as
83 \emph{``any component in a system in which only the input and output
84 characteristics are of interest, without regard to its internal mechanism
86 We should merge theese definitions. :
87 not only the inputs and outputs are of interest but also
88 \emph{what the box does} !
89 Hence, I would say that a black box is any \emph{\bf documented}
90 component of a system, letting the user know
91 \emph{\bf what} the box is supposed to do and
92 \emph{\bf how to use it}
93 but not \emph{\bf how it does it}. \\
95 \BBTK provides a systematic framework
96 to encapsulate (or ``wrap'') any
97 existing \texttt{C} or \CPP processing code into an object
98 (a black box) having a {\bf generic symbolic interface}, where
101 \item{\bf generic} means that the interface is \emph{the same}
102 for all boxes. Hence one does not need to know which particular
103 method allows, say, to set a particular input or
104 get a particular output of the box.
105 One can use a black box in a purely abstract way.
106 \item{\bf symbolic} means that a particular
107 input or output is referenced by a 'name', that is by a symbol
108 which identifies the input or output.
109 It also means that symbolic information (text) is
110 attached to a box: description of the box, author,
111 description of its inputs and outputs, etc.
114 (Actually, genericity is achieved because the interface is symbolic.
115 We let you think about this\dots)
117 Of course, symbolic data attached to a box may be
118 {\bf queried} : what are the inputs/outputs of the box ?
119 what are their type ? their description ? etc.
120 This allows {\bf automatic documentation} of boxes.
122 The abstract definition of black boxes is the most basic
123 aspect of \BBTK architecture.
124 Another key aspect is the groupement of black boxes into
125 so called {\bf packages},
126 which are \emph{dynamic libraries} which can also
127 be queried, in particular about the boxes they provide.
128 The package structure then offers a mechanism which
129 is like a \emph{'plug-in'} mechanism.
130 \BBTK provides the methods to load a package at run-time,
131 and create instances of the boxes it contains.
133 These two mechanisms (black boxes and packages)
134 then gives the way to:
137 \item The definition of an {\bf interpreted script language},
138 which allows to manipulate packages and boxes very easily in symbolic way.
139 \BBTK provides one : \bbi (the Black Box Interpreter).
140 \item {\bf Automatic documentation} of existing packages.
141 \texttt{html} documentation of packages is proposed by
145 Finally, these different components allow {\bf efficient} :
148 \item {\bf capitalization and reuse} of existing processing units,
149 including {\bf documentation}
150 \item {\bf testing, prototyping} in a very simple script language
151 \item {\bf inter-operability} between atomic processings which
152 have been written by different persons, using different libraries, etc.
155 % ==========================================
156 \subsection{\bbtk components}
157 % ==========================================
160 \item A \CPP {\bf\emph{library}} - called \bbtk - which defines a framework
161 (abstract classes) to develop black boxes and store them into
162 dynamic libraries, called black box \emph{packages}.
163 \item Different {\bf\emph{black box packages}} :
165 \item {\bf\emph{std}} : the 'standard' package including basic useful boxes.
166 \item {\bf\emph{wx}} : basic graphical interface elements (widgets : sliders, buttons, etc. based on the \texttt{wxWidgets} library).
167 \item {\bf\emph{itk}} : the basic image processing package, based on the \itk library.
168 \item {\bf\emph{vtk}} : the basic images and surfaces processing and visualization package, based on the \vtk library.
169 \item {\bf\emph{wxvtk}} : widget boxes based on the \vtk library (2D and 3D vizualization and
171 %\item {\bf\emph{creaImageIO}} : Provides hight level widgets to read images, including DICOM.
172 \item {\bf\emph{toolsbbtk}} : Tools for bbtk administration and package development..
174 \item A {\bf\emph{Developement environment}}, called \bbStudio, which provides
176 \item An online {\bf\emph{script editor and interpretor}}
177 \item A powerful html {\bf\emph{Help environment}}, integrating :
179 \item Online documentation scaning
180 \item Retreiving boxes on various criterions
181 \item Checking Demo and examples
184 \item An standalone {\bf\emph{interpreter}}, called \bbins, which allows to
185 load black box packages and to define and execute
186 processing chains by connecting various black boxes.
187 \item {\bf\emph{Various Development Utilities}} :
189 \item \bbfy generates the \CPP code of a black box from a
190 description file written in \texttt{xml}.
191 %\item \bbdoc generates the html documentation of a black box package
192 %(author, description, description of its black boxes :
193 %author, description, inputs, outputs, and so on).
194 \item \bbCreatePackage allows to create the basic file architecture
195 to start the development of a new black box package.
196 \item \text{bbCreateBlackbox} allows to create the basic file architecture
197 to start the development of a new black box, that will be included in an already existing package.
198 \item \texttt{bbs2cpp} translates a \texttt{.bbs} script into a \CPP file.
199 \item \texttt{bbc} that interprets (i.e. : executes) a \texttt{.bbs} script.
201 \item A full {\bf\emph{documentation}} printable (pdf), browsable (html),
202 queryable throught keywords.
205 The general architecture of \BBTK
206 is shown in figure \ref{bb-architecture}.
209 \caption{\label{bb-architecture}\BBTK architecture}
211 \includegraphics[width=0.6\textwidth]{bb-architecture.png}
217 % ==========================================
218 \section{Getting started with bbStudio}
219 % ==========================================
221 % ==========================================
222 % ==========================================
223 % ==========================================
224 % ==========================================
225 % ==========================================
226 % ==========================================
228 % ==========================================
229 \subsection{The interface}
230 % ==========================================
233 %\vspace{0.5cm}\hrule
234 %\section{The Development environment (bbStudio)}
237 Just run it, typing in a console \bbStudio
238 or clicking on its icon or its menu entry.
239 At start, \bbStudio opens with a very minimal 'How to use' in the middle. \\
240 Don't forget to read it : it will vanish at the first mouse click. \\
242 1) Click on the 'Demo' or 'Examples' link.
243 2) Select a Demo or an Example
244 3) Click on the [Source] link : the source file is loaded in bbStudio
245 4) Click on the 'Run button' (the down arrow at the bottom right
249 You'll get something like in figure
250 \ref{bbi-fig-bbStudio-gui-start}
251 (the exact appearance of \bbStudio is Operating System and \bbtk version dependent)
257 \caption{\label{bbi-fig-bbStudio-gui-start}The bbStudio Development environment interface at start time}
259 \includegraphics[width=0.7\textwidth]{bbStudioMainPageStart.png}
264 Feel free to resize any part you want.
265 Your preferences will be kept next time you run again \bbStudio. \\
267 Let's have a look at the resized window :
270 \caption{\label{bbi-fig-bbStudio-gui}The bbStudio Development environment interface}
272 \includegraphics[width=0.7\textwidth]{bbStudioMainPage.png}
276 You can see four parts : \texttt{Files}, \texttt{Messages},
277 \texttt{Command}, \texttt{Help}.\\
279 The stuff is written using the Advanced User Interface library of wxWidgets
281 whose 'docking manager' allows windows and toolbars to be floated/docked
283 Please don't use this feature at learning time (the snapshots of this document
284 wouldn't match with your screen ...)
286 \subsubsection{'Files' part}
287 \label{bbi-FilesPart}
289 It's the .bbs script editor.\\
290 If you load a file holding a script, it will be displayed here, and you'll be
291 able to modify it, to save it, to save-as it, to run it, using the
292 lower toolbar (see figure : \ref{lowertoolbar})
295 \caption{\label{lowertoolbar}The lower tool bar}
297 \includegraphics[width=0.7\textwidth]{lowertoolbar2.png}
303 % \item {\bf\emph{New file}} : Create a new file to hold a script
304 % \item {\bf\emph{Open file}} : Open an already existing file holding a script
305 % \item {\bf\emph{Close file}} : Close a file holding a script
306 % \item {\bf\emph{Save file}} : Save he current file (if modified)
307 % \item {\bf\emph{Save file as}} : Save he current file under a different name
308 % \item {\bf\emph{Run file}} : Execute the script you just loaded/modified/written
309 % \item {\bf\emph{cursor position}} : column number : line number
313 \subsubsection{'Messages' part}
314 \label{bbi-MessagesPart}
316 Two kinds of messages will be output here:\\
317 System messages : produced by the kernel, in case of a user mistyping, or an execution error\\
318 Script messages : produced by the \bbtk equivalent of \texttt{printf}
319 or \texttt{std::cout} in user programs
321 \subsubsection{'Command' part}
322 \label{bbi-CommandPart}
324 This is where user will type his requirements.
326 \subsubsection{'Help Contents' part}
327 \label{bbi-HelpContentsPart}
329 The 'Help Contents' part of \bbStudio is used to browse the html help of \BBTK.
330 All the entries of the starting page are self-explanatory :
332 \item {\bf\emph{Help Contents}}
334 %\item {\bf\emph{Wiki}} : Direct link to the bbtk Wiki (intranet only, right now, www
336 \item {\bf\emph{Demo}} : Link to some 'sophisticated' demonstrations.
337 \item {\bf\emph{Examples}} : Link to some detailed 'How to use' examples
340 \item {\bf\emph{Guides}}
342 \item {\bf\emph{User's Guide}} : Step to step How-to for user who wants to create his own
343 application, just using already existing boxes.
344 \item {\bf\emph{Package Developper's Guide}} : Step to step How-to for user who wants to create his own
346 \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers. .
347 \item {\bf\emph{Reference Manual}} :
348 \item {\bf\emph{Booklet}} : Vade mecum.
349 \item {\bf\emph{Doxygen Documentation}} : Doxygen source browser.
352 \item {\bf\emph{Boxes}} : Box retrieving on various criterions :
354 \item {\bf\emph{ \texttt{By name}}} (Alphabetical list),
355 \item {\bf\emph{ \texttt{By package}}},
356 \item {\bf\emph{ \texttt{By category}}}.
359 A special hidden Box category, called \texttt{{Adaptors}} exists. \\
360 They are used internaly to perform type conversions. Thought there are not end user intended, you may query them.
366 % ==========================================
371 % ==========================================
372 % ==========================================
373 % ==========================================
374 % ==========================================
375 % ==========================================
380 % ==========================================
384 % ==============================================
385 \subsection{Running Demo and Examples}
386 % ==============================================
388 Run \bbStudio the way you need. \\
389 In the part 'Help contents' (See figure \ref{HelpContents}), select \texttt{Examples} link.
392 \caption{\label{HelpContents}Help Contents}
394 \includegraphics[width=0.7\textwidth]{HelpContents.png}
400 You will be asked to select a Box category (See figure \ref{BoxCategories}); \\
401 Select \texttt{example}.
405 \caption{\label{BoxCategories}Box Categories}
407 \includegraphics[width=0.7\textwidth]{BoxCategories.png}
411 You will be asked to choose a script (See figure \ref{example}).
414 \caption{\label{example}example list}
416 \includegraphics[width=0.7\textwidth]{example.png}
422 Select \texttt{wx::exampleSlider} (See figure \ref{exampleSlider});
425 \caption{\label{exampleSlider}example 'exampleSlider'}
427 \includegraphics[width=0.7\textwidth]{exampleSlider.png}
431 You can see the graphical summary representation of the current script (the elementary boxes that compose it, and their
433 Click on \texttt{source}, and you'll be able to see the (very simple) script,
434 in the 'Files' part, within the script editor (See figure \ref{exampleSliderSource});
437 \caption{\label{exampleSliderSource}source code of 'exampleSlider'}
439 \includegraphics[width=0.7\textwidth]{exampleSliderSource.png}
443 Run it, using the lower toolbar (see figure : \ref{lowertoolbar})
445 You'll get something like in figure \ref{execSliderSource}.
448 \caption{\label{execSliderSource}execution of 'exampleSlider'}
450 \includegraphics[width=0.7\textwidth]{execSliderSource.png}
454 Feel free to move the slider, to check it actually works...
458 Just a few words on what you saw :
460 \item{in the File part} \\
461 The source code of the script
464 set slider.ReactiveOnTrack 1
466 We create a \texttt{Slider} called \emph{slider}\\
467 We tell it to inform anybody that's interested in, that the cursor moved, each time it moved. \\
468 The deafuault behaviour is to inform, only when cursor is released.
472 We create a \texttt{OutputText} called \emph{text}
473 (in which slider value will be displayed)
476 new LayoutLine layout
478 We create a \texttt{LayoutLine} called \emph{layout},
479 a \emph{container} widget, designed to embed other wigets (say, a main window)
481 connect slider.Widget layout.Widget1
482 connect text.Widget layout.Widget2
484 We embed \emph{slider} and \emph{text} into \emph{layout}.
486 connect slider.BoxChange text.BoxExecute
487 connect slider.Out text.In
489 We tell \emph{slider} to inform \emph{text} every time it's modified.\\
490 We tell \emph{slider} to pass its output value (\texttt{Out} to \emph{text} input value (\texttt{In})
494 We tell \emph{layout} to process itself (it will do it only if it's warned
495 that one of its entries was modified since its (own) last processing.
497 \item{in the Help part}
499 You can see the graphical representation of the script, as in figure \ref{SmallGraph}.
503 \caption{\label{SmallGraph}Graphical representation of a script}
505 \includegraphics[width=0.7\textwidth]{SmallGraph.png}
509 Both graphical pipe line (\emph{slider} and \emph{text} are embedded into \emph{layout})
510 and processing pipe line (\emph{slider} warns \emph{text} immedialtely when it's modified, \emph{slider} passed \emph{text} its new value).\\
511 Yes, we know : all the arrows (pipe line arrows and processing arrows) are blue; we are sorry about that...\\
513 You could get a much more detailled graph, just clicking on the button \\ \texttt{graph (detailled)} in the toolbar of the \texttt{Command} part, like in
514 figure \ref{LargeGraph}.
517 \caption{\label{LargeGraph}Detailled graphical representation of a script}
519 \includegraphics[width=0.75\textwidth]{LargeGraph.png}
526 % ==============================================
527 \subsection{Online Help}
528 % ==============================================
530 Various levels or help are suplied by \bbStudions.
532 % ==========================================
533 \subsubsection{Command line help}
534 % ==========================================
537 The 'working' area (the left one, as opposed to the 'help' area, on the right side) is composed of :
538 one single line area (\texttt{Command}), at the bottom in which you can enter your commands and
539 a multiple line zone in which the Command interpreter prints out the result of your commands.
540 The upper part contains the script editor; we shall not use it right now, you may reduce it
542 Try typing in the \texttt{Command} area (in this manual,
543 the commands entered by the user will be preceded by a prompt \textgreater) :
548 you get the list of the commands of the interpreter :
581 To get help on a particular command type \texttt{help <command-name>},
589 usage : author <string>
590 Adds the string <string> to the author information of the black box being defined
593 The \texttt{help} command has multiple usages.
594 It is used to get help about almost anything in the interpretor!
595 Type \texttt{'help help'} to get help on the \texttt{help} command itself :
600 (2) help <command name>
601 (3) help packages [all]
602 (4) help <package name> [all]
603 (5) help <black box type>
604 (6) help <black box name>
606 (1) Lists all available commands;
607 (2) Prints help on a particular command;
608 (3) Lists the packages loaded and their black boxes.
609 Add 'all' to list adaptors;
610 (4) Prints short help on the black boxes of a package.
611 Add 'all' to include adaptors;
612 (5) Prints full help on a black box type;
613 (6) Prints information on the inputs, outputs and connectionns
614 of a black box instance.
617 At start the interpretor does not know any black box.
618 If you type \texttt{'help packages'}, which is
619 the third form of the \texttt{help} command, you get :
626 which means that the interpretor only knows one package
627 (library of black boxes) called \texttt{user}
628 and which contains a black box called \texttt{workspace}.
629 The \texttt{user} package is an internal package of the interpreter,
630 which stores user-defined black box types.
631 At start, it already contains
632 one box, called \texttt{workspace}.
633 \texttt{workspace} is a special type of black box,
634 called complex black box, whose purpose is
635 to store other black boxes.
636 Any black box you create in \bbStudio is stored
637 in \texttt{workspace}
638 (this will be explained in details in sections
639 \ref{bbi-writing-scripts} and
640 \ref{bbi-more-on-complex-black-boxes}).
642 If you type \texttt{'help workspace'}, you get :
645 Complex Black Box <user::workspace>
648 Category(s) : complex box;
654 In the text displayed,
655 the \texttt{user::} prepended to the name \texttt{workspace}
656 means that the box \texttt{workspace}
657 belongs to the \texttt{user} package.
658 Then comes a description and three lines which
659 tell that \texttt{workspace} does not have any input
660 nor output nor boxes yet.
662 In order to let the interpreter know of some black boxes,
663 you must load another package.
664 The \texttt{std} package is the ``standard'' package,
665 which contains basic useful black boxes.
677 you get something like :
682 ASCII : ascii codes sequence to string - string to ascii...
683 Add : Adds its inputs
684 ConcatStrings : String concatenation
685 Configuration : Gets configuration informations
686 Div : Divides its inputs
687 ExecBbiCommand : Executes bbi commands
688 ExecSystemCommand : Executes system (O.S.) commands
689 GetVectorCharElement : Gets the i-th element from the input vector (std...
691 MagicBox : Takes *any kind* of data and copies it to its ou...
692 MakeFileName : Makes a kosher file name
693 Mul : Multiplies its inputs
694 MultipleInputs : This box has multiple Void inputs and one Void o...
695 StringRelay : Just copies the value of its input to its output...
696 StringSelect : Outputs the string set to the ith input Ini (In0...
701 Now the interpreter knows the package \texttt{std} and the black boxes it provides,
702 such as the \texttt{Add} box, the \texttt{ConcatStrings} box, and so on. Remark that the
703 content of \texttt{std} may vary from one version to another
704 as new black boxes might be added to it.
710 You'll get a text help, in the 'Message' part :
714 By : laurent.guigues@creatis.insa-lyon.fr
715 Categories : atomic box;math;
717 'BoxExecute' <bbtk::Void> [signal] : Any signal received by this input
719 'BoxProcessMode' <String> [] : Sets the processing mode of the box
720 (Pipeline | Always | Reactive)
721 'In1' <Double> [] : First number to add
722 'In2' <Double> [] : Second number to add
724 'BoxChange' <bbtk::VoidS> [signal] : Signals modifications of the box
725 'Out' <Double> [] : Result
728 More information about what is a 'box' will be given in the 'Scripting' part of this manual.
730 % ==========================================
731 \subsubsection{Guides}
732 % ==========================================
734 An html version of all the guides is browsable in the \texttt{Help} part of \bbStudions.
736 \item {\bf\emph{User's Guide}} : Step to step How-to for user who wants to create his own
737 application, just using already existing boxes.
738 \item {\bf\emph{Package Developper's Guide}} : Step to step How-to for programmer who wants to create his own
739 black boxes/packages.
740 \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers only. (This one is probably not very much
741 up-to-date, since we spend more time in developping than writing documentation that's not of user concern).
742 \item {\bf\emph{Reference Manual}} : Contains a exaustive description of all the features for all the commands.
743 \item {\bf\emph{Booklet}} : Vade mecum.
744 \item {\bf\emph{Doxygen Documentation}} : Doxygen source browser.\\ Automatically generated from source file
745 headers. Should concern only the kernel developpers (i.e. : us).
750 % ==========================================
751 \subsubsection{Boxes Help}
752 % ==========================================
753 Box retrieving on various criteria :
755 \item {\bf\emph{Alphabetical list}} \\ This is the 'zero-level' of retrieving.
756 \item {\bf\emph{List by package}} \\ Several packages are supplied with bbtk :
758 \item {\bf\emph{std}} : the 'standard' package including basic useful boxes.
759 \item {\bf\emph{wx}} : basic graphical interface elements (widgets : sliders, buttons, etc. based on the \texttt{wxWidgets} library).
760 \item {\bf\emph{itk}} : the basic image processing package, based on the \itk library.
761 \item {\bf\emph{vtk}} : the basic images and surfaces processing and vizualization package, based on the \vtk library.
762 \item {\bf\emph{wxvtk}} : widget boxes based on the \vtk library (2D and 3D vizualization and
764 %\item {\bf\emph{creaImageIO}} : Provides hight level widgets to read images, including DICOM.
765 \item {\bf\emph{toolsbbtk}} : Tools for bbtk administration and package development, such as :
767 \item{\texttt{GUICreateBlackBox}} For creating the XML or C++ code for a new black box
768 \item{\texttt{GUICreatePackage}} For creating a new bbtk package file structure on disk (Graphical user interface for the shell script bbCreatePackage)
769 \item{\texttt{MakePackageDoc}} For creating the html documentation of a package. The doc is generated at the 'canonical' location. Works both for a build tree or an installed toolkit.
772 \item {\bf\emph{List by category}}.
775 A given box may belong to more than one \texttt{category}.\\
776 You have to consider categories like keywords to index black boxes.\\
777 Some of them are mutually exclusive.
780 \item{atomic box / complex box}\\
781 Whether it's written is C++ or it's an assembly of several black boxes (atomic or complex).\\
782 Any box is either atomic ou complex.
783 \item{example / demo / application}\\
784 These ones are always complex black boxes.
787 It's just a (simple) example, for programmers, on how to use a given feature.
789 It can be a 'good looking' (a.k.a 'sexy') example on some sophisticated work, done only by using \texttt{bbtk}
792 It's a Final application, end user intended (e.g. Subscale a huge volume witout loading it in memory, Crop a DICOM image, etc)
795 Piece of graphical interface (based on \texttt{wxWidgets})
797 Dicom medical image related box.
801 \item{3D Object creator}
807 % ==========================================
808 \subsubsection{The Package Browser}
809 \label{Package_Browser}
810 % ==========================================
813 You can run it using the tool bar of the 'Command' part. See figure \ref{imPackage_Browser}.
816 \caption{\label{imPackage_Browser}The Package Browser}
818 \includegraphics[width=0.6\textwidth]{Package_Browser.png}
822 It allows you to query informations about what you can find in the packages (boxes and applications), using several criterions
823 (warning : it's case sensitive, i.e '\texttt{Button}' will give different results than '\texttt{button}' ...)
826 All the boxes and applications held in a given package (e.g. \texttt{wxvtk}, \texttt{std}, ...)
828 You can query on a subpart of the name of a box or an application (e.g. \texttt{DICOM})
829 \item Description :\\
830 You can query on a substring of the description of a box or an application (e.g. \texttt{utton} : user wants to get all
831 the\texttt{Button} as well as the \texttt{button} )
833 You can query on a sub part of the category name of a box or an application (e.g. \texttt{3D})
835 You can query all the boxes or applications that have at least one Input entry of the given type (e.g. \texttt{int})
836 \item Output Type :\\
837 You can query all the boxes or applications that have at least one Output entry of the given type (e.g. \texttt{int})
838 \item Input Nature :\\
839 You can query all the boxes or applications that have at least one Input entry of the given nature (e.g. \texttt{signal})
840 \item Output Nature :\\
841 You can query all the boxes or applications that have at least one Output entry of the given nature (e.g.
842 \texttt{signal},\texttt{file name})
846 All these criterions are \emph{AND}ed while the query process.\\
847 You can get the whole description of a given box or application clicking on its name.
851 % ==============================================
852 \subsection{The Menu}
853 % ==============================================
855 At last, let's have a look at \bbStudio menu.(See figure \ref{themenu})
858 \caption{\label{themenu}The bbStudio menu}
860 \includegraphics[width=0.7\textwidth]{themenu.png}
867 \item{\texttt{Open the bbtk configuration file}}
870 \item{\texttt{Tools}}
872 \item{\texttt{Create package}} :
873 Provides a graphical interface to help Package developper to create a new empty package.
874 \item{\texttt{Create black box}}
875 Provides a graphical interface to help Package developper to create a new empty black box, and add it to an already existing package.
876 \item{\texttt{Show last image graph}}
877 \item{\texttt{Regenerate package doc}} :
878 if user was supplied new black boxes, and added them to an already existing package, he can update the package documentation, in order to benefit all the features of the Help mechanisms.
879 \item{\texttt{Regenerate boxes list}} :
880 if user wants to update only boxes list (quicker)
881 \item{\texttt{Regenerate all}}
882 User wants to rebuild the whole documentation.
884 \item{\texttt{Options}}
886 \item{\texttt{Reset before running}} Before running, all the already boxes are destroyed, all the already loaded packages are unloaded (this is the recomended option).
888 \item{\texttt{Windows}}
889 User may decide, for any reason of his own, to hide one or more pannels:
891 \item{\texttt{Show 'Files' panel}}
892 \item{\texttt{Show 'Help' panel}}
893 \item{\texttt{Show 'Command' panel}}
894 \item{\texttt{Show 'Messages' panel}}
895 \item{\texttt{Launch Package browser}} The package browser is a stand alone application. This can be achieved, too,
896 using the lower tool bar : button \texttt{Start Package Browser}.
899 \item{\texttt{About}}
901 \item{\texttt{About}} : Info about \texttt{bbStudio}.
904 % ==========================================
905 \section{bbs scripting}
906 % ==========================================
908 % ==========================================
909 \subsection{Using an already existing script}
910 % ==========================================
912 Using the lower toolbar (see figure : \ref{lowertoolbarsmall}), open the file
916 \caption{\label{lowertoolbarsmall}The lower tool bar}
918 \includegraphics[width=0.7\textwidth]{lowertoolbar.png}
922 You'll see it, in the '\texttt{Files}' part.\\ \\
923 You may run it, using the lower toolbar. \\
924 %\texttt{WARNING :} if the script contains one or more \texttt{LayoutSplit}
925 % object, you will have to resize the sub windows. \\ \\
926 You may modify, save or save-as the current script, using the lower toolbar.\\ \\
927 You may have a look at the graphical representation of the pipeline (sorry,
928 right now, to modify the pipeline, you have to modify the script;
929 you cannot modify grapically the pipeline; Work in progress...)
932 % ==========================================
933 \subsection{Inside black boxes}
934 % ==========================================
936 After loading the package it belongs to, you can You can create an \emph{instance} of an \texttt{Add} box by
937 the command \texttt{new} :
943 The \texttt{'a'} at the end is the \emph{name} of the instance,
944 which will be used to reference it later.
945 It is important to distinguish a box \emph{type}
946 and an \emph{instance} of a box type.
947 The \texttt{Add} box of the package \texttt{std} is actually
948 a \emph{box type} , like \texttt{int} is a data type
949 in \texttt{C} langage. The \texttt{new} command allows to create
950 an instance of a box type, exactly like \texttt{int i;} in
951 a \texttt{C} code, it declares a variable of type \texttt{int} whose
953 Of course, like in \texttt{C} Language, you can declare multiple boxes of the
954 same type in \bbi. \\
956 You can ask information about a given black box :\\
957 In the \texttt{Command part}, type \texttt{help} + black box name, e.g. \\
962 Have a look to the 'Help' Part (see figure : \ref{HelpAdd}) :
965 \caption{\label{HelpAdd}The html Help}
967 \includegraphics[width=0.7\textwidth]{HelpAdd.png}
971 The \texttt{std::} prepended to the name \texttt{Add}
972 means that the box \texttt{Add}
973 belongs to the \texttt{std} package.
974 Then comes a description
975 (the one which was provided by the author of the box),
976 the author(s) of the box (usually e-mail adress(es)) and
977 the categories to which the box belongs.
978 Finally comes the lists of inputs and outputs of the box.
979 For each input or output, \bbi provides
980 its \emph{name} (between quotes, e.g. \texttt{'ProcessMode'}),
981 its \emph{type} (between \texttt{<} and \texttt{>}, e.g. \texttt{<Int>})
983 Remark that the box \texttt{Add} is not a 'complex' black box
984 but an 'atomic' box, hence its help does not
985 mention any information concerning possible internal boxes.
987 After the creation of the box \texttt{a}, type :
994 Complex Black Box <user::workspace>
997 Category(s) : complex box;
1004 which means that \bbi workspace now contains a black box named \texttt{a},
1005 of type \texttt{std::Add}.
1007 Now look back at the help on \texttt{Add} boxes :
1008 you can see that this type of box has two inputs,
1009 with name \texttt{In1} and \texttt{In2},
1010 and an output, with name \texttt{Out}.
1012 You can set the input \texttt{In1}
1013 of the \texttt{Add} box \texttt{a} to the value $1$
1019 Similarly, setting the input \texttt{In2} of \texttt{a} to the value $2$
1025 And you print the output \texttt{Out} of the box \texttt{a} with :
1027 > print "result=$a.Out$"
1031 In the string passed to the \texttt{print} command,
1032 each substring enclosed between a couple of \$ is considered
1033 as the name of an output of a box.
1034 To process this special substrings, the interpretor :
1036 \item Processes the box if needed (see below)
1037 \item Converts the output of the box to a string if possible
1039 \item Substitutes the result in the string to print
1040 \item Postpones an implicit 'new line' character to the string
1045 Box processing is needed if :
1048 \item either at least input has changed since last processing
1049 \item or the input \texttt{'BoxProcessMode'} of the box is set to
1050 \texttt{'Always'}, which forces box reprocessing.
1053 Note that all boxes have an input named \texttt{'BoxProcessMode'}.
1055 Another way to process the box \texttt{a} is to issue the command :
1060 however this command does not display anything (except if the
1061 box itself displays something in its processing).
1062 It just processes the box if needed.
1063 This command is used to execute boxes that do not have any output,
1064 such as boxes that write something to a file or, display a
1065 graphical interface, and so on. \newline
1067 %To exit \bbi, type :
1075 % ==========================================
1081 \item The \texttt{include} command allows to load a package, and the complex black boxes that come with it..
1082 \item \texttt{help} gives help on :
1084 \item Available commands if you just type \texttt{help}.
1085 \item A particular command if you type \texttt{help <command-name>}.
1086 \item All available packages and their boxes (without description) if you type \texttt{help packages}.
1087 \item A particular package and its boxes (with brief description) if you type \texttt{help <package-name>}.
1088 \item A particular black box type (with full description) if you type \texttt{help <box-type-name>}. In particular, \texttt{help workspace} displays information on the content of the \texttt{'workspace'} black box, which stores the boxes created by the user (by \texttt{new}).
1090 %\item \texttt{list} displays the list of black box instances created so far (by \texttt{new}).
1091 \item \texttt{new} : creates an instance of a black box.
1092 \item \texttt{set} : sets the value of an input of a black box.
1093 \item Under any component of \bbStudions, to reference the input called \texttt{i}
1094 of a black box called \texttt{b} you must type \texttt{'b.i'}.
1095 The same syntax holds for outputs.
1096 \item \texttt{print} : prints a string, substituting each substring of the form \$b.o\$ by the value of the output \texttt{o} of the black box \texttt{b}. Note that an
1097 implicit trailing 'new line character' is added at the final string.
1098 \item \texttt{exec} : runs, if needed, the process of a box.
1099 %\item \texttt{quit} : quits \bbi.
1104 %A more 'modern' way to proceed is to run \texttt{bbStudio}, drag and drop the \texttt{Command} bookmark to the lower \texttt{Welcome to bbStudio!} bar.
1105 %Wou'll get something like in figure \ref{bbCommandPlusHelp} :
1107 %\begin{figure}[!ht]
1108 %\caption{\label{bbCommandPlusHelp}
1109 %An other way to run the command interpreter}
1111 %\includegraphics[width=0.5\textwidth]{bbCommandPlusHelp.png}
1115 % ==========================================
1117 % ==========================================
1118 \subsubsection{Connecting black boxes}
1119 \label{bbi-connecting-black-boxes}
1120 % ==========================================
1122 \BBTK allows to create
1123 and execute processing chains,
1124 also called \emph{pipelines},
1125 by connecting black boxes.
1126 This section explains how to do it with examples.
1127 Read section \ref{bbi-more-on-pipeline-processing} to get
1128 more information on pipeline processing.
1130 First start \bbStudio and load the package \texttt{std}, typing :
1134 in the 'Command' part.
1136 Assume you want to compute $1+2+3$. You can do it by
1137 chaining two \texttt{Add} boxes, as shown in figure
1138 \ref{bbi-fig-connecting-black-boxes-1}.
1141 \caption{\label{bbi-fig-connecting-black-boxes-1} A simple pipeline which adds 3 numbers}
1143 \includegraphics[width=0.5\textwidth]{1plus2plus3.png}
1148 The \bbi instructions to create and execute this pipeline are :
1152 > connect a.Out b.In1
1159 You will see the (very expected) result :
1164 The first three commands build the pipeline,
1165 the next three set \texttt{a} and \texttt{b} black boxes inputs and the last one
1166 prints \texttt{b} black box output (the pipeline is executed before printing, because the interpretor 'knows' the box \texttt{b},
1167 whose output is requested, is not up to date.
1169 The command \texttt{'connect a.Out b.In1'} ``plugs'' the output
1170 \texttt{Out} of the box \texttt{a} into the input \texttt{In1} of the
1172 Once the boxes are connected, the processing of the two boxes are chained :
1173 getting the output of \texttt{b} requires getting its inputs,
1174 hence getting the output of \texttt{a} which is connected to it.
1175 This pipeline mechanism can recurse into arbitrary long
1176 chains of boxes (see \ref{bbi-more-on-pipeline-processing}
1180 Lets' consider an other, more image oriented, example :
1188 > new FileSelector fileDialog
1189 > new ImageReader reader
1191 > new Viewer2D viewer
1193 > connect fileDialog.Out reader.In
1194 > connect reader.Out viewer.In
1195 > connect slider.Out viewer.Slice
1196 > connect slider.BoxChange viewer.BoxExecute
1201 Some explainations : the \texttt{include} instructions load the necessary packages. \\
1203 \texttt{new FileSelector} will pop a File Selector, at run time, that will out the user chosen file name. \\
1204 \texttt{new Slider} will pop a Slider, at run time, that will out an integer, used later as a slice number.\\
1205 \texttt{new ImageReader} will read any itk readable file, whose name is passed as a std::string, and return a itk::ImagePointer.\\
1206 \texttt{new Viewer2D} display a plane, whose number id specified by an integer.\\
1208 \texttt{connect fileDialog.Out reader.In} plugs the output of the File Selector (a std::string) to the input of the reader (a std::string, too).\\
1209 \texttt{connect reader.Out viewer.In} plugs the output of the reader (an itk::ImagePointer) to the input of the Viewer (a vtkImageData *)\\
1210 \texttt{connect slider.Out viewer.Slice} plugs the output of the slider (an int) to an other output (named Slide) of the viewer.\\
1211 \texttt{connect slider.BoxChange viewer.BoxExecute} says the viewer that it must re process itself any time the slider is modified.\\
1213 \texttt{exec viewer} processes the viewer.
1216 This would correspond to the graph in figure \ref{bbi-simplegraph}
1220 \caption{\label{bbi-simplegraph}(Very) simple Graph of a (very) simple pipeline}
1222 \includegraphics[width=0.8\textwidth]{bbi-simplegraph.png}
1226 Of course, to be able to connect two boxes,
1227 the output and the input must be compatibles.
1228 You can always connect an output to an input of the \emph{same} type,
1229 but you can do more, thanks to particular (hidden) black boxes called {\bf adaptors}.
1231 An adaptor is a black box which has at least one input, called \texttt{In},
1232 and at least one ouput called \texttt{Out} and whose role is to convert
1233 a data of the type of \texttt{In}
1234 into a data of the type of \texttt{Out} (other inputs or outputs may serve
1235 to parameter the adaptor or retreive other useful information).
1237 Under \bbStudions, if you type :
1244 Package std v1.0.0 - laurent.guigues@creatis.insa-lyon.fr
1245 Basic useful black boxes
1248 BoolToString [DA] : Converts a Bool (bool) into a string
1249 CastBoolToChar [DA] : Static cast from Bool (bool) to Char (signed c...
1250 CastBoolToDouble [DA] : Static cast from Bool (bool) to Double (double...
1252 CastBoolToUChar [DA] : Static cast from Bool (bool) to UChar (unsigne...
1253 CastBoolToUInt [DA] : Static cast from Bool (bool) to UInt (unsigned...
1255 CastUIntToBool [DA] : Static cast from UInt (unsigned int) to Bool (...
1256 CastUIntToChar [DA] : Static cast from UInt (unsigned int) to Char (...
1257 CastUIntToDouble [DA] : Static cast from UInt (unsigned int) to Double...
1262 \texttt{[DA]} stands for \emph{default adaptor}.
1264 Once you have loaded the package \texttt{std}, you can
1265 plug an output of type \texttt{char} into an input of type \texttt{double}.
1266 When the interpreter encounters the \texttt{connect} command,
1267 it looks for an adequate \emph{adaptor} in the loaded packages.
1268 In our case, as the package \texttt{std} provides the
1269 \texttt{CastUCharToDouble} adaptor, the interpreter automatically creates an
1270 instance of this adaptor and place it \emph{between}
1271 the output and the input you want to connect
1272 (however this adaptor is hidden to you,
1273 it is embedded into the created connection and does not appear
1274 as an existing black box).
1275 When the pipeline is processed the
1276 adaptor converts the output data into the required input type,
1277 in a totally transparent way.
1278 In our example, the \texttt{CastUCharToDouble} adaptor
1279 would simply cast the value of the \texttt{char} into a \texttt{double},
1280 however arbitrarily complex type conversion may be done.\\
1281 \texttt{WARNING} : these adaptors are \texttt{C++ static cast}, i.e., there is, right now',
1282 no 'intelligent' conversion (only truncation) e.g. think to \texttt{CastDoubleToUChar}!
1285 %Question (for info-dev):
1286 %if two adaptors with the same input and output types exist
1287 %in two different packages, currenly loaded,
1288 %which one is chosen by the interpreter at connection time?
1289 %A feature is missing to specify explicitely which one user wants to choose
1290 %(use a namespace notation ?)
1292 %-> Role of default adaptors
1295 Note that the \texttt{set} and \texttt{print} commands of interpreter
1296 work with adaptors from \texttt{string} to the type of the input to set
1297 or from the type of the output to print to \texttt{string}.
1298 Hence in order to \texttt{set} or \texttt{print} values the adequate
1299 adaptors must be available in the packages currently loaded. \\
1302 % ==========================================
1307 \item The \texttt{connect} command allows to connect two black boxes
1308 \item You can connect two black boxes if (and only if) :
1310 \item The output and the input are of the same type, or
1311 \item There is an adaptor black box in the packages loaded which
1312 converts data of the output type into data of the input type
1314 \item \texttt{help <package name>} does not display the adaptors of the package. To see them use : \texttt{help <package name> all}.
1318 % ==========================================
1320 % ==========================================
1321 \subsubsection{Creating complex black boxes}
1322 \label{bbi-complex-black-boxes}
1323 % ==========================================
1325 Remember the pipeline of figure
1326 \ref{bbi-fig-connecting-black-boxes-1}, which
1327 computed the sum of three doubles.
1328 You can consider it as a whole and define
1329 a new black box type, which will be a \emph{complex black box},
1330 having three inputs and one output,
1331 as shown in figure \ref{bbi-fig-complex-black-box-1}.
1334 \caption{\label{bbi-fig-complex-black-box-1} Creating the complex black box \texttt{Add3}}
1336 \includegraphics[width=0.5\textwidth]{Add3.png}
1340 The \bbi commands to define this complex black box are
1350 > connect a.Out b.In1
1353 > description "adds 3 doubles"
1354 > input x a.In1 "first double to add"
1355 > input y a.In2 "second double to add"
1356 > input z b.In2 "third double to add"
1357 > output result b.Out "output"
1364 As we will use \texttt{Add} boxes, we need to load the package \texttt{std}, which is done in first line.
1366 The command \texttt{define} then starts the definition
1367 of the complex box type, which will be called \texttt{Add3}.
1369 The next three lines define the pipeline,
1370 exactly in the same way than outside a complex box definition.
1372 The commands \texttt{author}, \texttt{description}, \texttt{input}
1373 and \texttt{output} are commands specific to complex boxes definition :
1375 \texttt{author} and \texttt{description} are used for the documentation
1376 of the new box. You can provide multiple \texttt{author} or
1377 \texttt{description} commands, the arguments of the commands will
1378 be concatenated to produce the final author and description strings.
1380 \texttt{input} and \texttt{output} are used to define the inputs and outputs
1381 of the new complex box.
1382 Their syntax is the same : for each new input/output you need to say
1383 to which internal input/output it corresponds and to provide
1384 a help string documenting the input/output.
1385 In our example, we define that the box \texttt{Add3} has
1386 three inputs : \texttt{x}, \texttt{y} and \texttt{z}.
1387 The input \texttt{x} corresponds to the input \texttt{In1} of the
1388 internal box \texttt{a}.
1389 In the same way, the external input \texttt{y}
1390 corresponds to the internal input \texttt{a.In2}, and
1391 the external input \texttt{In3} to \texttt{b.In2}.
1392 The only output of the new box is called \texttt{result}
1393 and corresponds to \texttt{b.Out}.
1394 The figure \ref{bbi-fig-complex-black-box-1}
1395 illustrates the external to internal
1396 input/output correspondence.
1398 Finally, the \texttt{endefine} command ends the definition of the
1401 After this definition, if you ask for help
1402 on packages, you get :
1413 The \texttt{user} package now contains a new black box type, called
1414 \texttt{Add3}. If you ask for help on this type of box, you get :
1417 Complex Black Box <user::Add3>
1421 'x' <double> : first double to add
1422 'y' <double> : second double to add
1423 'z' <double> : third double to add
1425 'result' <double> : output
1431 and you can use it like any other box, for example type :
1443 As a side note, we can say that, for consistency reasons, it would have been better to name
1444 \texttt{In1}, \texttt{In2} and \texttt{In3} the inputs of the black box \texttt{Add3},
1445 since all the 'natural entry' of a box is named \texttt{In}, or \texttt{In}\emph{x} if there are more than one 'natural
1449 % ==========================================
1454 \item The \texttt{define/endefine} commands allows to define complex black box types, i.e. types of black boxes made up of other black boxes.
1455 Inside a \texttt{define/endefine} block :
1457 \item The \texttt{author} and \texttt{description} commands allow to document the new type of box
1458 \item The \texttt{input} and \texttt{output} commands allow to define the inputs and outputs of the new type of box, that is to which inputs and outputs
1459 of internal boxes they correspond.
1463 % ==========================================
1465 % ==========================================
1466 \subsubsection{Writing scripts}
1467 \label{bbi-writing-scripts}
1468 % ==========================================
1470 Once you have defined a new type of complex box, you
1471 may like to reuse it. To do this, you can simply
1472 write the \bbi commands defining the new box
1473 into a text file and afterwards include that file in \bbins.
1474 Doing this, you start writing \bbi scripts.
1475 The conventionnal (and mandatory) extension for such scripts is \texttt{bbs}
1477 For consistency reasons, you are requested to prepend \texttt{bb} to the name.
1479 For example, the \texttt{Add3} complex box we previously worked on
1480 can be defined in the \texttt{bbAdd3.bbs} file :
1482 \begin{file}{bbAdd3.bbs}
1484 # Defines the Add3 black box which adds 3 doubles
1490 description "adds 3 doubles"
1496 input x a.In1 "first double to add
1497 input y a.In2 "second double to add
1498 input z b.In2 "third double to add"
1500 output result b.Out "output"
1505 Lines starting with a \texttt{\#} character or a \texttt{\//\//} character are ignored, they
1506 are considered as comments by the interpreter.
1507 To use this file in \bbStudions, click on the \texttt{include} button, and browse your filestore to find the file.
1510 > include bbAdd3.bbs
1512 Complex Black Box <user::Add3>
1516 'x' <double> : first double to add
1517 'y' <double> : second double to add
1518 'z' <double> : third double to add
1520 'result' <double> : output
1528 If the file has the \texttt{bbs} extension, you can ommit it and just type :
1533 \subsubsection{Creating complex black boxes that use complex black boxes}
1534 \label{bbi-complex-complex-black-boxes}
1537 Of course, you can include script files in other script files,
1538 like in the following example :
1540 \begin{file}{bbAdd4.bbs}
1542 # Defines the Add4 black box which adds 4 doubles
1547 description "adds 4 doubles"
1551 input In1 a.In1 "first double to add
1552 input In2 a.In2 "second double to add
1553 input In3 a.In3 "third double to add"
1554 input In4 b.In2 "fourth double to add"
1555 output Out b.Out "output"
1562 \subsubsection{Naming Conventions}
1563 \label{bbi-Naming Conventions}
1566 % ==========================================
1568 %\paragraph{Naming Conventions}
1572 % ==========================================
1576 For consistency reasons, you are requested to prepend \texttt{bb}, and postpone an extention \texttt{.bbs},
1577 to the names of the files that hold a \texttt{complex black box} definition.
1579 For example, the \texttt{Add3} complex box we previously worked on
1580 can be defined in the \texttt{bbAdd3.bbs} file.
1583 For consistency reasons, the names of dynamic libraries holding the packages must start by \texttt{libbb}.
1584 For instance, the package \texttt{wx} will be in the library \texttt{libbbwx.dll} (Windows) or \texttt{libbbwx.so}
1589 % ==========================================
1595 \item The \texttt{include} command tells the interpreter to include a script file.
1596 \item Lines starting with a \texttt{\#} or with a \texttt{\//\//} are considered as comments by the interpreter.
1597 \item Lines between a line starting with a \texttt{\//*} an a line starting with a \texttt{*\//} are considered as comments by the interpreter.
1601 % ==========================================
1603 % ==========================================
1604 \subsubsection{Creating command line applications}
1605 \label{bbi-command-line-app}
1606 % ==========================================
1608 Now that you know how to create complex black boxes
1609 (with \texttt{define/endefine}), think
1610 back to the \texttt{workspace} object.
1611 Remember that it is also
1612 a \texttt{complex black box}.
1613 Actually, when you type interpreter commands
1614 outside a \texttt{define/endefine} block,
1615 you progressively define the \texttt{workspace}
1617 You can think of it like if at start the interpreter
1618 was issuing a command \texttt{'define workspace'}
1619 and then letting you define the interior of the box
1622 Remember that the command \texttt{inputs}
1623 allows to define an input of a complex box.
1624 Now, if you use the command \texttt{input}
1625 outside a \texttt{define/endefine} block then
1626 it defines an input of the \texttt{workspace} box,
1627 that is an input of the \emph{main program}.
1628 This input will then be connected to the
1629 parameters that the user passes to the command line.
1631 For example, consider the script :
1633 \begin{file}{add.bbs}
1637 input x a.In1 "first number to add"
1638 input y a.In2 "second number to add"
1643 The third and fourth lines define two inputs \texttt{x}
1644 and \texttt{y}. When you execute this script,
1645 you can pass these two arguments on the command line,
1653 You can also invoke \bbi the option \texttt{-h},
1654 which gives help on the \texttt{workspace} box :
1661 'x' <double> : first number to add
1662 'y' <double> : second number to add
1665 To get a better help, use the \texttt{description}
1666 and \texttt{author} commands :
1668 \begin{file}{add.bbs}
1670 description "Adds two numbers"
1671 author "foo@bar.com"
1674 input x a.In1 "first number to add"
1675 input y a.In2 "second number to add"
1680 Now if you ask for help on the \texttt{add} script, you get :
1687 'x' <double> : first number to add
1688 'y' <double> : second number to add
1691 Rather than getting the inputs of a script
1692 from the command line, you can ask \bbi to
1693 prompt the user for the values, using the \texttt{-t}
1698 x=[the program waits for user answer]2
1699 y=[the program waits for user answer]5
1703 \bbStudio is always compiled in graphical mode (with \wx), therefore
1704 you can also use the \texttt{-g} commutator.
1705 \bbi then prompts the user in graphical mode,
1706 displaying a dialog box for each input,
1707 like in fig. \ref{bb-input-dialog-box}.
1710 \caption{\label{bb-input-dialog-box}Input dialog box}
1712 \includegraphics[width=0.6\textwidth]{enter-the-value-of-x.png}
1716 % ==========================================
1721 \item The \texttt{input}, \texttt{description} and \texttt{author} commands,
1722 when they are used outside a \texttt{define/endefine} block allow
1723 to define the inputs, description and author of the main program.
1724 \item Inputs of the main program can be passed on the command line
1725 using the syntax \texttt{<input-name>=<value>}.
1726 No white space is allowed, if the value or the input name
1727 contains white spaces, enclose them
1728 between double quotes, e.g. \texttt{"parameter with white spaces = gnu's not unix"}.
1729 \item The \texttt{-h} option of \bbi prints help on the main program.
1730 \item The \texttt{-t} option of \bbi orders the program to prompt for its inputs in text mode.
1731 \item The \texttt{-g} option of \bbi orders the program to prompt for its inputs in graphical mode.
1734 % ==========================================
1736 % ==========================================
1737 \subsubsection{Using graphical interface boxes (widget boxes)}
1739 % ==========================================
1741 % ==========================================
1742 \subsubsection{Overwiew}
1743 \label{bbi-overview}
1744 % ==========================================
1746 \bbStudio is always compiled in graphical mode
1747 (option \texttt{BUILD\_bbi\_GRAPHICAL} of \cmakens, requires \wxns),
1748 then you can use special black boxes which are
1749 graphical interface components (widgets).
1750 Basic components are provided in the package \texttt{wx},
1751 such as buttons, sliders, file open/save dialogs, etc.
1753 As first example, type the following commands in \bbi :
1760 When you type \texttt{enter} after the last line,
1761 a window pops up in which you can entrer a text.
1762 When you close the window, the text you entered is printed by
1763 the \texttt{print} command.
1765 Type \texttt{help wx}, you get something like :
1767 Package wx v1.0.0- info-dev@creatis.insa-lyon.fr
1768 Basic graphical interface elements (sliders, buttons ...) based on wxWidgets
1770 ColourSelector : Colour Selector dialog (bbfication of wxColourSele...
1771 ColourSelectorButton : A button which displays a colour picker dialog whe...
1772 CommandButton : Button which executes bbi commands
1773 DirectorySelector : Pops up a directory selection dialog (wxDirDialog)
1774 FileSelector : Pops up a file selection dialog for reading or sav...
1775 InputText : A zone in which the user can enter a text (wxTextC...
1776 LayoutLine : LayoutLine widget (wxBoxSizer)
1777 LayoutSplit : Widget which splits a window in two fixed size par...
1778 LayoutTab : LayoutTab widget (wxNotebook)
1779 OutputText : Text zone to be inserted into a window (wxStaticTe...
1780 RadioButton : RadioButton group widget 0-9 entries
1781 Slider : Slider widget (wxSlider)
1784 You can reproduce the same experiment as above using a
1785 \texttt{Slider} or a \texttt{FileDialog} rather than a \texttt{InputText}.
1786 See the files \texttt{test*.bbs} in the \texttt{scripts/test} directory.
1789 %There are two kinds of widgets : ``terminal'' widgets and ``container'' widgets.
1790 %The \texttt{InputText}, \texttt{FileDialog} or \texttt{Slider} widgets
1791 %are ``terminal'' widgets.
1792 %``container'' widgets are of another kind : they are
1793 There is a special kind of widget, called '\texttt{Layout}', designed to
1794 contain other widgets in order to build larger dialog boxes.
1795 For example, the \texttt{LayoutSplit} widget is a container which
1796 ``splits'' horizontally a window into two parts,
1797 each part including another widget.
1798 The size of the two parts can be adjusted by the user thanks
1801 The script \texttt{scripts/test/testSplit.bbs} demonstrate its use.
1802 Run it : it displays a window with two sliders.
1803 Move the sliders and close the window.
1804 The final positions of the sliders are printed out.
1805 Now edit the file to see how this is done :
1807 \begin{file}{scripts/test/testSplit.bbs}
1816 connect s1.Widget s.Widget1
1817 connect s2.Widget s.Widget2
1819 print s1=$s1.Out$\\n
1820 print s2=$s2.Out$\\n
1824 First, the two sliders \texttt{s1} and \texttt{s2} are created.
1825 A \texttt{LayoutSplit} box \texttt{s} is also created.
1826 The \texttt{connect} commands then ``includes'' the sliders in the
1827 split ``container''.
1828 The input \texttt{Widget} is common to all widget boxes :
1829 every widget can be inserted into another widget.
1830 The outputs \texttt{Widget1},\texttt{Widget2} are specific of \emph{container}
1832 (in \bbi type \texttt{help Slider} :
1833 you will see the output \texttt{Widget};
1834 type \texttt{help LayoutSplit} :
1835 you will see the inputs \texttt{Widget1} and \texttt{Widget2}
1836 and the output \texttt{Widget}).
1837 When you connect the \texttt{Widget} output of a container
1838 to the \texttt{Widget}i input of a widget,
1839 you order to include the widget in the container.
1840 Of course, the order of connection is important.
1841 In our case, the slider \texttt{s1} is included first,
1842 then the slider \texttt{s2} : \texttt{s1} will be placed
1843 on top of \texttt{s2} (the \texttt{LayoutSplit} box is
1844 implemented that way, but this is arbitrary choice).
1846 Right now, there are only \emph{three} container widgets in the \texttt{wx} package :
1848 \item {the \texttt{LayoutSplit} widget} we just described, the \texttt{LayoutLine} , and the \texttt{LayoutTab}
1851 \item {the \texttt{LayoutLine} widget} can have multiple children and
1852 divides its window into as much parts as children,
1853 each part of equal size.
1854 The orientation of the \texttt{LayoutSplit} or of the \texttt{LayoutLine} can be changed by the input \texttt{Orientation}.
1855 See the example \texttt{test/testSizer.bbs}.
1856 With only those two containers you can already create
1857 complex dialog boxes (of course containers can be nested, which leads to tree-like structures of widgets). \\
1858 See the script \texttt{bbtk/share/bbtk/bbs/wx/appli/ExampleLayoutSplit.bbs} for an example.
1860 \item {The \texttt{LayoutTab} widget} is based on the \texttt{wxNotebook.}\\
1861 The label of each 'note book' is the name of the object it contains.
1868 %One word about a special widget in the package \texttt{wx} :
1869 %the \texttt{Button}... to be continued.
1871 % ==========================================
1872 \subsubsection{Deeper in the boxes}
1873 \label{bbi-deep-box}
1874 % ==========================================
1876 Any widget box has two mandatory Inputs :
1878 \item {\bf\emph{BoxExecute}} : Any signal received by this input executes the box
1879 \item {\bf\emph{BoxProcessMode}} : Sets the processing mode of the box :
1881 \item {\bf\emph{Pipeline}} : bbBackwardUpdate() calls Process() only if Status == MODIFIED \\
1882 The box executes itself only when an entry was changed (normal pipeline processing).
1883 \item {\bf\emph{Reactive}} : bbSetModifiedStatus() calls bbUpdate() \\
1884 Warning : Re-processed immediately when \emph{any entry} changed.\\
1885 To be more selective, better use \texttt{connect A.BoxChange \emph{currentBox}.BoxExecute}.
1886 \item {\bf\emph{Always}} : bbUpdate() always calls Process. \\
1887 Usefull for 'sources', that must be processed, even when no entry changed (e.g. : FileSelector, ColorSelector)\\
1888 This one is not end user intended (for Package developer only)
1892 Any widget box has five Inputs, that will be dealt with only if the box is not connected to the \emph{Widget}i of any \emph{Layout box} :
1894 \item {\bf\emph{WinHeight}} : Height of the window
1895 \item {\bf\emph{WinWidth}} : Width of the window
1896 \item {\bf\emph{WinTitle}} : Title of the window
1897 \item {\bf\emph{WinClose}} : Any received signal closes the window
1898 \item {\bf\emph{WinHide}} : Any received signal hides the window
1899 \item {\bf\emph{WinDialog}} : When set to 'true', creates a \emph{dialog window}, that blocks the pipeline until it is closed (\emph{modal})
1903 Any \emph{Layout box} (i.e. \emph{LayoutLine}, \emph{LayoutSplit} or \emph{LayoutTab}) has at one or more mandatory Inputs :
1905 \item {\bf\emph{Widget}}\texttt{i} : e.g. a \emph{LayoutSplit} box (Widget which splits a window in two resizeable parts)
1906 has two Input parameters \emph{Widget1} and \emph{Widget2}, used to embed the child windows.\\
1907 e.g. a \emph{LayoutLine} divides the window in up to 9 (depending on the number of inputs \emph{Widget}i) fixed size parts.
1911 Any widget box has two mandatory Outputs :
1914 \item {\bf\emph{Widget}} : that is the \texttt{wxWindow} itself. If it's not connected to the \texttt{Widget}\emph{i} of any \emph{Layout box}, it
1915 will popup. If it's connected to the \texttt{Widget}\texttt{\emph{i}} of any \texttt{Layout box}, it will be embedded in its parent window.
1916 \item {\bf\emph{Boxchange}} : Signals any modification of the box. This output may be connect if necessary to the \emph{BoxExecute} entry of an other box,
1917 further within the execution pipeline.
1922 % ==========================================
1923 \subsection{More on ...}
1925 % ==========================================
1927 % ==========================================
1928 %\subsubsection{Black box packages}
1929 %\label{bbi-more-on-packages}
1930 % ==========================================
1931 %There are various others user-intended packages :
1934 %---> Were moved in a 'Reference Manual' ?\\
1935 %---> Any suggestion welcome!
1943 % ==========================================
1944 \subsubsection{Pipeline processing}
1945 \label{bbi-more-on-pipeline-processing}
1946 % ==========================================
1948 \item the ``control'' mechanism in bbi.
1950 When a box is requested to update itself, it asks (recursively) each one of its inputs if it was modified.\\
1951 In normal pipe-line mode, it will be re-processed if at least one of its imputs was actually modified, as the output of a previous box.
1953 (switch exec commands, e.g. Button)
1954 \item the role of ProcessMode to update widgets.
1956 % ==========================================
1957 \subsubsection{Complex black boxes}
1958 \label{bbi-more-on-complex-black-boxes}
1959 Creation of complex widgets (containers, contained...)
1961 You can include script files in other script files,
1962 like in the following example :
1966 # Defines the Add4 black box which adds 4 doubles
1970 description "adds 4 doubles"
1974 input In1 a.In1 "first double to add"
1975 input In2 a.In2 "second double to add"
1976 input In3 a.In3 "third double to add"
1977 input In4 b.In2 "fourth double to add"
1978 output Out b.Out "output"
1982 The inner boxes have they own entries (In1, In2, In3 for box a, In1, In2 for box b )\\
1983 Only the inputs In1, In2, In3 of box a and the input In2 of box b is of interest for the end user, but he dosn't want to have to
1984 care neither about the inner boxes name, nor about the names of their Inputs.\\
1985 The writer of the complex box has the ability to give these inputs a meaningfull name !
1987 input In3 a.In3 "third double to add"
1988 input In4 b.In2 "fourth double to add"
1991 %\subsubsection{Advanced issues}
1992 %\paragraph{Reducing the number of inputs of a box}
1994 % ==========================================
1995 %\subsubsection{Errors}
1996 %\label{bbi-more-on-errors}
1998 % ==========================================
1999 \subsubsection{Creating and using your own uninstalled version of bbStudio}
2000 \label{bbi-more-on-your_own_version}
2002 Suppose you want to run your own uninstalled version (say : you downloaded and compiled the
2003 cvs version in order to use a recently commited patch, but you want to be able
2004 to still use the standard version).
2008 \item cvs checkout the sources :
2013 create a build directory
2017 \item cd in the build directory:
2026 Don't forget to switch ON the flag \texttt{BBTK\_COMPILE\_DEBUG\_MESSAGE} \\
2027 (see figure : \ref{bb-ccmake})
2030 \caption{\label{bb-ccmake}Running ccmake}
2032 \includegraphics[width=0.6\textwidth]{ccmake.png}
2036 \item As usual, type \texttt{c} until there is no longer any area quoted with a * (or highlighted in red)\\
2037 Ask for generation (type \texttt{g} -once is always enough-)
2039 \item Ask for compilation and link.
2045 The dynamic libraries (\texttt{.dll} or \texttt{.so} and the executable programs will be created in the \texttt{bin}
2046 directory of the built tree.
2048 \item choose to install or not your own version.
2052 Linux users : Don't forget to \texttt{sudo} before.
2054 % ==========================================
2061 % ==========================================
2062 %\vspace{0.5cm}\hrule \\
2064 \section{Using third party Package}
2065 \label{Third_Party_Package}
2066 % ==========================================
2068 % ==========================================
2069 \subsection{The configuration file}
2070 \label{The_configuration_file}
2071 % ==========================================
2073 First, have a glance at the Configuration, just clicking on \texttt{Config} button of the \texttt{Command} part toolbar.
2075 You'll get something like :
2081 bbtk_config.xml : [/home/jpr/Creatis/bbtk/binLIN/bin/bbtk_config.xml]
2082 Documentation Path : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/doc]
2083 Data Path : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/data]
2084 Temp Directory : [/home/jpr/Creatis/bbtk/binLIN]
2085 File Separator : [/]
2088 --- [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/bbs]
2089 --- [/home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs]
2092 --- [/home/jpr/Creatis/bbtk/binLIN/bin]
2093 --- [/home/jpr/Creatis/bbtk/binLIN/bin/../lib]
2094 --- [/home/jpr/Creatis/bbtk/binLIN/bin]
2095 --- [/home/jpr/Creatis/bbtk/binLIN/bin\Debug]
2096 --- [/home/jpr/Creatis/bbtk/binLIN/bin\Release]
2099 (depending on who you are, and whether \texttt{bbStudio} is installed or not.)\\
2101 Note the two main parts : \texttt{BBS Paths} and \texttt{PACKAGE Paths}
2102 \subsection{How bbStudio uses the Configuration file}
2103 \label{How_bbStudio_uses_the_Configuration_file}
2106 At start, \bbi tries to open an \texttt{xml}
2107 configuration file named \texttt{bbtk\_config.xml}.
2110 \item The current directory
2111 \item The subdir \texttt{.bbtk} of the user's home directory.
2113 \item On \texttt{Unix}, the home directory is the
2114 one stored by the environnement variable \texttt{HOME},
2115 typically \texttt{/home/username}.
2116 \item On \texttt{Windows}, the home directory is
2117 the user's profile directory stored by the environnement
2118 variable \texttt{USERPROFILE},
2119 typically \texttt{C:\\...}.
2121 \item If none of these two paths contains the file then it creates
2122 a new one in the \texttt{.bbtk} directory.
2126 To use a third party Package, you will have to update it.\\
2128 \subsection{Modifying the Configuration file}
2129 \label{Modifying_the_Configuration_file}
2131 Just use the \texttt{Open bbtk Config file} option of the \texttt{Files} of the \bbStudio menu.
2133 You will get something like :
2136 <description> Sets the search directories in the build tree </description>
2138 <bbs_path> /home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs </bbs_path>
2139 <package_path> /home/jpr/Creatis/bbtk/binLIN/bin </package_path>
2141 <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Debug </package_path>
2142 <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Release </package_path>
2144 <data_path> </data_path>
2146 <default_temp_dir> /home/jpr/Creatis/bbtk/binLIN </default_temp_dir>
2150 To use a nex Package :
2153 After the already existing \texttt{xml} tags
2155 (i.e. the lines begining by
2156 \texttt{<bbs\_path>}
2159 \texttt{</bbs\_path>}),
2160 you can add paths to :
2162 \item A custom folder in which to search for \texttt{.bbs} scripts (\texttt{include} command of \bbins) by adding
2163 an \texttt{xml} tag:\\
2164 \texttt{<bbs\_path>}
2165 \emph{complete\_path\_to\_scripts\_folder}
2166 \texttt{<\/bbs\_path>}.
2170 After the already existing tags
2171 \texttt{package\_path}
2172 (i.e. the lines begining by
2173 \texttt{package\_path}
2176 \texttt{/package\_path}),
2177 you can add paths to :
2179 \item A custom folder in which to search for packages (the dynamic libraries
2180 (\texttt{.dll} or \texttt{.so}, called with the \texttt{load} command of \bbins) by adding an \texttt{xml} tag :\\
2181 \texttt{<package\_path>}
2182 \emph{complete\_path\_to\_dynamic\_library\_folder}
2183 \texttt{<\/package\_path>}.
2189 % ==========================================
2190 \subsection{Updating the documentation}
2191 \label{Updating_the_documentation}
2192 % ==========================================
2193 If you want (and sure you will) to be able to use the Help tools as well as the features provided by this package,
2195 option \texttt{Regenerate package doc} in the menu \texttt{Tools} of \texttt{bbStudio}.\\
2196 You'll be prompted for the Package name. Avoid using the \texttt{-a} option (Regenerate all), since it's time consumming.
2198 If you want (and sure you will) to benefit the features of Box indexing
2200 option \texttt{Regenerate Boxes Lists} in the menu \texttt{Tools} of \texttt{bbStudio}.\\
2203 % ==========================================
2204 \subsection{Using the package}
2205 \label{Using_the_package}
2206 % ==========================================
2208 The only thing you have to do is to \texttt{load} the package, within the script, or from the
2209 \texttt{Command} part, and enjoy the black boxes it contains.
2211 % ==========================================
2212 \subsection{Packages you'll probably want to use }
2213 \label{Packages_you_ll_want_to_use}
2214 % ==========================================
2217 \item{\texttt{creaContours}} \\
2218 Provides sophisticated widgets for managing 3D R.O.I. (Regions od interest)
2219 \item{\texttt{creaImageIO}} \\
2220 Allows browsing, selectionning, ordering directories containing images of almost any type
2226 % ==========================================
2227 %\vspace{0.5cm}\hrule \\
2228 \section{Using black boxes in \CPP programs}
2230 % ==========================================
2232 A very useful feature is that you may use any black box within a \CPP program without worrying about \texttt{wxWigets} main window.\\
2234 Let's look a the following bbs script :
2241 # Create the Objects
2244 new LayoutLine layout
2246 # Graphical pipeline
2247 connect slider.Widget layout.Widget1
2248 connect text.Widget layout.Widget2
2250 # Execution pipeline
2251 connect slider.BoxChange text.BoxExecute
2252 connect slider.Out text.In
2258 User wants to create a slider and an output text, within a LayoutLine, and display the slider value in the output text.\\
2259 Think about the (little!) nightmare to code the same, in 'raw C++', using wxWidgets.\\
2261 Using the standalone application \texttt{bbc} you just 'convert' the script.
2264 #include <bbwxSlider.h>
2265 #include <bbwxOutputText.h>
2266 #include <bbtkFactory.h>
2267 #include <bbwxLayoutLine.h>
2269 int main(int argv, char* argc[])
2271 // we need to intanciate a bbtk::Factory to be aware of the adaptors
2272 bbtk::Factory::Pointer factory = bbtk::Factory::New();
2274 // Load the packages
2276 factory->LoadPackage("std");
2277 factory->LoadPackage("wx");
2279 // Create the Objects
2280 // ------------------
2281 bbwx::Slider::Pointer slider = bbwx::Slider::New("slider");
2282 bbwx::OutputText::Pointer text = bbwx::OutputText::New("text");
2283 bbwx::LayoutLine::Pointer layout = bbwx::LayoutLine::New("layout");
2285 // Graphical pipeline
2286 bbtk::Connection::Pointer c1 = bbtk::Connection::New(slider,"Widget",
2289 bbtk::Connection::Pointer c2 = bbtk::Connection::New(text,"Widget",
2292 // Execution pipeline
2293 // ------------------
2295 // We have to pass the 'factory', in order to call automatically an adaptor,
2297 bbtk::Connection::Pointer s2t = bbtk::Connection::New(slider,"Out",
2300 bbtk::Connection::Pointer c3 = bbtk::Connection::New(slider,"BoxChange",
2302 layout->bbSetInputWinDialog(true);
2306 layout->bbExecute();
2309 catch (bbtk::Exception e)
2311 bbtk::MessageManager::SetMessageLevel("Error",1);
2319 % ==========================================
2320 \section{Language reference}
2321 \label{bbi-reference}
2322 % ==========================================
2325 % ==========================================
2326 \subsection{Pipeline creation and execution related commands}
2327 \label{bbi-reference-creation-execution}
2328 % ==========================================
2329 See table \ref{bbi-reference-box}
2331 % ==========================================
2333 \caption{\label{bbi-reference-box} \bbi pipeline creation and execution related commands.}
2335 \begin{tabular}{|lcm{6cm}|}
2337 Command & Parameters & Effect \\ \hline
2339 \texttt{new} & \texttt{<boxtype>} \texttt{<box-name>}&
2340 Creates a box of type \texttt{boxtype} and name
2341 \texttt{box-name}.\\ \hline
2343 \texttt{delete} & \texttt{<box-name>} &
2344 Destroys the box named \texttt{box-name}.\\ \hline
2346 \texttt{connect} & \texttt{<box1.output>} \texttt{<box2.input>} &
2348 \texttt{output} of the box named \texttt{box1}
2349 to the input \texttt{input} of the box named \texttt{box2} \\ \hline
2351 \texttt{set} & \texttt{<box.input>} \texttt{<value>} &
2352 Sets the input \texttt{input} of
2353 the box named \texttt{box} to the value \texttt{value}.
2354 An \texttt{adaptor} must exist
2355 in the packages loaded which converts a \texttt{std::string}
2356 to the type of the input \texttt{input}. \\ \hline
2358 \texttt{print} & \texttt{<string>} &
2359 Prints the string after substituting each token of the form \texttt{\$box.output\$} by the adaptation to string of the value of the
2360 output \texttt{output} of the box named \texttt{box}.
2361 An \texttt{adaptor} must exist
2362 in the packages loaded which converts
2363 the type of the output \texttt{output}
2364 to a \texttt{std::string}.
2367 \texttt{exec} & \texttt{<box-name>} &
2368 Executes the box named \texttt{box-name}.
2370 connected to its inputs
2371 are also processed recursively (pipeline processing).\\ \hline
2372 \texttt{exec} & \texttt{freeze} &
2373 Allows to block execution commands while keeping definition commands active.(This one is not for end user)\\ \hline
2374 \texttt{exec} & \texttt{unfreeze} &
2375 Turns back to 'normal' mode (This one is not for end user).\\ \hline
2378 % ==========================================
2382 % ==========================================
2383 \subsection{Interpreter related commands}
2384 \label{bbi-reference-interpreter}
2385 % ==========================================
2386 See table \ref{tabbbi-reference-interpreter_1} and \ref{tabbbi-reference-interpreter_2}
2387 % ==========================================
2389 \caption{\label{tabbbi-reference-interpreter_1}\bbi intepreter related commands (part 1).}
2391 \begin{tabular}{|lcm{6cm}|}
2393 Command & Parameters & Effect \\ \hline
2395 \texttt{author} & \texttt{<author-name>} &
2396 Adds the string \texttt{<author-name>} to the author information of the black box being defined \\ \hline
2398 \texttt{category} & \texttt{<category-name>} &
2399 Adds the string \texttt{<category-name>} to the category information of the black box being defined \\ \hline
2402 Prints help on available commands \\ \hline
2404 & \texttt{<command-name>} &
2405 Prints help on the command \texttt{command-name} \\ \hline
2407 & \texttt{packages} &
2408 Prints help on available packages and their box types
2409 (without description)\\ \hline
2411 & \texttt{<package-name>} &
2412 Prints help on the package \texttt{package-name} and its boxes
2413 (with brief description).
2414 The package must have been previously loaded \\ \hline
2416 & \texttt{<box-type>} &
2417 Prints help (with full description) on the type of box
2419 The box type must belong to a package which has been previously loaded \\ \hline
2421 & \texttt{<debug-directive>} &
2423 Prints debug info on living bbtk objects containing the string \texttt{expr} (default expr='').
2424 \texttt{-C} checks the factory integrity.
2425 \texttt{-D} turns on objects debug info after main ends\\ \hline
2427 \texttt{include} & \texttt{<file-name>} &
2428 Includes and executes the content of the file named \texttt{file-name}
2429 exactly like if you were typing its content at the place were the
2430 \texttt{include} command is. \\ \hline
2432 \texttt{load} & \texttt{<package-name>} &
2433 Loads the package \texttt{package-name} (use it only if you know that you won't work with complex black boxes) \\ \hline
2435 \texttt{include} & \texttt{<package-name>} &
2436 Loads the package \texttt{package-name} and includes all the complex black boxes that comes with it \\ \hline
2438 \texttt{kind} & \texttt{<box kind>} &
2439 Specifies the \texttt{kind} of the complex black boxes you are describing \\ \hline
2444 % This arbitrary part1/part2 is to avoid to have all the tables at the end of the docoment ...
2448 \caption{\label{tabbbi-reference-interpreter_2}\bbi intepreter related commands (part 2).}
2450 \begin{tabular}{|lcm{6cm}|}
2452 Command & Parameters & Effect \\ \hline
2453 \texttt{unload} & \texttt{<package-name>}&
2454 Unloads the package \texttt{package-name}.
2455 The package must have been previously loaded.
2456 No box of a type defined in this package must still exist.\\ \hline
2458 \texttt{message} & \texttt{<category>} \texttt{<level>} &
2459 Sets the level of verbosity of \bbi for the category of messages
2460 \texttt{category} to \texttt{level}.\\ \hline
2461 %See \ref{verbosity}.
2463 \texttt{config} & - & Displays the Configuration parameters\\ \hline
2465 \texttt{reset} & - & Deletes all boxes and unloads all packages so
2466 that \bbi gets back to its initial state \\ \hline
2468 \texttt{quit} & - & Exits the interpreter (Don't use it under \bbStudions)\\ \hline
2472 % ==========================================
2476 % ==========================================
2477 \subsection{Complex black box definition related commands}
2478 \label{bbi-reference-black-box-definition}
2479 % ==========================================
2481 See table \ref{bbi-reference-complex-box}
2482 % ==========================================
2484 \caption{\label{bbi-reference-complex-box} \bbi complex black box definition related commands.}
2486 \begin{tabular}{|lcm{6cm}|}
2488 Command & Parameters & Effect \\ \hline
2491 \texttt{define} & \texttt{<box-type>} &
2492 Starts the definition of a complex black box of type
2493 \texttt{box-type}\\ \hline
2495 \texttt{endefine} & - &
2496 Ends the definition of a complex black box type\\ \hline
2498 \texttt{author} & \texttt{<string>} &
2499 Sets the author(s) of the complex black box currently being defined \\ \hline
2501 \texttt{description} & \texttt{<string>} &
2502 Sets the description of the complex black box currently being defined \\ \hline
2504 \texttt{input} & \texttt{<name>} \texttt{<box.input>} \texttt{<help>} &
2505 Defines a new input for the current complex black box,
2506 named \texttt{name}.
2507 It is defined as corresponding to
2508 the input \texttt{input} of the box \texttt{box}.
2510 \texttt{<help>} is the help string for the new input.
2511 The box \texttt{box} must already have been created in the complex box
2512 and of course have an input named \texttt{input}.\\ \hline
2514 \texttt{output} & \texttt{<name>} \texttt{<box.output>} \texttt{<help>} &
2515 Defines a new output for the current complex black box,
2516 named \texttt{name}.
2517 It is defined as corresponding to
2518 the output \texttt{output} of the box \texttt{box}.
2519 \texttt{<help>} is the help string for the new output.
2520 The box \texttt{box} must already have been created in the complex box and of course have an output named \texttt{output}. \\ \hline
2525 % ==========================================
2529 \section{Install and run time issues}
2533 For some strange reasons (?!?), at \texttt{cmake} time, you may be warned that an error occured while documentation generation.\\
2534 Take it easy, \texttt{make} again!\\
2536 \item{\bbStudio} is written using the Advanced User Interface library of wxWidgets.
2537 If, after some hazardous floating/docking operations onto the frame, you feel
2538 very unhappy with the result, just remove from the hidden directory
2539 \texttt{.bbtk} the file named \texttt{bbStudio.aui}. \\
2544 %\section{Conclusion}