]> Creatis software - bbtk.git/blobdiff - kernel/doc/bbtkUsersGuide/bbtkUsersGuide.tex
New features (plug package)
[bbtk.git] / kernel / doc / bbtkUsersGuide / bbtkUsersGuide.tex
index 47e068dae8c79985a0b0bd4457f01ba18c6fd150..9679dd01531162eb25a4eb86c3820e21074728bf 100644 (file)
@@ -5,6 +5,7 @@
 
 
 \begin{document}
+
 \begin{center}
 
 {\Large \BBTK}
 \vspace{0.5cm}
 
 
-Last modified on : October 12, 2008 \\
+Last modified on : October 16, 2008 \\
 Generated on : \today 
 \vspace{0.5cm}
-
-Laurent Guigues, Jean-Pierre Roux
+\end{center}
+\begin{center}
+Eduardo D\'avila, Laurent Guigues, Jean-Pierre Roux 
+\end{center}
+\begin{center}
+CREATIS-LRMN, Centre de Recherche en Imagerie Medicale \\ CNRS UMR 5220, INSERM U620\\
+INSA Lyon\\
+Universit\'e Claude-Bernard Lyon 1
 \end{center}
 
 % ==========================================
@@ -54,10 +61,11 @@ It's a part of the \texttt{Creatools suite} composed mainly of :
  creaContours
  creaImageIO
  creaLib
- gdcm 
 \end{verbatim}
 which depend on the OpenSource libraries: 
 \begin{verbatim}
+ gdcm 
  itk
  vtk
  wxWidgets
@@ -98,7 +106,7 @@ One can use a black box in a purely abstract way.
 \item{\bf symbolic} means that a particular 
 input or output is referenced by a 'name', that is by a symbol 
 which identifies the input or output. 
-It also means that symbolic information (text!) is 
+It also means that symbolic information (text) is 
 attached to a box: description of the box, author, 
 description of its inputs and outputs, etc.
 \end{itemize}
@@ -157,7 +165,7 @@ have been written by different persons, using different libraries, etc.
       \item {\bf\emph{std}} : the 'standard' package including basic useful boxes.
       \item {\bf\emph{wx}} : basic graphical interface elements (widgets : sliders, buttons, etc. based on the \texttt{wxWidgets} library).  
       \item {\bf\emph{itk}} : the basic image processing package, based on the \itk library.
-      \item {\bf\emph{vtk}} : the basic images and surfaces processing and vizualization package, based on the \vtk library.
+      \item {\bf\emph{vtk}} : the basic images and surfaces processing and visualization package, based on the \vtk library.
       \item {\bf\emph{wxvtk}} : widget boxes based on the \vtk library (2D and 3D vizualization and
       interaction).
       %\item {\bf\emph{creaImageIO}} : Provides hight level widgets to read images, including DICOM.
@@ -166,7 +174,7 @@ have been written by different persons, using different libraries, etc.
   \item A {\bf\emph{Developement environment}}, called \bbStudio, which provides
     \begin{itemize}
       \item An online {\bf\emph{script editor and interpretor}}
-      \item A powerfull html {\bf\emph{Help environment}},whith integrated :       
+      \item A powerful html {\bf\emph{Help environment}}, integrating :       
         \begin{itemize}
           \item Online documentation scaning
           \item Retreiving boxes on various criterions
@@ -185,12 +193,13 @@ have been written by different persons, using different libraries, etc.
                 %author, description, inputs, outputs, and so on).
             \item \bbCreatePackage allows to create the basic file architecture 
                to start the development of a new black box package.
-            \item \bbCreateBlackbox allows to create the basic file architecture 
+            \item \text{bbCreateBlackbox} allows to create the basic file architecture 
                to start the development of a new black box, that will be included in an already existing package.             
             \item \texttt{bbs2cpp} translates a \texttt{.bbs} script into a \CPP file.
             \item \texttt{bbc} that interprets (i.e. : executes) a \texttt{.bbs} script.                 
          \end{itemize}
-      \item A full {\bf\emph{documentation}} printable (pdf), browsable (html), queryable thru keywords.         
+      \item A full {\bf\emph{documentation}} printable (pdf), browsable (html),
+      queryable throught keywords.       
 \end{itemize}
 
 The general architecture of \BBTK 
