-% ==========================================
-%\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{Updating_the_documentation}
-% ==========================================
-If you want (and sure you will) 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.
-
-If you want (and sure you will) 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{creaContours}\\
-Provides sophisticated widgets for managing 3D R.O.I. (Regions od interest)
-\item{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 \text{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}
-