1 % ==========================================
2 \documentclass[11pt,final,a4paper]{article}
5 \title{The Black Box Toolkit\\Package Developers' Guide}
7 \author{Laurent Guigues}
9 % ==========================================
11 % ==========================================
14 % ==========================================
16 % ==========================================
18 % ==========================================
19 % ==========================================
21 %\section{Creating your own black boxes}
23 % ==========================================
25 % ==========================================
26 \section{Steps in the creation of new black boxes}
27 % ==========================================
28 Any black box must be included in a \bbtk package,
29 that is in a particular shared library which can be loaded
30 dynamically by \bbtk (hence applications which use \bbtk,
31 such as the interpreter \bbi).
34 \item \textbf{Create a new package. }
35 Before defining any black box you
36 have to create a package, or more precisely
37 the files which will allow you to generate the package
38 (compile and link the shared library) and may be install it.
39 \texttt{bbStudio} does it for you.
44 \item The black boxes you want to create are based on
45 a processing code (\CPP classes or \C functions) which
46 is in an existing project handled by \cmake
47 and you want the new package to be part of your existing project.
48 You will have to create your new package into the source tree of your
50 \item You do not have an already existing project (you want
51 to create the new boxes from scratch) or you want/are imposed
52 that the existing project remain external to the package project.
53 You will have to create your new package in a new location and
54 may be include/link against existing libraries.
57 \item \textbf{Describe your new box. }
58 You can do it either :
60 \item In \CPP code. You will have to write the class for
61 your box, mostly using \bbtk macros.
63 When configuring your project with \cmake,
64 the utility \bbfy will then generate the corresponding \CPP code.
69 % ==========================================
70 \section{Creating a new black box package}
71 % ==========================================
73 Run \texttt{bbStudio}.
75 Use the option \texttt{Create Package} of the menu \texttt{Tools}.
79 \caption{\label{bb-Studio} bbStudio}
81 \includegraphics[width=0.6\textwidth]{bbStudio.png}
85 You will be asked to choose the directory where you want to create the package,
86 then you'll get something like in fig. \ref{bbCreatePackage}.
90 \caption{\label{bbCreatePackage} Create Package}
92 \includegraphics[width=0.6\textwidth]{bbCreatePackage.png}
97 That will creates the directory structure and the \texttt{cmake}
98 files necessary to build the project.
100 You must then decide the name of your new package.
101 It will be the name used to load the package in \texttt{bbi}.
102 Fill up the form like in fig. \ref{bbFillUpPackageForm}.
106 \caption{\label{bbFillUpPackageForm} Fill up the form}
108 \includegraphics[width=0.6\textwidth]{bbFillUpPackageForm.png}
112 Edit the file 'MyPackage/CMakeLists.txt' to customize your package
115 the file tree obtained is :
118 >tree myPackageFolder
123 |-- PackageConfig.cmake.in
125 |-- UsePackage.cmake.in
137 | | |-- CMakeLists.txt
138 | | `-- header.html.in
141 | |-- DoxyMainPage.txt.in
142 | `-- Doxyfile.txt.in
146 9 directories, 16 files
149 The directory \texttt{MyPackage} is the directory of your new package,
150 in which you will create the files describing your black boxes.
151 But first, you have to customize your new package, by editing the file
152 \texttt{CMakeLists.txt} in the \texttt{MyPackage} directory.
155 \begin{file}{MyPackage/CMakeLists.txt}
158 #===========================================================================
159 # CMAKE SETTINGS FOR BUILDING A BBTK PACKAGE
160 #===========================================================================
162 #===========================================================================
163 # THE NAME OF THE BBTK PACKAGE
164 SET(BBTK_PACKAGE_NAME MyPackage)
165 #===========================================================================
167 #===========================================================================
168 # IF IT IS A STANDALONE PROJECT UNCOMMENT NEXT LINE TO DECLARE YOUR PROJECT
169 # PROJECT(bb${BBTK_PACKAGE_NAME})
170 #===========================================================================
172 #===========================================================================
174 # !!! NO COMMA ALLOWED !!!
175 SET(${BBTK_PACKAGE_NAME}_AUTHOR "myself")
176 #===========================================================================
178 #===========================================================================
179 # PACKAGE DESCRIPTION
180 SET(${BBTK_PACKAGE_NAME}_DESCRIPTION "The kinkiest stuff you ve ever seen.")
181 #===========================================================================
183 #===========================================================================
184 # PACKAGE VERSION NUMBER
185 SET(${BBTK_PACKAGE_NAME}_MAJOR_VERSION 1)
186 SET(${BBTK_PACKAGE_NAME}_MINOR_VERSION 0)
187 SET(${BBTK_PACKAGE_NAME}_BUILD_VERSION 0)
188 #===========================================================================
190 #===========================================================================
191 # UNCOMMENT EACH LIBRARY NEEDED (WILL BE FOUND AND USED AUTOMATICALLY)
192 # SET(${BBTK_PACKAGE_NAME}_USE_VTK ON)
193 # SET(${BBTK_PACKAGE_NAME}_USE_ITK ON)
194 # SET(${BBTK_PACKAGE_NAME}_USE_GDCM ON)
195 # SET(${BBTK_PACKAGE_NAME}_USE_GSMIS ON)
196 # SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON)
197 #===========================================================================
199 #===========================================================================
200 # LIST HERE THE OTHER bbtk PACKAGES NEEDED
201 # (WILL BE FOUND AND USED AUTOMATICALLY)
202 SET(${BBTK_PACKAGE_NAME}_USE_PACKAGES
209 #===========================================================================
211 #===========================================================================
212 # THE SOURCES OF THE PACKAGE
213 # EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE src DIRECTORY :
214 SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_CXX ON)
215 # ... OR LIST THE FILES TO COMPILE MANUALLY :
216 #SET(${BBTK_PACKAGE_NAME}_SOURCES
217 # LIST HERE THE FILES TO COMPILE TO BUILD THE LIB
218 # E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION)
219 # THE PATH MUST BE RELATIVE TO THE src FOLDER
221 #===========================================================================
223 #===========================================================================
224 # THE xml SOURCES OF THE PACKAGE
225 # EITHER UNCOMMENT NEXT LINE TO bbfy ALL .xml OF THE src DIRECTORY :
226 SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_XML ON)
227 # ... OR LIST THE FILES TO COMPILE MANUALLY :
228 #SET(${BBTK_PACKAGE_NAME}_XML_SOURCES
229 # LIST HERE THE FILES TO bbfy TO BUILD THE LIB
230 # E.G. TO bbfy "toto.xml" ADD "toto" (NO EXTENSION)
231 # THE PATH MUST BE RELATIVE TO THE src FOLDER
233 #===========================================================================
235 #===========================================================================
236 # THE SCRIPT-DEFINED BOXES OF THE PACKAGE (bbs)
237 # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/boxes DIRECTORY :
238 SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_BOXES ON)
239 # ... OR LIST THE FILES TO INCLUDE MANUALLY :
240 # SET(${BBTK_PACKAGE_NAME}_BBS_BOXES
241 # LIST HERE THE bbs FILES TO INCLUDE
242 # E.G. TO INCLUDE "boxes/bbtoto.bbs" ADD "boxes/bbtoto" (NO EXTENSION)
243 # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !!
245 #===========================================================================
247 #===========================================================================
248 # THE SCRIPT-DEFINED APPLICATIONS OF THE PACKAGE (bbs)
249 # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/appli DIRECTORY :
250 SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI ON)
251 # ... OR LIST THE FILES TO INCLUDE MANUALLY :
252 # SET(${BBTK_PACKAGE_NAME}_BBS_APPLI
253 # LIST HERE THE bbs FILES TO INCLUDE
254 # E.G. TO INCLUDE "appli/testToto.bbs" ADD "appli/testToto" (NO EXTENSION)
255 # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !!
257 #===========================================================================
259 #===========================================================================
260 SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS
261 # LIST HERE YOUR ADDITIONAL INCLUDE DIRECTORIES
265 # - automatically handled libraries or packages : wx, vtk... (see above)
266 # - the dirs automatically set by other libraries found by FIND_PACKAGE
268 #===========================================================================
270 #===========================================================================
271 SET(${BBTK_PACKAGE_NAME}_LIBS
272 # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST
273 # EXCEPT : the same libs than for INCLUDE_DIRS
275 #===========================================================================
277 #===========================================================================
278 # IF NEEDED : UNCOMMENT NEXT LINE
279 # AND LIST ADDITIONNAL DIRECTORIES
280 # IN WHICH TO LOOK FOR LIBRARIES TO LINK AGAINST
282 #===========================================================================
284 #===========================================================================
285 # SET TO TRUE TO HAVE INFORMATION ON LIBRARIES FOUND DURING CMAKE CONFIGURE
286 SET(FIND_PACKAGE_VERBOSE TRUE)
287 #===========================================================================
289 #===========================================================================
290 # END OF USER SECTION
291 #===========================================================================
293 #===========================================================================
294 # Include configuration script
295 INCLUDE(Configure.cmake)
296 #===========================================================================
298 #===========================================================================
300 #===========================================================================
305 The comments in the file should be easily understandable !
306 You have to customize the lines which are enclosed
307 between dashed comment lines.
308 In these sections, you can see some of the informations you supplied in previous step:
310 \item The \textbf{name} of your package. This will be the name used to load it in \bbi. The shared library however will be called \texttt{bb}name hence on
311 \lin the object file will be called \texttt{libbb}name\texttt{.so}
312 and on \win it will be called \texttt{bb}name\texttt{.dll}.
313 \item The \textbf{author(s)} of the package. Preferably provide e-mail adresses.
314 \item A \textbf{description} of the package, which will appear in the help of your package or in its html documentation automatically generated by \bbdoc.
317 In these sections, you can set :
320 \item The \textbf{libraries used} by the package : \vtk, \itk, \gdcm, \gsmis, \wx. The mecanisms to find these libraries, their sources and to link against them are automatically handled by the \cmake files installed by \bbCreatePackage. You just have to uncomment a line to use one of these libraries.
322 \item A \textbf{description} of the package, which will appear in the help of your package or in its html documentation automatically generated by \bbdoc.
323 \item The \textbf{version} of the package.
324 \item The \textbf{\xml sources} of the package : you can list each input \xml file explicitly or tell \cmake to include in the project \emph{all} the \xml files of the directory.
325 \item The \textbf{\CPP sources} of the package : you can list each input \CPP file explicitly or tell \cmake to include in the project all the \CPP files of the directory.
326 \item \textbf{Additional include directories}. Set it if your package needs to include source files which are not in the package directory, typically if it depends on another library which is not one the libraries automatically handled (\vtk, \itk...).
327 \item \textbf{Additional libraries} to link against. Set it if your package needs to link against another library which is not one the libraries automatically handled (\vtk, \itk...).
330 Of course, this is only a framework and you can add any other \cmake commands
333 % ==========================================
334 \section{Creating a new box}
335 % ==========================================
337 % ==========================================
338 \subsection{Principles}
339 % ==========================================
341 \subsubsection{\texttt{C++} or \texttt{XML} ?}
342 There are two ways to create a new black box in an existing package :
344 \item Write an \xml description file which will be automatically
345 translated in \CPP by the \bbfy application (recommanded).
346 \item Write the \CPP code of the box using \bbtk macros.
349 \subsubsection{From which \bbtk class inherit ?}
351 Apart from this choice of the description langage to use,
352 there is an important choice to do concerning the implementation of the box.
353 In \CPP, a black box is nothing but a class which has the standard
354 interface of all black boxes : what's its name ? inputs ? outputs ? and so on.
355 The abstract description of this interface is done in the class
356 \texttt{bbtk::BlackBox} and is implemented in its child classes :
357 \texttt{bbtk::UserBlackBox} and \texttt{bbtk::WxBlackBox}
358 \footnote{all the classes of the \bbtk library are in a \emph{namespace}
360 and the \CPP header of a class called \texttt{NameOfAClass} is
361 in the file called \texttt{bbtkNameOfAClass.h}}.
362 To create a new black box, you have to inherit one of these two
363 concrete classes in order to inherit the black box interface and a
364 particular implementation of this interface.
365 If your black box is a \emph{Widget} black box,
366 that is a black box which has (or is)
367 a piece of a graphical interface based on the \wx library,
368 then it must inherit the class \texttt{bbtk::WxBlackBox}.
369 Concretely, a \texttt{bbtk::WxBlackBox} is associated
370 a \texttt{wxWindow} and must be able to return a pointer to it.
371 If your black box is not a widget black box, it must inherit
372 \texttt{bbtk::UserBlackBox}.
374 \subsubsection{Inherit or encapsulate ?}
376 Now, your black box will do something (hopefully !).
377 When you decide to write a new black box,
378 you should be in one of these three cases :
380 \item You already have a \texttt{C}-like function which
381 does the processing that you wish to 'blackboxify'
382 \item You already have a \CPP class which
383 does the processing that you wish to 'blackboxify'
384 \item You start from scratch without any existing code
387 The idea of \BBTK is to embed processing codes into
388 \CPP objects which have a standard and generic interface -
389 namely black boxes - to be able to chain arbitrary
390 processes afterwards.
392 In \CPP, in order to embed an existing processing \emph{class}
393 into a standard interface you only have two possibilities :
395 \item {\bf Inherit} the existing processing class
396 \emph{and} the interface class (e.g. \texttt{bbtk::UserBlackBox}).
397 In this case you have to :
399 \item make the link between the inputs and outputs of the black box
400 and the interface of the inherited class
401 \item call the processing
402 method of the inherited class in the processing method of the black box.
404 \item {\bf Encapsulate} the existing processing class
405 in a class inherited from
406 the interface class (e.g. \texttt{bbtk::UserBlackBox}).
407 In this case you have to :
409 \item declare it as a member of the black box,
410 \item instantiate it at the right time
411 (either in the constructor or in the processing method of the black box)
412 \item in the processing method of the black box :
414 \item set the inputs of the member procesing class with the inputs of the black box,
415 \item call the processing method of the encapsulated class
416 \item set the ouputs of the black box with the outputs of the encapsulated
422 If you wish to 'blackboxify' a C-like \emph{function},
423 you do not have the choice, you can only use the second mechanism,
424 namely encapsulation.
426 Obviously, the inheritance mechanism is more powerfull
427 and - when it is possible to use it - it demands less effort
428 because, as we will see, in \bbtk you can directly
429 link the accessors to the input and output data of the box
430 to the accessors of the inherited processing class,
431 as well as the procesing method of the black box
432 to the processing method of the inherited processing class,
433 very much like a callback mechanism.
435 \subsubsection{How to generate a Black Box skeleton}
437 Run \texttt{bbStudio}, choose \texttt{Tools} in the menu bar, option
438 \texttt{Create Black Box}.
439 You will be shown something like in fig. \ref{bbCreateBlackbox} :
442 \caption{\label{bbCreateBlackbox}Create Black Box}
444 \includegraphics[width=0.6\textwidth]{bbCreateBackbox.png}
449 \subsubsection{Informations to provide}
451 Finally, to create a new black box, you will have to give :
453 \item The {\bf name} of the box
454 \item The {\bf package} to which the box belongs (can we do it automatically ? LG : think about it)
455 \item The {\bf author}(s) of the box
456 \item A {\bf description} of the box
458 \item Its {\bf type}, either
460 \item a standard one (\texttt{std-template})
461 \item a VTK Polydata Algorithm based box (\texttt{VTK\_PolydataAlgorithm-template}),
462 \item a VTK Image Algorithm based box (\texttt{VTK\_ImageaAlgorithm-template}),
463 \item if it uses the wxWidget Library (\texttt{widget-template})
466 \item The output format of the file, either a C++ file or an XML file.
468 %\item $[$Optional$]$ The additional {\bf include files} which are necessary for the code to compile (classes or functions declarations ...)
469 %\item $[$Optional$]$ The other {\bf parent(s)} of the box (which must be known hence their header included)
470 %\item $[$Optional$]$ The {\bf namespace} to which the box belongs
471 %\item The box {\bf inputs} and {\bf outputs}, and for each one :
473 %\item Its {\bf name} : the string which will identify the input or output
474 %\item Its {\bf type} : any \CPP type, either a basic type or a user defined type (class ...) but which must be known, hence the necessary files must be included.
475 %\item Its {\bf help} : a string describing the input / output
477 %\item Its {\bf processing} code, which can be a simple callback or an arbitrary complex code
481 Under Linux, for reasons we shall not discuss here, you'll get an error message :
483 \texttt{No such file or directory}
485 Have a look at the console, you'll see a shell command (whose syntax is OK although there is is a lot of
486 quotes),something like :
488 \texttt{ "/usr/local/bin/bbCreateBlackBox" "/home/jpr/Desktop/essai" MyPackage
489 myVtkPolydataBlackBox VTK-PolyDataAlgorithm C++ 'author1, author2' 'myVtkPolydataBlackBox description'}
491 Just copy the command, and run it manually.
493 \subsubsection{Input and output accessors}
495 When you encapsulate a processing class or a C function
496 or when you write down a black box from scratch,
497 you must access the inputs and outputs of the black box,
498 in order to interface it manually with your processing method
499 or simply write your processing code
500 (there are other cases in which you also need to access the
501 inputs and outputs, we will talk about them later).
503 The only thing you must know about the \CPP code generated
504 from your \xml or your \CPP macro-based description
505 is that when you declare an input
506 or an output of a black box then
507 two \emph{accessors} for this input or output are generated :
508 one to \emph{get} the value of the input or output and
509 one to \emph{set} it.
510 These accessors have normalized names :
513 \item The declaration of an {\bf input} called \texttt{NAME} and
514 of type \texttt{TYPE} generates the two accessors
515 \footnote{For the sake of simplicity, the parameters and return value are
516 shown here as if they were all passed by value.
517 However the actual code can use references.
518 The same way, the issue of const or non const methods is eluded here.
519 Different cases occur in practice.}:
521 \item \texttt{void bbSetInput<NAME>(<TYPE>);}
522 \item \texttt{<TYPE> bbGetInput<NAME>();}
524 \item The declaration of an {\bf output} called \texttt{NAME} and
525 of type \texttt{TYPE} generates the two accessors:
527 \item \texttt{void bbSetOutput<NAME>(<TYPE>);}
528 \item \texttt{<TYPE> bbGetOutput<NAME>();}
532 For example, declaring an input called \texttt{Image}
533 would generate the two accessors \texttt{bbSetInputImage} and
534 \texttt{bbGetInputImage}.
538 \item All \bbtk methods are prefixed by \texttt{bb}
539 to avoid conflicts with potential inherited methods.
540 \item An input and an output can have the same name (e.g. 'Image').
541 No conflict between accessors occur (e.g.
542 four distinct accessors are created :
543 \texttt{bbSetInputImage},
544 \texttt{bbGetInputImage},
545 \texttt{bbSetOutputImage} and
546 \texttt{bbGetOutputImage}).
549 % ==========================================
550 \subsection{\texttt{XML} description of a box}
551 % ==========================================
553 % ==========================================
554 \subsubsection{General \texttt{xml} tags}
555 % ==========================================
557 Let us examine the \texttt{xml} file
558 describing the \texttt{Add} box of the \texttt{std} package :
560 \begin{file}{\texttt{packages/std/src/bbAdd.xml}}
563 <?xml version="1.0" encoding="iso-8859-1"?>
565 <blackbox name="Add">
567 <author>laurent.guigues@creatis.insa-lyon.fr </author>
568 <description>Adds its inputs </description>
569 <category>math </category>
571 <input name="In1" type="double" description="First number to add"/>
572 <input name="In2" type="double" description="Second number to add"/>
573 <output name="Out" type="double" description="Result"/>
576 bbSetOutputOut( bbGetInputIn1() + bbGetInputIn2() );
589 The tags and their role are easily understandable.
591 As the box is not a widget, we inherit from
592 \texttt{bbtk::UserBlackBox} (\texttt{parentblackbox} tag).
595 The only part of the file which needs a bit of explaination is
596 the body of the \texttt{process} tag, which describes the
597 actual code to execute in the box.
598 This code must be enclosed in a \texttt{<PRE></PRE>} tag
599 to tell the \xml parser not to interpret it as \xml instructions.
600 This is necessary to be able to use any symbol,
601 like the \texttt{<} and \texttt{>} which have a
602 special meaning in \xml.
603 In the case of the \texttt{Add} box, the process code
604 is very simple : remember that
605 \texttt{bbGetInputIn1} is the
606 accessor to the input \texttt{In1} declared above and
607 \texttt{bbGetInputIn2} is the
608 accessor to the input \texttt{In2};
609 the code simply adds the values of the two inputs
610 and sets the output \texttt{Out} with the resulting value.
612 To describe your own black boxes in \xml code,
613 you must modify the xml file generated in previous step :
616 \item Complete the description and author tags if you feel like.
617 \item add the '\#include' directives to be put in the generated .h file
618 \item Create your inputs and outputs
619 \item Fill in the process tag
620 \item Fill in the constructor tag
621 \item Fill in the copyconstructor tag
622 \item Fill in the destructor tag
627 % ==========================================
628 \subsubsection{Specific \texttt{xml} tags for \texttt{itk::ImageToImageFilter} classes bbfication}
629 % ==========================================
631 % ==========================================
632 \subsubsection{Specific \texttt{xml} tags for \texttt{vtkImageAlgorithm} classes bbfication}
633 % ==========================================
635 % ==========================================
636 \subsubsection{Specific \texttt{xml} tags for \texttt{vtkPolyDataAlgorithm} classes bbfication}
637 % ==========================================
639 % ==========================================
640 \subsubsection{\bbfy \texttt{xml} tags reference}
641 % ==========================================
644 % ==========================================
646 \caption{\label{xml_tags}
647 \bbfy \texttt{xml} tags reference}
649 \begin{tabular}{|lcllm{6cm}|}
651 Tag & Attributes & Condition & Multiplicity & Description
654 \texttt{<blackbox>} & \texttt{name} & - & 1 & The name of the box \\ \hline
655 & \texttt{type} & - & 1 & The type of the box. In:
656 \{\texttt{standard} (default),
657 \texttt{ITK\_ImageToImageFilter},
658 \texttt{VTK\_ImageAlgorithm},
659 \texttt{VTK\_PolyDataAlgorithm}\} \\\hline
660 & \texttt{generic} & a) & 0-1 &
661 Generate the generic filter (see text)\\ \hline
663 \texttt{<description>} & - & - & 0-n & The description of the box. Multiple occurrence are concatenated \\\hline
664 \texttt{<author>} & - & - & 0-n & The author of the box. Multiple occurrence are concatenated \\\hline
665 \texttt{<category>} & - & - & 0-1 & The box category (if more than one, they are separated with commas) see Tab \ref{categories}\\\hline
666 \texttt{<parentblackbox>} & - & - & 1 & The parent black box of the box.
667 In: \{\texttt{bbtk::BlackBox, bbtk::WxBlackBox, bbtk::WxContainerBlackBox}\}\\\hline
668 \texttt{<package>} & - & - & 1 & The package of the box \\\hline
669 \texttt{<namespace>} & - & - & 0-1 & The namespace of the box.
670 Use \texttt{bbPACKAGE}, where \texttt{PACKAGE} is the name of the package\\\hline
671 \texttt{<include>} & - & - & 0-n & Additionnal file to include
672 (generates : \texttt{\#include 'value'})\\\hline
674 \texttt{<template>} & - & - & 0-n & Template parameter of the box. The template parameter list is generated in the order of appearance of the tag. \\\hline
676 \texttt{<itkparent>} & - & a) & 1 & The parent itk class (with namespace) \\\hline
678 \texttt{<vtkparent>} & - & b) & 1 & The parent vtk class \\\hline
680 \texttt{<input>} & \texttt{name} & - & 1 & The name of the input \\\hline
681 & \texttt{type} & - & 1 & The type of the input \\\hline
682 & \texttt{special} & - & 0-1 & In: \{\texttt{``itk input'',
683 ``vtk input'', ``itk parameter'', ``vtk parameter''}\} (see below).\\\hline
684 & \texttt{generic\_type} & c) & 0-1 & The ``generic'' type of the input (see text). \\\hline
685 \texttt{<output>} & \texttt{name} & - & 1 & The name of the output \\\hline
686 & \texttt{type} & - & 1 & The type of the output \\\hline
687 & \texttt{special} & - & 0-1 & In: \{\texttt{``itk output'',
688 ``vtk output''}\} (see below).\\\hline
689 & \texttt{generic\_type} & c) & 0-1 & The ``generic'' type of the output (see text).\\\hline
691 \texttt{<process>} & - & - & 0-1 & The code of the processing method of the box. Must be put between clear tags : \texttt{<PRE></PRE>} \\\hline
692 \texttt{<constructor>} & - & - & 0-1 & The code of the user Constructor of the box (may contains default initialisations). Must be put between clear tags : \texttt{<PRE></PRE>} \\\hline
693 \texttt{<copyconstructor>} & - & - & 0-1 & The code of the user Copy Constructor of the box . Must be put between clear tags : \texttt{<PRE></PRE>} \\\hline
694 \texttt{<destructor>} & - & - & 0-1 & The code of the user Destructor of the box. Must be put between clear tags : \texttt{<PRE></PRE>} \\\hline
697 % ==========================================
699 \caption{\label{xml_tags}
700 \bbfy \texttt{xml} tags conditions}
702 \begin{tabular}{|ll|}
704 a) & \texttt{<blackbox type == ''itkImageToImageFilter''>} \\ \hline
705 b) & \texttt{<blackbox type == ''vtkImageAlgorithm'' or ''vtkPolyDataAlgorithm''>} \\ \hline
706 c) & \texttt{<blackbox type == ''itkImageToImageFilter''>} and
707 \texttt{<blackbox generic>} is present. \\ \hline
713 % ==========================================
715 \caption{\label{categories}
716 \bbfy \texttt{Black Box} categories}
718 \begin{tabular}{|ll|}
720 \texttt{Categ name} & : Meaning \\ \hline \\ \hline
721 \texttt{adaptor} & : Adaptor box \\ \hline
722 \texttt{application} & : Final application, end user intended \\ \hline
723 \texttt{atomic box} & : System category.
724 Automatically assigned to Atomic Black Boxes (c++ defined) \\ \hline
725 \texttt{complex box} & : System category.
726 Automatically assigned to Complex Black Boxes (script defined) \\ \hline
727 \texttt{command line} & : Script which defines a command line application (no embedded GUI, but command line imput parameters) \\ \hline
728 \texttt{demo} & : Demonstration \\ \hline
729 \texttt{devel} & : Developer tool (bbCreatePackage.bbs, ...) \\ \hline
730 \texttt{dicom} & : DICOM aware box \\ \hline
731 \texttt{example} & : Example script showing a box use-case \\ \hline
732 \texttt{filter} & : Image processing box \\ \hline
733 \texttt{image} & : Image processing related box \\ \hline
734 \texttt{interaction} & : \\ \hline
735 \texttt{math} & : Mathematical operations\\ \hline
736 \texttt{mesh} & : Mesh processing related box \\ \hline
737 \texttt{misc} & : A box that cannot be put in other category ! \\ \hline
738 \texttt{read/write} & : Box that read or write data from or to disk \\ \hline
739 \texttt{viewer} & : Box which displays some data \\ \hline
740 \texttt{widget} & : Piece of graphical interface \\ \hline
742 \texttt{3D object creator} & : Sophisticated 3D widget \\ \hline
743 \texttt{toolsbbtk} & : Component of bbStudio \\ \hline
748 % ==========================================
750 \caption{\label{kinds}
751 \bbfy \texttt{Black Box} kinds}
753 \begin{tabular}{|ll|}
755 \texttt{Kind} & Use as : \\ \hline \\ \hline
756 \texttt{ADAPTOR} & \\ \hline
757 \texttt{DEFAULT\_ADAPTOR} & \\ \hline
758 \texttt{ADAPTOR} & \\ \hline
759 \texttt{WIDGET\_ADAPTOR} & \\ \hline
760 \texttt{DEFAULT\_WIDGET\_ADAPTOR} & \\ \hline
761 \texttt{GUI} & \\ \hline
762 \texttt{DEFAULT\_GUI} & \\ \hline
763 \texttt{ALL} & If kind='ALL' then sets the level for all kinds\\ \hline
767 % ==========================================
768 \subsection{\CPP description of a box}
769 % ==========================================
773 Look at the files \texttt{examples/TEMPLATE\_bbPackagenameBoxname.h/cxx}
774 and \texttt{examples/TEMPLATE\_bbPackagenameWXBoxname.h/cxx}
780 %\section{Conclusion}