]> Creatis software - bbtk.git/commitdiff
Some fixes
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Mon, 13 Oct 2008 15:00:24 +0000 (15:00 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Mon, 13 Oct 2008 15:00:24 +0000 (15:00 +0000)
kernel/doc/bbtkUsersGuide/bbtkUsersGuide.tex

index 9261bfa2d21ee37a1a8552612284a37e36f419f9..796f86c8e0fa22a3b0284297f9bb2307049e343d 100644 (file)
@@ -21,7 +21,9 @@ Last modified on : October 12, 2008 \\
 Generated on : \today 
 \vspace{0.5cm}
 
-Laurent Guigues, Jean-Pierre Roux
+Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
+
+Creatis CNRS 5220, INSERM U620
 \end{center}
 
 % ==========================================
@@ -54,10 +56,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 +101,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 +160,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 +169,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
@@ -190,7 +193,8 @@ have been written by different persons, using different libraries, etc.
             \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 +338,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 +352,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}
@@ -526,7 +530,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
 
@@ -716,7 +720,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}
@@ -755,9 +759,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,10 +776,10 @@ 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.       
              \item{application}\\
@@ -800,9 +804,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 +814,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})
@@ -856,20 +858,20 @@ At last, let's have a look at \bbStudio menu.(See figure \ref{themenu})
 \begin {itemize}
   \item{File}
      \begin {itemize}
-        \item{Open bbtk config}
+        \item{Open the bbtk configuration file}
         \item{Quit}
      \end {itemize}       
   \item{Tools}
      \begin {itemize}
-        \item{Create package}
-       Provides a graphical interface to help Package developper to create a new void package.
+        \item{Create package} :
+       Provides a graphical interface to help Package developper to create a new empty 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.    
+       Provides a graphical interface to help Package developper to create a new empty 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 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} :
+       if user wants to update only boxes list (quicker)
         \item{Regenerate all}
        User wants to rebuild the whole documentation.     
      \end {itemize}     
@@ -889,7 +891,7 @@ At last, let's have a look at \bbStudio menu.(See figure \ref{themenu})
      \end {itemize}     
   \item{About}
      \begin {itemize}
-        \item{About}        
+        \item{About} Info about \texttt{bbStudio}.       
      \end {itemize}     
 \end {itemize}
 % ==========================================
@@ -924,8 +926,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 +975,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}
@@ -1150,13 +1154,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 +1199,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 +1223,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 +1268,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 +1315,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, 
@@ -1454,7 +1460,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 +1844,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 +1915,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 +1982,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 +2023,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,7 +2042,7 @@ make install
 Linux users : Don't forget to \texttt{sudo} before.
 \end{itemize}
 % ==========================================
-\subsubsection{\bbtk configuration file and search pathes}
+\subsubsection{\bbtk configuration file and search paths}
 \label{bbi-more-on-configuration}
 
 At start, \bbi tries to open an \texttt{xml} 
@@ -2055,7 +2060,7 @@ 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}
 
@@ -2095,7 +2100,7 @@ You can add pathes to
 
 
 % ==========================================
-\subsubsection{pipeline creation and execution related commands}
+\subsubsection{Pipeline creation and execution related commands}
 \label{bbi-reference-creation-execution}
 % ==========================================
  See table \ref{bbi-reference-box}
@@ -2246,7 +2251,7 @@ that \bbi gets back to its initial state \\ \hline
 \newpage
 
 % ==========================================
-\subsubsection{complex black box definition related commands}
+\subsubsection{Complex black box definition related commands}
 \label{bbi-reference-black-box-definition}
 % ==========================================
 
@@ -2417,7 +2422,7 @@ The only thing you have to do is to \texttt{load} the package, within the script
 \label{cpp}
 % ==========================================
 
-A very usefull feature is that you may use any black box within a \CPP program witout worrying about \texttt{wxWigets} main window.\\
+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 :
 
@@ -2507,15 +2512,21 @@ int main(int argv, char* argc[])
 
 \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 (?!?), 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{.bbtk} the file named \texttt{bbStudio.aui}. \\ 
 
 
- \texttt{WARNING :} if the script contains one or more \texttt{LayoutSplit}
+\item{ \texttt{WARNING}} : if the script contains one or more \texttt{LayoutSplit}
  object, you will have to resize the subwindows. \\ 
-
+\end {itemize}
 
 %\section{Conclusion}