@@ -334,9 +343,9 @@ All the entries of the starting page are self-explanatory :
      application, just using already existing boxes.
      \item {\bf\emph{Package Developper's Guide}} : Step to step How-to for user who wants to create his own
      black boxes.
-     \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers. Sorry, not yet written.
-     \item {\bf\emph{Reference Manual}} : Sorry, not yet written.
-     \item {\bf\emph{Booklet}} : Vade mecum. Sorry, not yet written.    
+     \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers. .
+     \item {\bf\emph{Reference Manual}} : 
+     \item {\bf\emph{Booklet}} : Vade mecum.    
      \item {\bf\emph{Doxygen Documentation}} : Doxygen source browser.
    \end{itemize}
         
@@ -348,7 +357,7 @@ All the entries of the starting page are self-explanatory :
    \end{itemize} 
    
         A special hidden Box category, called \texttt{{Adaptors}} exists. \\ 
-       They are used internaly to perform type conversions. Thought there are not end user intended, an aware user may query them.     
+       They are used internaly to perform type conversions. Thought there are not end user intended, you may query them.     
 
       
  \end{itemize}
@@ -456,7 +465,7 @@ The source code of the script
 \end{verbatim}
 We create a \texttt{Slider} called \emph{slider}\\
 We tell it to inform anybody that's interested in, that the cursor moved, each time it moved. \\
-The standard behaviour is to inform, only when cursor is released.
+The deafuault behaviour is to inform, only when cursor is released.
 \begin{verbatim}
    new OutputText text
 \end{verbatim}
@@ -464,23 +473,23 @@ We create a \texttt{OutputText} called \emph{text}
 (in which slider value will be displayed)
 
 \begin{verbatim}
-new LayoutLine layout
+   new LayoutLine layout
 \end{verbatim}
 We create a \texttt{LayoutLine} called \emph{layout},
 a \emph{container} widget, designed to embed other wigets (say, a main window)
 \begin{verbatim}
-connect slider.Widget    layout.Widget1
-connect text.Widget      layout.Widget2
+   connect slider.Widget    layout.Widget1
+   connect text.Widget      layout.Widget2
 \end{verbatim}
 We embed \emph{slider} and \emph{text} into  \emph{layout}.
 \begin{verbatim}
-connect slider.BoxChange text.BoxExecute
-connect slider.Out       text.In
+   connect slider.BoxChange text.BoxExecute
+   connect slider.Out       text.In
 \end{verbatim}
 We tell  \emph{slider} to inform \emph{text} every time it's modified.\\
 We tell  \emph{slider} to pass its output value (\texttt{Out} to \emph{text}  input value (\texttt{In})
 \begin{verbatim}
-exec layout
+   exec layout
 \end{verbatim}
 We tell \emph{layout} to process itself (it will do it only if it's warned 
 that one of its entries was modified since its (own) last processing.
@@ -526,7 +535,7 @@ Various levels or help are suplied by \bbStudions.
 
 
 The 'working' area (the left one, as opposed to the 'help' area, on the right side) is composed of : 
-one single line zone (Command), at the bottom in which you can enter your commands and 
+one single line area (\texttt{Command}), at the bottom in which you can enter your commands and 
 a multiple line zone in which the Command interpreter prints out the result of your commands.
 The upper part contains the script editor; we shall not use it right now, you may reduce it
 
@@ -570,7 +579,7 @@ Available commands :
 \end{verbatim}
 
 To get help on a particular command type \texttt{help <command-name>},
-for example :
+for example:
 \begin{verbatim}
 > help author
 \end{verbatim}
@@ -690,7 +699,7 @@ you get something like :
 \end{verbatim}
 
 Now the interpreter knows the package \texttt{std} and the black boxes it provides,
-such as the \texttt{'Add'} box, the \texttt{'ConcatStrings'} box, and so on. Remark that the 
+such as the \texttt{Add} box, the \texttt{ConcatStrings} box, and so on. Remark that the 
 content of \texttt{std} may vary from one version to another 
 as new black boxes might be added to it. 
 If you type :  
@@ -700,7 +709,7 @@ If you type :
 
 You'll get a text help, in the 'Message' part :
 \begin{verbatim}
-Black Box <std::Add>S
+Black Box <std::Add>
   Adds its inputs
   By : laurent.guigues@creatis.insa-lyon.fr
   Categories : atomic box;math;
@@ -716,7 +725,7 @@ Black Box <std::Add>S
      'Out'            <Double>     []       : Result
 \end{verbatim}
 
-More information about what is a 'box' will be given in the 'Scriptting' part of this manual.
+More information about what is a 'box' will be given in the 'Scripting' part of this manual.
 
 % ==========================================
 \subsubsection{Guides}
@@ -728,7 +737,7 @@ An html version of all the guides is browsable in the \texttt{Help} part of \bbS
      application, just using already existing boxes.
      \item {\bf\emph{Package Developper's Guide}} : Step to step How-to for programmer who wants to create his own
      black boxes/packages.
-     \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers only. (This one is probabely not very much
+     \item {\bf\emph{Developper's Guide}} : For bbtk kernel developpers only. (This one is probably not very much
      up-to-date, since we spend more time in developping than writing documentation that's not of user concern).
      \item {\bf\emph{Reference Manual}} : Contains a exaustive description of all the features for all the commands.
      \item {\bf\emph{Booklet}} : Vade mecum.     
@@ -755,9 +764,9 @@ An html version of all the guides is browsable in the \texttt{Help} part of \bbS
       %\item {\bf\emph{creaImageIO}} : Provides hight level widgets to read images, including DICOM.
       \item {\bf\emph{toolsbbtk}} : Tools for bbtk administration and package development, such as :
          \begin{itemize}
-        \item{GUICreateBlackBox} For creating the XML or C++ code for a new black box 
-        \item{GUICreatePackage} For creating a new bbtk package file structure on disk (Graphical user interface for the shell script bbCreatePackage)
-        \item{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.  
+        \item{\texttt{GUICreateBlackBox}} For creating the XML or C++ code for a new black box 
+        \item{\texttt{GUICreatePackage}} For creating a new bbtk package file structure on disk (Graphical user interface for the shell script bbCreatePackage)
+        \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.         
          \end{itemize}              
     \end{itemize}
     \item {\bf\emph{List by category}}.
@@ -772,20 +781,21 @@ An html version of all the guides is browsable in the \texttt{Help} part of \bbS
        Whether it's written is C++ or it's an assembly of several black boxes (atomic or complex).\\
        Any box is either atomic ou complex.
        \item{example / demo / application}\\
-           Theese ones are always complex black boxes. 
+           These ones are always complex black boxes. 
           \begin {itemize}
              \item{example}\\
-            It's just a (simple) example on how to use a given feature.
+            It's just a (simple) example, for programmers, on how to use a given feature.
              \item{demo}\\
-            It can be a 'good looking' (a.k.a 'sexy') example on some sophisticated work.       
+            It can be a 'good looking' (a.k.a 'sexy') example on some sophisticated work, done only by using \texttt{bbtk} 
+            boxes.      
              \item{application}\\
-            It's a Final application, end user intended (e.g. Subscale a huge volume, Crop a DICOM image, etc)  
+            It's a Final application, end user intended (e.g. Subscale a huge volume witout loading it in memory, Crop a DICOM image, etc)      
           \end {itemize}
         \item{widget}\\
         Piece of graphical interface (based on \texttt{wxWidgets})
         \item{Dicom}\\
         Dicom medical image related box.
-        \item{viewer}\\
+        \item{viewer}
         \item{read/write}
         \item{mesh}
         \item{3D Object creator}
@@ -800,9 +810,7 @@ An html version of all the guides is browsable in the \texttt{Help} part of \bbS
 % ==========================================
 
 
-You can run it using the tool bar of the 'Command' part.
-
-See figure \ref{imPackage_Browser}.
+You can run it using the tool bar of the 'Command' part. See figure \ref{imPackage_Browser}.
 
 \begin{figure}[!ht]
 \caption{\label{imPackage_Browser}The Package Browser}
@@ -812,9 +820,9 @@ See figure \ref{imPackage_Browser}.
 \end{figure}
 
 It allows you to query informations about what you can find in the packages (boxes and applications), using several criterions
-(warning : it's case sensitive, i.e \texttt{Button} will give different results thn \texttt{button} ...)
+(warning : it's case sensitive, i.e '\texttt{Button}' will give different results than '\texttt{button}' ...)
 \begin {itemize}
-\item Pakages :\\
+\item Packages :\\
 All the boxes and applications held in a given package (e.g. \texttt{wxvtk}, \texttt{std}, ...)
 \item Name :\\
 You can query on a subpart of the name of a box or an application (e.g. \texttt{DICOM})
@@ -854,42 +862,43 @@ At last, let's have a look at \bbStudio menu.(See figure \ref{themenu})
 \end{figure}
 
 \begin {itemize}
-  \item{File}
+  \item{\texttt{File}}
      \begin {itemize}
-        \item{Open bbtk config}
-        \item{Quit}
+        \item{\texttt{Open the bbtk configuration file}}
+        \item{\texttt{Quit}}
      \end {itemize}       
-  \item{Tools}
+  \item{\texttt{Tools}}
      \begin {itemize}
-        \item{Create package}
-       Provides a graphical interface to help Package developper to create a new void package.
-        \item{Create black box}
-       Provides a graphical interface to help Package developper to create a new void black box, and add it to an already existing package.    
-        \item{Show last image graph}
-        \item{Regenerate package doc}
-       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.      
-        \item{Regenerate boxes list}
-       User wants to update only boxes list (quicker)
-        \item{Regenerate all}
+        \item{\texttt{Create package}} :
+       Provides a graphical interface to help Package developper to create a new empty package.
+        \item{\texttt{Create black box}}
+       Provides a graphical interface to help Package developper to create a new empty black box, and add it to an already existing package.   
+        \item{\texttt{Show last image graph}}
+        \item{\texttt{Regenerate package doc}} :
+       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.      
+        \item{\texttt{Regenerate boxes list}} :
+       if user wants to update only boxes list (quicker)
+        \item{\texttt{Regenerate all}}
        User wants to rebuild the whole documentation.     
      \end {itemize}     
-  \item{Options}
+  \item{\texttt{Options}}
      \begin {itemize}
-        \item{Reset before running} Before running, all the already boxes are destroyed, all the already loaded packages are unloaded (this is the recomended option).   
+        \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).   
      \end {itemize}     
-  \item{Windows}
+  \item{\texttt{Windows}}
   User may decide, for any reason of his own, to hide one or more pannels:
      \begin {itemize}
-        \item{Show 'Files' panel}
-        \item{Show 'Help' panel}
-        \item{Show 'Command' panel}
-        \item{Show 'Messages' panel}
-        \item{Launch Package browser} The package browser is a stand alone application. This can be achieved, too, using the lower tool bar, button 'Start Package Browser'    
+        \item{\texttt{Show 'Files' panel}}
+        \item{\texttt{Show 'Help' panel}}
+        \item{\texttt{Show 'Command' panel}}
+        \item{\texttt{Show 'Messages' panel}}
+        \item{\texttt{Launch Package browser}} The package browser is a stand alone application. This can be achieved, too,
+        using the lower tool bar : button \texttt{Start Package Browser}.      
         \item{}     
      \end {itemize}     
-  \item{About}
+  \item{\texttt{About}}
      \begin {itemize}
-        \item{About}        
+        \item{\texttt{About}} : Info about \texttt{bbStudio}.       
      \end {itemize}     
 \end {itemize}
 % ==========================================
@@ -912,8 +921,8 @@ holding the script.
 
  You'll see it, in the '\texttt{Files}' part.\\ \\
  You may run it, using the lower toolbar. \\ 
- \texttt{WARNING :} if the script contains one or more \texttt{LayoutSplit}
- object, you will have to resize the sub windows. \\ \\
%\texttt{WARNING :} if the script contains one or more \texttt{LayoutSplit}
+% object, you will have to resize the sub windows. \\ \\
  You may modify, save or save-as the current script, using the lower toolbar.\\ \\
  You may have a look at the graphical representation of the pipeline (sorry,
  right now, to modify the pipeline, you have to modify the script; 
@@ -924,8 +933,29 @@ holding the script.
 \subsection{Inside black boxes}
 % ==========================================
 
-After loading the package it belongs to, you can ask information about a given black box :\\
+After loading the package it belongs to, you can You can create an \emph{instance} of an \texttt{Add} box by 
+the command \texttt{new} :
+
+\begin{verbatim}
+> new Add a
+\end{verbatim}
+
+The \texttt{'a'} at the end is the \emph{name} of the instance, 
+which will be used to reference it later. 
+It is important to distinguish a box \emph{type} 
+and an \emph{instance} of a box type. 
+The \texttt{Add} box of the package \texttt{std} is actually 
+a \emph{box type} , like \texttt{int} is a data type 
+in \texttt{C} langage. The \texttt{new} command allows to create 
+an instance of a box type, exactly like \texttt{int i;} in 
+a \texttt{C} code, it declares a variable of type \texttt{int} whose 
+name is \texttt{i}. 
+Of course, like in \texttt{C} Language, you can declare multiple boxes of the 
+same type in \bbi. \\
+
+You can ask information about a given black box :\\
 In the \texttt{Command part}, type \texttt{help} + black box name, e.g. \\
+
 \begin{verbatim}
 > help Add a
 \end{verbatim}
@@ -952,26 +982,7 @@ its \emph{type} (between \texttt{<} and  \texttt{>}, e.g. \texttt{<Int>})
 and a description.    
 Remark that the box \texttt{Add} is not a 'complex' black box 
 but an 'atomic' box, hence its help does not 
-mention any information concerning possible internal boxes.
-
-You can create an \emph{instance} of an \texttt{Add} box by 
-the command \texttt{new} :
-\begin{verbatim}
-> new Add a
-\end{verbatim}
-
-The \texttt{'a'} at the end is the \emph{name} of the instance, 
-which will be used to reference it later. 
-It is important to distinguish a box \emph{type} 
-and an \emph{instance} of a box type. 
-The \texttt{Add} box of the package \texttt{std} is actually 
-a \emph{box type} , like \texttt{int} is a data type 
-in \texttt{C} langage. The \texttt{new} command allows to create 
-an instance of a box type, exactly like \texttt{int i;} in 
-a \texttt{C} code, it declares a variable of type \texttt{int} whose 
-name is \texttt{i}. 
-Of course, like in \texttt{C} Language, you can declare multiple boxes of the 
-same type in \bbi. 
+mention any information concerning possible internal boxes. 
 
 After the creation of the box \texttt{a}, type :
 \begin{verbatim}
@@ -1051,7 +1062,7 @@ box itself displays something in its processing).
 It just processes the box if needed. 
 This command is used to execute boxes that do not have any output,  
 such as boxes that write something to a file or, display a 
-graphical interface, and so on. 
+graphical interface, and so on. \newline
 
 %To exit \bbi, type :
 %\begin{verbatim}
@@ -1059,6 +1070,8 @@ graphical interface, and so on.
 %Good bye !
 %\end{verbatim}
 
+
+
 % ==========================================
 \hrule
 
@@ -1150,13 +1163,13 @@ You will see the (very expected) result :
 
 The first three commands build the pipeline, 
 the next three set \texttt{a} and \texttt{b} black boxes inputs and the last one 
-prints \texttt{b} black boxe output (the pipeline is executed before printing, because the interpretor 'knows' the box  \texttt{b}, 
+prints \texttt{b} black box output (the pipeline is executed before printing, because the interpretor 'knows' the box  \texttt{b}, 
 whose output is requested, is not up to date.
  
 The command \texttt{'connect a.Out b.In1'} ``plugs'' the output 
 \texttt{Out} of the box \texttt{a} into the input \texttt{In1} of the 
 box \texttt{b}. 
-Once the boxes connected, the processing of the two boxes are chained :
+Once the boxes are connected, the processing of the two boxes are chained :
 getting the output of \texttt{b} requires getting its inputs, 
 hence getting the output of \texttt{a} which is connected to it. 
 This pipeline mechanism can recurse into arbitrary long 
@@ -1195,7 +1208,7 @@ Some explainations : the \texttt{include} instructions load the necessary packag
 \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).\\
 \texttt{connect reader.Out       viewer.In} plugs the output of the reader (an itk::ImagePointer) to the input of the Viewer (a vtkImageData *)\\
 \texttt{connect slider.Out       viewer.Slice} plugs the output of the slider (an int) to an other output (named Slide) of the viewer.\\
-\texttt{connect slider.BoxChange viewer.BoxExecute} says the viewer it must re process itself any time the slider is modified.\\
+\texttt{connect slider.BoxChange viewer.BoxExecute} says the viewer that it must re process itself any time the slider is modified.\\
 \\
 \texttt{exec viewer} processes the viewer.
 
@@ -1219,7 +1232,7 @@ An adaptor is a black box which has at least one input, called \texttt{In},
 and at least one ouput called \texttt{Out} and whose role is to convert 
 a data of the type of \texttt{In} 
 into a data of the type of \texttt{Out} (other inputs or outputs may serve 
-to parameter the adaptor or retreive other usefull information).
+to parameter the adaptor or retreive other useful information).
 
 Under \bbStudions, if you type :
 \begin{verbatim}
@@ -1264,7 +1277,9 @@ adaptor converts the output data into the required input type,
 in a totally transparent way.
 In our example, the \texttt{CastUCharToDouble} adaptor 
 would simply cast the value of the \texttt{char} into a \texttt{double}, 
-however arbitrarily complex type conversion may be done.
+however arbitrarily complex type conversion may be done.\\
+\texttt{WARNING} : these adaptors are \texttt{C++ static cast}, i.e., there is, right now',
+ no 'intelligent' conversion (only truncation) e.g. think to \texttt{CastDoubleToUChar}!
 
 %\begin{verbatim}
 %Question (for info-dev): 
@@ -1309,7 +1324,7 @@ including adaptors
 
 Remember the pipeline of figure 
 \ref{bbi-fig-connecting-black-boxes-1}, which 
-computed the sum of three doubles?
+computed the sum of three doubles.
 You can consider it as a whole and define 
 a new black box type, which will be a \emph{complex black box}, 
 having three inputs and one output, 
@@ -1428,8 +1443,9 @@ and you can use it like any other box, for example type :
 As a side note, we can say that, for consistency reasons, it would have been better to name  
 \texttt{In1}, \texttt{In2} and \texttt{In3} the inputs of the black box \texttt{Add3}, 
 since all the 'natural entry' of a box is named \texttt{In}, or \texttt{In}\emph{x} if there are more than one  'natural
-entry'.
-
+entry'
+.
+\newline
 % ==========================================
 \hrule
 \paragraph{Summary}
@@ -1454,7 +1470,7 @@ of internal boxes they correspond.
 Once you have defined a new type of complex box, you 
 may like to reuse it. To do this, you can simply 
 write the \bbi commands defining the new box 
-into a text file and afterwards include that file in \bbi. 
+into a text file and afterwards include that file in \bbins
 Doing this, you start writing \bbi scripts.
 The conventionnal (and mandatory) extension for such scripts is \texttt{bbs} 
 (black box script).
@@ -1838,7 +1854,7 @@ each part of equal size.
 The orientation of the \texttt{LayoutSplit} or of the \texttt{LayoutLine}  can be changed by the input \texttt{Orientation}.
 See the example \texttt{test/testSizer.bbs}.
 With only those two containers you can already create 
-complex dialog boxes (of course containers can be nested, which leads to tree-like structures of widgets). 
+complex dialog boxes (of course containers can be nested, which leads to tree-like structures of widgets). \\
 See the script \texttt{bbtk/share/bbtk/bbs/wx/appli/ExampleLayoutSplit.bbs} for an example.
 
 \item {The \texttt{LayoutTab}  widget} is based on the \texttt{wxNotebook.}\\
@@ -1909,21 +1925,21 @@ Any widget box has two mandatory Outputs  :
 % ==========================================
 
 % ==========================================
-\subsubsection{Black box packages}
-\label{bbi-more-on-packages}
+%\subsubsection{Black box packages}
+%\label{bbi-more-on-packages}
 % ==========================================
-There are various others user-intended packages :
+%There are various others user-intended packages :
 
-\begin{verbatim}
----> Were moved in a 'Reference Manual' ?\\
----> Any suggestion welcome!
-\end{verbatim}
+%\begin{verbatim}
+%---> Were moved in a 'Reference Manual' ?\\
+%---> Any suggestion welcome!
+%\end{verbatim}
 
-\begin{itemize}
-\item{vtk} \\
-\item{itk} \\
-\item{...} \\
-\end{itemize}
+%\begin{itemize}
+%\item{vtk} \\
+%\item{itk} \\
+%\item{...} \\
+%\end{itemize}
 % ==========================================
 \subsubsection{Pipeline processing}
 \label{bbi-more-on-pipeline-processing}
@@ -1976,8 +1992,8 @@ The writer of the complex box has the ability to give these inputs a meaningfull
 %\paragraph{Reducing the number of inputs of a box}
 
 % ==========================================
-\subsubsection{Errors}
-\label{bbi-more-on-errors}
+%\subsubsection{Errors}
+%\label{bbi-more-on-errors}
 
 % ==========================================
 \subsubsection{Creating and using your own uninstalled version of bbStudio}
@@ -2017,15 +2033,14 @@ Don't forget to switch ON the flag \texttt{BBTK\_COMPILE\_DEBUG\_MESSAGE} \\
 \end{center}
 \end{figure}
 
-\item As usual, type \texttt{c} untill there is no longer any area quoted with a * (or enlighted in red)\\
+\item As usual, type \texttt{c} until there is no longer any area quoted with a * (or highlighted in red)\\
 Ask for generation (type \texttt{g} -once is always enough-)
 
 \item Ask for compilation and link.
 \begin{verbatim}
 make
 \end{verbatim}
-For some strange reasons (?!?), you may be warned that an error occured while documentation generation.\\
-Take it easy, \texttt{make} again!\\
+
 
 The dynamic libraries (\texttt{.dll} or \texttt{.so} and the executable programs will be created in the \texttt{bin}
 directory of the built tree.
@@ -2037,8 +2052,81 @@ make install
 Linux users : Don't forget to \texttt{sudo} before.
 \end{itemize}
 % ==========================================
-\subsubsection{\bbtk configuration file and search pathes}
-\label{bbi-more-on-configuration}
+
+
+\newpage
+
+
+
+% ==========================================
+%\vspace{0.5cm}\hrule \\
+
+\section{Using third party Package}
+\label{Third_Party_Package}
+% ==========================================
+% ==========================================
+\subsection{Plugging in a Package}
+\label{Plugging_in_a_Package}
+% ==========================================
+
+\bbStudio makes it easy for you : in the menu \texttt{Tools} just click on the 
+option \texttt{Plug Package}. You will be asked to  to '\texttt{Select
+package directory}'. Browse untill you find the the install tree, or the the build tree,
+depending whether you installed the package or not.\\
+
+\bbStudio will update the Configuration file, generate the 'Package
+documentaion', and update the 'Box List'.\\
+You will be able to use the new package just as you did for any other \bbtk
+canonical Package.
+
+% ==========================================
+\subsection{Hard incorporating of a Package}
+\label{Hard_incorporating_of_a_Package}
+% ==========================================
+
+If the Package you want to use is supplied in a non standard way (e.g. : you
+where given one ore more dynamic libraries (\texttt{.dll} or \texttt{.so}), and
+one or more directories containing \bbtk scripts (\texttt{.bbs}), you will have
+to proceed to some (simple) manual operations.\\
+\texttt{Nota bene} : This way is hightly discouraged !
+
+% ==========================================
+\subsubsection{More on the configuration file}
+\label{The_configuration_file}
+% ==========================================
+
+First, have a glance at the Configuration,  just clicking on \texttt{Config} button of the \texttt{Command} part toolbar.
+
+You'll get something like :
+
+\begin{verbatim}
+=============
+ Configuration
+ =============
+ bbtk_config.xml    : [/home/jpr/Creatis/bbtk/binLIN/bin/bbtk_config.xml]
+ Documentation Path : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/doc]
+ Data Path          : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/data]
+ Temp Directory     : [/home/jpr/Creatis/bbtk/binLIN]
+ File Separator     : [/]
+ BBS Paths   
+ --- [.]
+ --- [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/bbs]
+ --- [/home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs]
+ PACKAGE Paths : 
+ --- [.]
+ --- [/home/jpr/Creatis/bbtk/binLIN/bin]
+ --- [/home/jpr/Creatis/bbtk/binLIN/bin/../lib]
+ --- [/home/jpr/Creatis/bbtk/binLIN/bin]
+ --- [/home/jpr/Creatis/bbtk/binLIN/bin\Debug]
+ --- [/home/jpr/Creatis/bbtk/binLIN/bin\Release] 
+\end{verbatim}
+
+(depending on who you are, and whether \texttt{bbStudio} is installed or not.)\\
+
+Note the two main parts : \texttt{BBS Paths} and \texttt{PACKAGE Paths}
+\subsubsection{How bbStudio uses the Configuration file}
+\label{How_bbStudio_uses_the_Configuration_file}
+
 
 At start, \bbi tries to open an \texttt{xml} 
 configuration file named \texttt{bbtk\_config.xml}. 
@@ -2055,47 +2143,217 @@ the user's profile directory stored by the environnement
 variable \texttt{USERPROFILE}, 
 typically \texttt{C:\\...}.
 \end{itemize}
-\item If none of these two pathes contains the file then it creates 
+\item If none of these two paths contains the file then it creates 
 a new one in the \texttt{.bbtk} directory. 
 \end{enumerate}
 
-Once created, you can edit the \texttt{bbtk\_config.xml} file located 
-in your \texttt{.bbtk} directory. It contains :
 
-\begin{file}{bbtk\_config.xml}
+To use a third party Package, you will have to update it.\\
+
+\subsubsection{Modifying the Configuration file}
+\label{Modifying_the_Configuration_file}
+
+Just use the \texttt{Open bbtk Config file} option of the \texttt{Files} of the \bbStudio menu.
+
+You will get something like :
 \begin{verbatim}
-<?xml version="1.0" encoding="iso-8859-1"?>
 <config>
-   <description>  </description>
-   <bbs_path>     </bbs_path>
-   <package_path> 
-      /usr/local/lib
-   </package_path>
-   <data_path> </data_path>
-   <default_temp_dir>$</default_temp_dir>
+  <description> Sets the search directories in the build tree </description>
+  <url> </url>
+  <bbs_path> /home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs </bbs_path>
+  <package_path> /home/jpr/Creatis/bbtk/binLIN/bin </package_path> 
+# For windows
+  <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Debug </package_path> 
+  <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Release </package_path> 
+#
+  <data_path> </data_path>
+# 
+  <default_temp_dir>  /home/jpr/Creatis/bbtk/binLIN </default_temp_dir>   
 </config>
 \end{verbatim}
-\end{file}
 
-You can add pathes to 
+To use a new Package :
+\begin{itemize}
+\item {}
+After the already existing \texttt{xml} tags 
+\texttt{bbs\_path}
+ (i.e. the lines begining by 
+ \texttt{<bbs\_path>} 
+ %bbs_path
+and ending by 
+\texttt{</bbs\_path>}), 
+you can add paths to :
+\begin{itemize}
+\item A custom folder in which to search for \texttt{.bbs} scripts (\texttt{include} command of \bbins) by adding
+ an \texttt{xml} tag:\\ 
+ \texttt{<bbs\_path>} 
+\emph{complete\_path\_to\_scripts\_folder}
+\texttt{<\/bbs\_path>}.
+\end{itemize}
+
+\item {}
+After the already existing tags 
+\texttt{package\_path}
+ (i.e. the lines begining by 
+ \texttt{package\_path} 
+ %bbs_path
+and ending by 
+\texttt{/package\_path}), 
+you can add paths to :
 \begin{itemize}
-\item A custom folder in which to search for \texttt{.bbs} scripts (\texttt{include} command of \bbi) by adding an \texttt{xml} tag : 
-\texttt{<bbs\_path>complete\_path\_to\_folder<\/bbs\_path>}.
-\item A custom folder in which to search for packages (\texttt{load} command of \bbi) by adding an \texttt{xml} tag : 
-\texttt{<package\_path>complete\_path\_to\_folder<\/package\_path>}.
+\item A custom folder in which to search for packages (the dynamic libraries
+ (\texttt{.dll} or \texttt{.so}, called with the \texttt{load} command of \bbins) by adding an \texttt{xml} tag :\\ 
+\texttt{<package\_path>} 
+\emph{complete\_path\_to\_dynamic\_library\_folder}
+\texttt{<\/package\_path>}.
+\end{itemize}
 \end{itemize}
 
 
+%\end{itemize}
+% ==========================================
+\subsection{Updating the documentation}
+\label{Updating_the_documentation}
+% ==========================================
+You may add your own boxes (simple boxes, if you are aware enough in \CPP
+language), or complex boxes if you are aware enough in bbtk scripting).
+
+To be able to use the Help tools as well as the features provided by this package,
+ you must use the
+option \texttt{Regenerate package doc}  in the menu \texttt{Tools} of \texttt{bbStudio}.\\
+You'll be prompted for the Package name. Avoid using the \texttt{-a} option (Regenerate all), since it's time consumming.
+
+To benefit the features of Box indexing you must use the
+option \texttt{Regenerate Boxes Lists}  in the menu \texttt{Tools} of \texttt{bbStudio}.\\
+
+
+% ==========================================
+\subsection{Using the package}
+\label{Using_the_package}
+% ==========================================
+
+The only thing you have to do is to \texttt{load} the package, within the script, or from the
+\texttt{Command} part, and enjoy the black boxes it contains.
+
+% ==========================================
+\subsection{Packages you'll probably want to use }
+\label{Packages_you_ll_want_to_use}
+% ==========================================
+\begin {itemize}
+\item{\texttt{creaLib}} \\
+a.k.a \texttt{crea}. It's a set of 'low level' utilities, needed by other
+packages (an, sure,  useful as well for people that doesn't use bbtkns.
+
+\item{\texttt{creaContours}} \\
+Provides sophisticated widgets for managing 3D R.O.I. (Regions of interest)
+\item{\texttt{creaImageIO}} \\
+Allows browsing, selectionning, ordering directories containing images of almost any type
+(including DICOM)
+\end {itemize}
+
 \newpage
+% ==========================================
+%\vspace{0.5cm}\hrule \\
+\section{Using black boxes in \CPP programs}
+\label{cpp}
+% ==========================================
+
+A very useful feature is that you may use any black box within a \CPP program without worrying about \texttt{wxWigets} main window.\\
+
+Let's look a the following bbs script :
+
+\begin{verbatim}
+# Load the packages
+load std
+load wx
+
+# Create the Objects
+new Slider     slider
+new OutputText text
+new LayoutLine layout
+
+# Graphical pipeline
+connect slider.Widget    layout.Widget1
+connect text.Widget      layout.Widget2
+
+# Execution pipeline
+connect slider.BoxChange text.BoxExecute
+connect slider.Out       text.In
+
+# Go!
+exec layout
+\end{verbatim}
+
+User wants to create a slider and an output text, within a LayoutLine, and display the slider value in the output text.\\ 
+Think about the (little!) nightmare to code the same, in 'raw C++', using wxWidgets.\\
+
+Using the standalone application \texttt{bbc} you just 'convert' the script.
+
+\begin{verbatim}
+#include <bbwxSlider.h>
+#include <bbwxOutputText.h>
+#include <bbtkFactory.h>
+#include <bbwxLayoutLine.h>
+
+int main(int argv, char* argc[])
+{
+      // we need to intanciate a bbtk::Factory to be aware of the adaptors
+      bbtk::Factory::Pointer factory = bbtk::Factory::New();
+      
+      // Load the packages
+      // ----------------  
+      factory->LoadPackage("std");
+      factory->LoadPackage("wx");
+      
+      // Create the Objects
+      // ------------------      
+      bbwx::Slider::Pointer     slider   = bbwx::Slider::New("slider");
+      bbwx::OutputText::Pointer text     = bbwx::OutputText::New("text");
+      bbwx::LayoutLine::Pointer layout   = bbwx::LayoutLine::New("layout");
+      
+      // Graphical pipeline
+      bbtk::Connection::Pointer c1       = bbtk::Connection::New(slider,"Widget",
+                                                          layout,"Widget1");
+                                                          
+      bbtk::Connection::Pointer c2       = bbtk::Connection::New(text,"Widget",
+                                                          layout,"Widget2");
+                                                                                                                                                                          
+      // Execution pipeline
+      // ------------------
+      
+      // We have to pass the 'factory', in order to call automatically an adaptor,
+      // if necessary.
+      bbtk::Connection::Pointer s2t      = bbtk::Connection::New(slider,"Out",
+                                                           text,"In",
+                                                           factory);      
+       bbtk::Connection::Pointer c3       = bbtk::Connection::New(slider,"BoxChange",
+                                                            text,"BoxExecute");      
+      layout->bbSetInputWinDialog(true);
+      
+      // Go!
+      // ---     
+      layout->bbExecute();
+
+    }
+  catch (bbtk::Exception e)
+    {
+      bbtk::MessageManager::SetMessageLevel("Error",1);
+      e.Print();
+    }
+}
+\end{verbatim}
+
+%\bibliography{all}
 
 % ==========================================
-\subsection{Language reference}
+\section{Language reference}
 \label{bbi-reference}
 % ==========================================
 
 
 % ==========================================
-\subsubsection{pipeline creation and execution related commands}
+\subsection{Pipeline creation and execution related commands}
 \label{bbi-reference-creation-execution}
 % ==========================================
  See table \ref{bbi-reference-box}
@@ -2152,7 +2410,7 @@ are also processed recursively (pipeline processing).\\ \hline
 \newpage
 
 % ==========================================
-\subsubsection{Interpreter related commands}
+\subsection{Interpreter related commands}
 \label{bbi-reference-interpreter}
 % ==========================================
 See table \ref{tabbbi-reference-interpreter_1} and \ref{tabbbi-reference-interpreter_2}
@@ -2246,7 +2504,7 @@ that \bbi gets back to its initial state \\ \hline
 \newpage
 
 % ==========================================
-\subsubsection{complex black box definition related commands}
+\subsection{Complex black box definition related commands}
 \label{bbi-reference-black-box-definition}
 % ==========================================
 
@@ -2298,216 +2556,20 @@ The box \texttt{box} must already have been created in the complex box and of co
 
 \newpage
 
-% ==========================================
-%\vspace{0.5cm}\hrule \\
-
-
-
-% ==========================================
-%\vspace{0.5cm}\hrule \\
-
-\section{Using third party Package}
-\label{Third_Party_Package}
-% ==========================================
-
-% ==========================================
-\subsection{The configuration file}
-\label{The_configuration_file}
-% ==========================================
-
-First, have a glance at the Configuration,  just clicking on \texttt{Config} button of the \texttt{Command} part toolbar.
-
-You'll get something like :
-
-\begin{verbatim}
-=============
- Configuration
- =============
- bbtk_config.xml    : [/home/jpr/Creatis/bbtk/binLIN/bin/bbtk_config.xml]
- Documentation Path : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/doc]
- Data Path          : [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/data]
- Temp Directory     : [/home/jpr/Creatis/bbtk/binLIN]
- File Separator     : [/]
- BBS Paths   
- --- [.]
- --- [/home/jpr/Creatis/bbtk/binLIN/bin/../share/bbtk/bbs]
- --- [/home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs]
- PACKAGE Paths : 
- --- [.]
- --- [/home/jpr/Creatis/bbtk/binLIN/bin]
- --- [/home/jpr/Creatis/bbtk/binLIN/bin/../lib]
- --- [/home/jpr/Creatis/bbtk/binLIN/bin]
- --- [/home/jpr/Creatis/bbtk/binLIN/bin\Debug]
- --- [/home/jpr/Creatis/bbtk/binLIN/bin\Release] 
-\end{verbatim}
-
-(depending on who you are, and whether \texttt{bbStudio} is installed or not.)\\
-
-Note the two main parts : \texttt{BBS Paths} and \texttt{PACKAGE Paths}
-
-To use a third party Package, you will have to update the \emph{bbtk\_config.xml} file.\\
-
-Just use the \texttt{Open bbtk Config file} option of the \texttt{Files} of the \bbStudio menu.
-
-You will get something like :
-\begin{verbatim}
-<config>
-  <description> Sets the search directories in the build tree </description>
-  <url> </url>
-  <bbs_path> /home/jpr/Creatis/bbtk/binLIN/share/bbtk/bbs </bbs_path>
-  <package_path> /home/jpr/Creatis/bbtk/binLIN/bin </package_path> 
-# For windows
-  <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Debug </package_path> 
-  <package_path> /home/jpr/Creatis/bbtk/binLIN/bin\Release </package_path> 
-#
-  <data_path> </data_path>
-# 
-  <default_temp_dir>  /home/jpr/Creatis/bbtk/binLIN </default_temp_dir>   
-</config>
-\end{verbatim}
-
-%\begin{itemize}
-%\item {
-After the already existing tags 
-%bbs\_path
-\texttt{bbs\_path}
- (i.e. the lines begining by 
- \texttt{bbs\_path} 
- %bbs_path
-and ending by 
-\texttt{/bbs\_path})
-
-%/bbs_path})
- add a new one with the name of the directory that contains the 
- \texttt{.bbs} scripts of the package you
-want to use.\\
-x
-%\item {
-After the already existing tags \texttt{package\_path} (i.e. the lines begining by \texttt{package\_path}
- and ending by \texttt{/package\_path})
- add a new one with the name of the directory that contains the the dynamic libraries
- (\texttt{.dll} or \texttt{.so}) of the package you want to use.
-
-%\end{itemize}
-% ==========================================
-\subsection{Updating the documentation}
-\label{The_configuration_file}
-% ==========================================
-If you want (and sure you will) to be able to use the Help tools as well on the features provided by this package, you must use the
-option \texttt{Regenerate package doc}  in the menu \texttt{Tools} of \texttt{bbStudio}.
-
-% ==========================================
-\subsection{Using the package}
-\label{Using_the_package}
-% ==========================================
-
-The only thing you have to do is to \texttt{load} the package, within the script, or from the
-\texttt{Command} part, and enjoy the black boxes it contains.
-  
-% ==========================================
-%\vspace{0.5cm}\hrule \\
-\section{Using black boxes in \CPP programs}
-\label{cpp}
-% ==========================================
-
-A very usefull feature is that you may use any black box within a \CPP program witout worrying about wxWigets main window.\\
-
-Let's look a the following bbs script :
-
-\begin{verbatim}
-# Load the packages
-load std
-load wx
-
-# Create the Objects
-new Slider     slider
-new OutputText text
-new LayoutLine layout
-
-# Graphical pipeline
-connect slider.Widget    layout.Widget1
-connect text.Widget      layout.Widget2
-
-# Execution pipeline
-connect slider.BoxChange text.BoxExecute
-connect slider.Out       text.In
-
-# Go!
-exec layout
-\end{verbatim}
-
-User wants to create a slider and an output text, within a layoutline, and display the slider value in the output text.\\ 
-Think about the (little!) nightmare to code the same, in 'raw C++', using wxWidgets.\\
-
-Using the standalone application \bbc you just 'convert' the script :
-\begin{verbatim}
-
-#include <bbwxSlider.h>
-#include <bbwxOutputText.h>
-#include <bbtkFactory.h>
-#include <bbwxLayoutLine.h>
-
-int main(int argv, char* argc[])
-{
-      // we need to intanciate a bbtk::Factory to be aware of the adaptors
-      bbtk::Factory::Pointer factory = bbtk::Factory::New();
-      
-      // Load the packages
-      // ----------------  
-      factory->LoadPackage("std");
-      factory->LoadPackage("wx");
-      
-      // Create the Objects
-      // ------------------      
-      bbwx::Slider::Pointer     slider   = bbwx::Slider::New("slider");
-      bbwx::OutputText::Pointer text     = bbwx::OutputText::New("text");
-      bbwx::LayoutLine::Pointer layout   = bbwx::LayoutLine::New("layout");
-      
-      // Graphical pipeline
-      bbtk::Connection::Pointer c1       = bbtk::Connection::New(slider,"Widget",
-                                                          layout,"Widget1");
-                                                          
-      bbtk::Connection::Pointer c2       = bbtk::Connection::New(text,"Widget",
-                                                          layout,"Widget2");
-                                                                                                                                                                          
-      // Execution pipeline
-      // ------------------
-      
-      // We have to pass the 'factory', in order to call automatically an adaptor,
-      // if necessary.
-      bbtk::Connection::Pointer s2t      = bbtk::Connection::New(slider,"Out",
-                                                           text,"In",
-                                                           factory);      
-       bbtk::Connection::Pointer c3       = bbtk::Connection::New(slider,"BoxChange",
-                                                            text,"BoxExecute");      
-      layout->bbSetInputWinDialog(true);
-      
-      // Go!
-      // ---     
-      layout->bbExecute();
-
-    }
-  catch (bbtk::Exception e)
-    {
-      bbtk::MessageManager::SetMessageLevel("Error",1);
-      e.Print();
-    }
-}
-\end{verbatim}
-
-%\bibliography{all}
-
 \section{Install and run time issues}
 
-\bbStudio is written using the Advanced User Interface library of wxWidgets.
+\begin {itemize}
+\item{make} \\
+For some strange reasons (?!?), at \texttt{cmake} time, you may be warned that an error occured while documentation generation.\\
+Take it easy, \texttt{make} again!\\
+
+\item{\bbStudio} is written using the Advanced User Interface library of wxWidgets.
 If, after some hazardous floating/docking operations onto the frame, you feel
 very unhappy with the result, just remove from the hidden directory
-\texttt{.bbtk} the file named \texttt{bbStudio.aui}. \\ \\
-
-
- \texttt{WARNING :} if the script contains one or more \texttt{LayoutSplit}
- object, you will have to resize the subwindows. \\ 
+\texttt{.bbtk} the file named \texttt{bbStudio.aui}. \\ 
 
+\end {itemize}
 
 %\section{Conclusion}