1 % ==========================================
2 \documentclass[11pt,final,a4paper]{article}
14 {\Huge Reference Manual}
17 \bbtk version \bbtkVersion
21 Last modified on : September 20, 2008 \\
28 % ==========================================
30 % ==========================================
38 % ==========================================
40 % ==========================================
42 % ==========================================
47 ---> Should be moved in a 'Reference Manual' ?\\
48 ---> Any suggestion welcome!
50 --> The following is just the concatenation of various parts, removed from different 'manuals', and wainting for
51 their new affectation.
58 \caption{\label{kinds} \texttt{Black Box} kinds}
62 \texttt{Kind name} & : Meaning \\ \hline \\ \hline
63 \texttt{ADAPTOR} & : Adaptor Box \\ \hline
64 \texttt{DEFAULT\_ADAPTOR} & : \\ \hline
65 \texttt{WIDGET\_ADAPTOR} & : \\ \hline
66 \texttt{DEFAULT\_WIDGET\_ADAPTOR} & : \\ \hline
67 \texttt{GUI} & : \\ \hline
68 \texttt{DEFAULT\_GUI} & : \\ \hline
69 \texttt{ALL} & : If kind='ALL' then sets the level for all kinds \\ \hline
76 \bf\emph{Boxes} : Box retrieving on various criterions :
78 \item {\bf\emph{By name}} (Alphabetical list)
79 \item {\bf\emph{By package}} (see table : \ref{bbi-list_of_packages})
80 \item {\bf\emph{By category}} (see table : \ref{categories})
81 \item {\bf\emph{Adaptors}} Used internaly to perform type conversions (not end user intended)
86 % ==========================================
88 \caption{\label{bbi-list_of_packages} List of bbtk supplied packages.}
90 \begin{tabular}{|lp{10cm}|}
92 Package & What it's used for \\ \hline
93 \texttt{std} & : the 'standard' package including basic useful boxes \\ \hline
94 \texttt{wx} & : basic graphical interface elements (widgets : sliders, buttons, etc.) based on the \texttt{wxWidgets} library \\ \hline
95 \itk & : the basic image processing package, based on the \itk library. (without description)\\ \hline
96 \vtk & : prints help on the package \texttt{package-name} and its boxes (with brief description). The package must have been previously loaded\\ \hline
97 \texttt{wxvtk} & : widget boxes based on the \vtk library.\\ \hline
98 \texttt{itkvtk} & : adaptors to convert \itk structures into \vtk structures and conversally.\\ \hline
99 %\texttt{creaImageIO} & : provides high level widgets to read images including DICOM.\\ \hline
100 \texttt{toolsbbtk} & : Tools for bbtk administration and package development.\\ \hline
104 % ==========================================
108 % ==========================================
110 \caption{\label{categories} \texttt{Black Box} categories}
112 \begin{tabular}{|lp{10cm}|}
114 \texttt{Category name} & : Meaning \\ \hline \\ \hline
115 \texttt{adaptor} & : Adaptor box \\ \hline
116 \texttt{application} & : Final application, end user intended \\ \hline
117 \texttt{atomic box} & : System category.
118 Automatically assigned to Atomic Black Boxes (c++ defined) \\ \hline
119 \texttt{complex box} & : System category.
120 Automatically assigned to Complex Black Boxes (script defined) \\ \hline
121 \texttt{command line} & : Script which defines a command line application \\
122 & :(no embedded GUI, but command line imput parameters) \\ \hline
123 \texttt{demo} & : Demonstration \\ \hline
124 \texttt{devel} & : Developer tool (bbCreatePackage.bbs, ...) \\ \hline
125 \texttt{dicom} & : DICOM aware box \\ \hline
126 \texttt{example} & : Example script showing a box use-case \\ \hline
127 \texttt{filter} & : Image processing box \\ \hline
128 \texttt{image} & : Image processing related box \\ \hline
129 \texttt{interaction} & : \\ \hline
130 \texttt{math} & : Mathematical operations \\ \hline
131 \texttt{mesh} & : Mesh processing related box \\ \hline
132 \texttt{misc} & : Box that cannot be put in any other category ! \\ \hline
133 \texttt{read/write} & : Box that read or write data from or to disk \\ \hline
134 \texttt{viewer} & : Box which displays some data \\ \hline
135 \texttt{widget} & : Piece of graphical interface \\ \hline
136 \texttt{3D object creator} & : Sophisticated 3D widget \\ \hline
137 \texttt{toolsbbtk} & : Component of bbStudio \\ \hline
141 % ==========================================
145 % ==========================================
146 \subsubsection{complex black box definition related commands}
147 \label{bbi-reference-black-box-definition}
148 % ==========================================
150 See table \ref{bbi-reference-complex-box}
151 % ==========================================
153 \caption{\label{bbi-reference-complex-box} \bbi complex black box definition related commands.}
155 \begin{tabular}{|lcm{6cm}|}
157 Command & Parameters & Effect \\ \hline
160 \texttt{define} & \texttt{<box-type>} &
161 Starts the definition of a complex black box of type
162 \texttt{box-type}\\ \hline
164 \texttt{endefine} & - &
165 Ends the definition of a complex black box type\\ \hline
167 \texttt{author} & \texttt{<string>} &
168 Sets the author(s) of the complex black box currently being defined \\ \hline
170 \texttt{description} & \texttt{<string>} &
171 Sets the description of the complex black box currently being defined \\ \hline
173 \texttt{input} & \texttt{<name>} \texttt{<box.input>} \texttt{<help>} &
174 Defines a new input for the current complex black box,
176 It is defined as corresponding to
177 the input \texttt{input} of the box \texttt{box}.
179 \texttt{<help>} is the help string for the new input.
180 The box \texttt{box} must already have been created in the complex box
181 and of course have an input named \texttt{input}.\\ \hline
183 \texttt{output} & \texttt{<name>} \texttt{<box.output>} \texttt{<help>} &
184 Defines a new output for the current complex black box,
186 It is defined as corresponding to
187 the output \texttt{output} of the box \texttt{box}.
188 \texttt{<help>} is the help string for the new output.
189 The box \texttt{box} must already have been created in the complex box and of course have an output named \texttt{output}. \\ \hline
195 % ==========================================
196 \subsubsection{Interpreter related commands}
197 \label{bbi-reference-interpreter}
198 % ==========================================
199 See table \ref{tabbbi-reference-interpreter_1} and \ref{tabbbi-reference-interpreter_2}
200 % ==========================================
202 \caption{\label{tabbbi-reference-interpreter_1}\bbi intepreter related commands (part 1).}
204 \begin{tabular}{|lcm{6cm}|}
206 Command & Parameters & Effect \\ \hline
208 \texttt{author} & \texttt{<author-name>} &
209 Adds the string \texttt{<author-name>} to the author information of the black box being defined \\ \hline
211 \texttt{category} & \texttt{<category-name>} &
212 Adds the string \texttt{<category-name>} to the category information of the black box being defined \\ \hline
215 Prints help on available commands \\ \hline
217 & \texttt{<command-name>} &
218 Prints help on the command \texttt{command-name} \\ \hline
220 & \texttt{packages} &
221 Prints help on available packages and their box types
222 (without description)\\ \hline
224 & \texttt{<package-name>} &
225 Prints help on the package \texttt{package-name} and its boxes
226 (with brief description).
227 The package must have been previously loaded \\ \hline
229 & \texttt{<box-type>} &
230 Prints help (with full description) on the type of box
232 The box type must belong to a package which has been previously loaded \\ \hline
234 & \texttt{<debug-directive>} &
236 Prints debug info on living bbtk objects containing the string \texttt{expr} (default expr='').
237 \texttt{-C} checks the factory integrity.
238 \texttt{-D} turns on objects debug info after main ends\\ \hline
240 \texttt{include} & \texttt{<file-name>} &
241 Includes and executes the content of the file named \texttt{file-name}
242 exactly like if you were typing its content at the place were the
243 \texttt{include} command is. \\ \hline
245 \texttt{load} & \texttt{<package-name>} &
246 Loads the package \texttt{package-name} (use it only if you know that you won't work with complex black boxes) \\ \hline
248 \texttt{include} & \texttt{<package-name>} &
249 Loads the package \texttt{package-name} and includes all the complex black boxes that comes with it \\ \hline
251 \texttt{kind} & \texttt{<box kind>} &
252 Specifies the \texttt{kind} of the complex black boxes you are describing \\ \hline
259 % This arbitrary part1/part2 is to avoid to have all the tables at the end of the docoment ...
263 \caption{\label{tabbbi-reference-interpreter_2}\bbi intepreter related commands (part 2).}
265 \begin{tabular}{|lcm{6cm}|}
267 Command & Parameters & Effect \\ \hline
268 \texttt{unload} & \texttt{<package-name>}&
269 Unloads the package \texttt{package-name}.
270 The package must have been previously loaded.
271 No box of a type defined in this package must still exist.\\ \hline
273 \texttt{message} & \texttt{<category>} \texttt{<level>} &
274 Sets the level of verbosity of \bbi for the category of messages
275 \texttt{category} to \texttt{level}.\\ \hline
276 %See \ref{verbosity}.
278 \texttt{config} & - & Displays the Configuration parameters\\ \hline
280 \texttt{reset} & - & Deletes all boxes and unloads all packages so
281 that \bbi gets back to its initial state \\ \hline
283 \texttt{quit} & - & Exits the interpreter (Don't use it under \bbStudions)\\ \hline
292 ---> Should be moved in a 'Reference Manual' ?\\
293 ---> Any suggestion welcome!
296 % ==========================================
297 \subsubsection{Black box packages}
298 \label{bbi-more-on-packages}
299 % ==========================================
301 There are various others user-intended packages :
304 It contains some vtk based image processing filters :
307 \paragraph{AppendPolyData}
308 Appends one of more polygonal datasets into a single polygonal dataset
310 \paragraph{ConeSource}
313 \paragraph{ImageAnisotropicDiffusion3D}
314 vtk\-Image\-Anisotropic\-Diffusion\-3D dif\-fuses a volume iteratively. \\
315 The neighborhood of the diffusion is determined by the instance flags. \\
316 if 'Faces' is on, the 6 voxels adjoined by faces are included in the neighborhood. \\
317 If 'Edges' is on the 12 edge connected voxels are included, and if 'Corners' is on, the 8 corner connected voxels are included. \\
318 'DiffusionFactor' determines how far a pixel value moves toward its neighbors, and is insensitive to the number of neighbors chosen.\\
319 The diffusion is anisotropic because it only occurs when a gradient measure is below 'GradientThreshold'. \\
320 Two gradient measures exist and are toggled by the 'GradientMagnitudeThreshold' flag. \\
321 When 'GradientMagnitudeThreshold' is on, the magnitude of the gradient, computed by central differences, above 'DiffusionThreshold' a voxel is not
323 The alternative measure examines each neighbor independently.\\
324 The gradient between the voxel and the neighbor must be below the 'DiffusionThreshold' for diffusion to occur with THAT neighbor.\\
326 - In : an image (vtkImageData*)\\
327 - Diffusion : Difference threshold that stops the diffusion\\
329 - Out : the isosurface mesh (vtkPolyData*)
331 \paragraph{ImageCharacteristics}
332 Exports objet sizes, and Spacings
334 \paragraph{ImageDilateErode3D}
336 Dilates one value and erodes another.\\
337 vtkImageDilateErode3D will dilate one value and erode another. \\
338 It uses an elliptical foot print, and only erodes/dilates on the boundary of the two values. \\
339 The filter is restricted to the X, Y, and Z axes for now.\\
340 It can degenerate to a 2 or 1 dimensional filter by setting the kernel size to 1 for a specific axis. \\
341 (bbfication of vtkImageDilateErode3D) \\
343 - In : an image (vtkImageData*)\\
344 - DilateValue : The dilatation value\\
345 - ErodeValue : The erosion value\\
347 - Out : the isosurface mesh (vtkPolyData*)
349 \paragraph{ImageGaussianSmooth}
350 Performs a gaussian convolution of the input image\\
352 - In : an image (vtkImageData*)\\
353 - StdDevX : Standard deviation in X direction\\
354 - StdDevY : Standard deviation in Y direction\\
356 - Out : the isosurface mesh (vtkPolyData*)
358 \paragraph{ImagePlanes}
359 Creates three 3D planes with the input image mapped onto with which the user can interact; \\
360 The output vtkImagePlaneWidget objects are to be inserted into a 3D scene (e.g. a Viewer3D)
362 - In : an image (vtkImageData*)\\
364 - PlaneX : the image plane in X direction (vtkImagePlaneWidget*)\\
365 - PlaneY : the image plane in Y direction (vtkImagePlaneWidget*)\\
366 - PlaneY : the image plane in Z direction (vtkImagePlaneWidget*)\\
369 - Out : the isosurface mesh (vtkPolyData*)
371 \paragraph{IsoSurfaceExtractor}
372 Extracts an iso-surface of a 3D image and creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)
374 - In : an image (vtkImageData*)\\
375 - Isovalue : the isosurface value (double)\\
376 - Colour : Surface colour (vector of 3 doubles)
378 - Out : the isosurface (vtkProp3D**)
380 \paragraph{MIPCreator}
381 Creates a Maximum Intensity Projection (MIP) view of a 3D image.\\
383 - In : an image (vtkImageData*)\\
384 - Scale : the Gray scale scaling (float) \\
385 - Shift : the Gray scale shift (float) \\
387 - Out : The MIP object (vtkProp3D*) to be plugged into a 3D Viever
389 \paragraph{MarchingCubes}
390 Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes)\\
392 - In : an image (vtkImageData*)\\
393 - Value : the isosurface value (double)\\
395 - Out : the isosurface mesh (vtkPolyData*)
397 \paragraph{MetaImageReader}
398 Reads .mhd / .mhd image formats (bbfication of vtkMetaImageReader) \\
400 - In : the name of the file to be read (std::string)
402 - Out : The image (vtkImageData*)
404 \paragraph{SegmentationConnectivity}
405 Segmentation with min max threshold and connectivity \\
407 - In : an image (vtkImageData*)\\
408 - PositionXYZ : initial position (std::vector<int>) \\
409 - ThresholdMinMax : min, max threshold values (std::vector<int>) \\
411 - Out : The image (vtkImageData*)
413 \paragraph{SphereSource}
418 It contains some itk based image processing filters :
420 \paragraph{BinaryThresholdImageFilter}
421 Binarizes an image by thresholding (generic bbification of itk::BinaryThresholdImageFilter)
424 - In : Input image. Can be any itk::Image<T,D>* \\
425 - InsideValue : Output value for pixels inside thresholds (Double) \\
426 - LowerThreshold : Lower threshold(Double) \\
427 - OutsideValue : Output value for pixels outside thresholds (Double) \\
428 - UpperThreshold : Upper threshold (Double) \\
430 - Out' : Output image. Of the same type and dimension than the input image
432 \paragraph{DICOMSeriesFileNames}
433 Reads a series from a DICOM directory as a 3D itk image
435 \paragraph{ExtractImageFilter}
436 Decrease the image size by cropping the image to the selected region bounds (bbification of itk::ExtractImageFilter)
438 \paragraph{ImageProperties}
439 Outputs different properties of an image (type, dimension, size, spacing, ...)
441 \paragraph{ImageRegion}
442 Creates a generic ImageRegion (bbtk::any) from two vectors providing the index and size of the region.
443 The dimension D of the actual itk::ImageRegion created is the max of the sizes of Index and Size
444 (the smallest vector is padded by zeros)
446 \paragraph{ImageReader}
447 Generic itk image reader
449 \paragraph{ImageWriter}
450 Generic itk image writer
452 \paragraph{ImageSeriesReader}
453 Generic itk image series reader.
455 \paragraph{ResampleImageFilter}
459 It doesn't contain any end user intended box, only adaptors : to convert a generic itkImage to a vtkImageData, and vtkImageData* to a generic itkImage pointer
461 Sorry nothing is done, right now for meshes.
465 It contains two atomic black boxes.
469 - a \textless vtkImageData* \textgreater (In),\\
470 - an Orientation(0:yz / 1:xz / 2:xy),\\
471 - an initial slice number (Slice).\\
473 - a \textless vtkRenderer* \textgreater (Renderer)
477 - up to 5 Input Actors (\textless vtkProp3D* \textgreater),\\
478 - up to 5 Input Observers (\textless vtkInteractorObserver* \textgreater), \\
479 - a boolean 'Stereo' option, to use Red-Blue filter
481 - an Interactor (\textless wxVTKRenderWindowInteractor* \textgreater) with which vtk widgets can interact, \\
482 - a Renderer (\textless vtkRenderer* \textgreater) to which actors can be added.
484 It contains too some sophisticated complex black boxes :
486 \paragraph{IsoSurfaceWithControls}
487 Image iso-surface extractor (vtk::IsoSurfaceExtractor) with associated control panel (isovalue, opacity and colour)\\
489 - an initial isovalue (Isovalue)
490 - an initial opacity (Opacity)
491 - an initial colour (Colour)
493 \textless vtkProp3D* \textgreater (In)\\
495 \paragraph{MIPWithControls}
496 Maximum Intensity Projection (MIP) creator (vtk::MIPCreator) with associated control panel (shift and scale) \\
498 - an initial scale (Scale)
499 - an initial shift (Shift)
501 \textless vtkProp3D* \textgreater (In)\\
505 Some boxes are the bbfication of usefull xwWidgets, some other ones are more
508 \paragraph{ColourSelector} Colour Selector dialog (bbfication of wxColourSelector) \\
510 \texttt{Out} : Colour choosen in format '[0,1] [0,1] [0,1]'
513 \paragraph{ColourSelectorButton} A button which displays a colour picker dialog when clicked \\
515 \texttt{In} :Initial colour \\
516 \texttt{Out} : Colour choosen in format '[0,1] [0,1] [0,1]'
519 \paragraph{CommandButton} Button which executes bbi commands \\
521 \texttt{In} : Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote ("). \\
522 \texttt{Label} : Label of the button \\
523 \texttt{Widget} : Output widget \\
526 \paragraph{DirectorySelector} Pops up a directory selection dialog (wxDirDialog)\\
528 \texttt{DefaultDir} : The default directory\\
529 \texttt{Message} : Message to show on the dialog \\
530 \texttt{Title} : Title of the dialog \\
531 \texttt{Out} : The directory selected by the user\\
534 \paragraph{FileSelector} Pops up a file selection dialog for reading or saving (wxFileDialog)\\
536 \texttt{DefaultDir} : The default directory \\
537 \texttt{DefaultFile} : The default filename \\
538 \texttt{Message} : Message to show on the dialog \\
539 \texttt{OpenSave} : Open for an open dialog (default) / Save for a save dialog\\
540 \texttt{Title} : Title of the dialog \\
541 \texttt{Wildcard} : A wildcard, such as "*.*" or "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif" \\
542 \texttt{Out} : The file selected by the user \\
545 \paragraph{InputText} A zone in which the user can enter a text (wxTextCtrl)\\
547 \texttt{In} : Initial text (default '')\\
548 \texttt{Title} : Title of the input zone (default '')\\
549 \texttt{WinTitle} : Title of the window (*)\\
550 \texttt{Out} :Current text\\
553 \paragraph{LayoutLine} LayoutLine widget (wxBoxSizer)\\
555 \texttt{Orientation} Orientation (default V), 0=H=HORIZONTAL , 1=V=VERTICAL \\
556 \texttt{Widget}1 widget 1 \\
557 \texttt{Widget2} widget 2 \\
558 \texttt{Widget3} widget 3 \\
559 \texttt{Widget4} widget 4 \\
560 \texttt{Widget5} widget 5 \\
561 \texttt{Widget6} widget 6 \\
562 \texttt{Widget7} widget 7 \\
563 \texttt{Widget8} widget 8 \\
564 \texttt{Widget9} widget 9\\
567 \paragraph{LayoutSplit} Widget which splits a window in two fixed size parts (wxSplitterWindow)\\
569 \texttt{Orientation} : Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL\\
570 \texttt{Proportion} : Proportion (in percent) of the first children in the window\\
571 \texttt{Widget1} : Upper or left widget\\
572 \texttt{Widget2} : Lower or right widget\\
575 \paragraph{LayoutTDown} Creates a 'T like' complex container : Down {UpLeft, UpRight} \\
577 \texttt{Widget1} : UpLeft container\\
578 \texttt{Widget2} : UpRight container\\
579 \texttt{Widget3} : Down container\\
590 \paragraph{LayoutTLeft} Creates a 'T like' complex container : Left {RigthUp, RightDown}\\
592 \texttt{input} Widget1 : "UpLeft container" \\
593 \texttt{input} Widget2 : "UpRight container" \\
594 \texttt{input} Wigdet3 : "Down container" \\
605 \paragraph{LayoutTRight} Creates a 'T like' complex container : Right {LeftUp, LeftDown}\\
607 \texttt{input} Widget1 currentBox.Widget1 "Up container" \\
608 \texttt{input} Widget2 down.Widget1 "DownLeft container" \\
609 \texttt{input} Widget3 down.Widget2 "DownRight container"\\
620 \paragraph{LayoutTUp} Creates a 'T like' complex container : Up {DownLeft, DownRight} as w1{w2,w3}\\
622 \texttt{ input} Widget1 currentBox.Widget1 "Up" \\
623 \texttt{input} Widget2 down.Widget1 "DownLeft" \\
624 \texttt{input} Widget3 down.Widget2 "DownRight"\\
636 \paragraph{LayoutTab} LayoutTab widget (wxNotebook)\\
638 \texttt{Orientation} Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT \\
639 \texttt{Widget1} widget 1 \\
640 \texttt{Widget2} widget 2 \\
641 \texttt{Widget3} widget 3 \\
642 \texttt{Widget4} widget 4 \\
643 \texttt{Widget5} widget 5 \\
644 \texttt{Widget6} widget 6 \\
645 \texttt{Widget7} widget 7 \\
646 \texttt{Widget8} widget 8 \\
647 \texttt{Widget9} widget 9 \\
650 \paragraph{OutputText} Text zone to be inserted into a window (wxStaticText)\\
653 \texttt{Title} Title prepended to the text\\
656 \paragraph{RadioButton} RadioButton group widget 0-9 entries\\
658 \texttt{In} Set initial item \\
659 \texttt{In0} option 0\\
660 \texttt{In1} option 1\\
661 \texttt{In2} option 2\\
662 \texttt{In3} option 3\\
663 \texttt{In4} option 4\\
664 \texttt{In5} option 5 \\
665 \texttt{In6} option 6 \\
666 \texttt{In7} option 7 \\
667 \texttt{In8} option 8 \\
668 \texttt{In9} option 9 \\
669 \texttt{Title} Title of the widget (default '')\\
670 \texttt{Out} Number of the selected Item
673 \paragraph{Slider} Slider widget (wxSlider)\\
675 \texttt{ChangeResolution} Enables the user to change the slider resolution (default FALSE) \\
676 \texttt{In} Initial slider position(default 0) \\
677 \texttt{Label} Show slider labels ? (default FALSE) \\
678 \texttt{Max} Maximum value of the slider (default 500)\\
679 \texttt{Min} Minimum value of the slider (default 0)\\
680 \texttt{Orientation} Orientation : (default H) 0=H=HORIZONTAL, 1=V=VERTICAL\\
681 \texttt{ReactiveOnTrack} Slider sends info when track moves (default 0 = no)\\
682 \texttt{Title} Title shown above the slider (default '')\\
691 %\section{Conclusion}