]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Mon, 28 Jan 2008 08:25:35 +0000 (08:25 +0000)
committerguigues <guigues>
Mon, 28 Jan 2008 08:25:35 +0000 (08:25 +0000)
39 files changed:
kernel/CMakeLists.txt
kernel/cmake/BBTKBuildAllOption.cmake [new file with mode: 0644]
kernel/cmake/BBTKBuildDoxygenDoc.cmake [new file with mode: 0644]
kernel/cmake/BBTKBuildHtmlDocFromLatex.cmake [new file with mode: 0644]
kernel/cmake/BBTKBuildLatexDoc.cmake [new file with mode: 0644]
kernel/cmake/BBTKConfigurePackage.cmake
kernel/cmake/BBTKConfigurePackage_doc.cmake
kernel/cmake/BBTKConfigurePackage_src.cmake
kernel/cmake/BBTKFindLibraries.cmake
kernel/cmake/BBTKMacros.cmake [moved from kernel/cmake/ADD_DEF.cmake with 56% similarity]
kernel/cmake/BBTKPaths.cmake [new file with mode: 0644]
kernel/doc/CMakeLists.txt [new file with mode: 0755]
kernel/doc/bbtkDevelopersGuide/CMakeLists.txt [new file with mode: 0755]
kernel/doc/bbtkDevelopersGuide/bbtkDevelopersGuide.tex [new file with mode: 0644]
kernel/doc/bbtkDevelopersGuide/naming_conventions.txt [new file with mode: 0644]
kernel/doc/bbtkDoxygen/CMakeLists.txt [new file with mode: 0755]
kernel/doc/bbtkDoxygen/CodingStyle.html [new file with mode: 0644]
kernel/doc/bbtkDoxygen/DoxyMainPage.txt [new file with mode: 0755]
kernel/doc/bbtkDoxygen/Doxyfile.txt [new file with mode: 0755]
kernel/doc/bbtkPackageDevelopersGuide/CMakeLists.txt [new file with mode: 0755]
kernel/doc/bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.tex [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/1plus2plus3.fig [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/1plus2plus3.png [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/Add3.fig [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/Add3.png [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/CMakeLists.txt [new file with mode: 0755]
kernel/doc/bbtkUsersGuide/bb-architecture.fig [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/bb-architecture.png [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/bbtkUsersGuide.tex [new file with mode: 0644]
kernel/doc/bbtkUsersGuide/enter-the-value-of-x.png [new file with mode: 0644]
kernel/doc/bbtkWebSite/CMakeLists.txt [new file with mode: 0644]
kernel/doc/bbtkWebSite/download.html [new file with mode: 0644]
kernel/doc/bbtkWebSite/home.html [new file with mode: 0644]
kernel/doc/bbtkWebSite/install.html [new file with mode: 0644]
kernel/doc/bbtkWebSite/menu.html [new file with mode: 0644]
kernel/doc/config.tex [new file with mode: 0644]
kernel/doc/index.html [new file with mode: 0644]
packages/CMakeLists.txt
packages/wx/CMakeLists.txt

index af6806c02928007ef2f15f37c180365982c9137d..df645918c778fbb62f65c3095ca69db3512e294c 100644 (file)
@@ -5,7 +5,7 @@ SUBDIRS(src)
 
 #-----------------------------------------------------------------------------
 # Documentation
-#SUBDIRS(doc)
+SUBDIRS(doc)
 #-----------------------------------------------------------------------------
 
 #-----------------------------------------------------------------------------
diff --git a/kernel/cmake/BBTKBuildAllOption.cmake b/kernel/cmake/BBTKBuildAllOption.cmake
new file mode 100644 (file)
index 0000000..599fd81
--- /dev/null
@@ -0,0 +1,25 @@
+#-----------------------------------------------------------------------------
+# If --BUILD_ALL is set to ON then all options 
+# for which the macro SWITCH_ON_IF_BUILD_ALL have been used are set to ON
+# The -- prepended to the options ensure that it will appear as the 
+# first option when running ccmake/CMakeSetup
+OPTION(--BUILD_ALL "Build all ?" OFF)
+#OPTION(--SET_BUILD_ALL_OFF "Build all ?" OFF)
+#MARK_AS_ADVANCED(--SET_BUILD_ALL_OFF)
+
+MACRO(SWITCH_ON_IF_BUILD_ALL VAR)
+#OPTION(--${VAR}_SET_BUILD_ALL_OFF "Build all ?" OFF)
+#MARK_AS_ADVANCED(--${VAR}_SET_BUILD_ALL_OFF)
+IF (--BUILD_ALL)
+#  IF (--${VAR}_SET_BUILD_ALL_OFF)
+#    MESSAGE(ERROR "${VAR} -> Build All OFF")
+#    SET(--BUILD_ALL OFF CACHE BOOL "Build all ?" FORCE)  
+#    SET(--${VAR}_SET_BUILD_ALL_OFF OFF CACHE BOOL "" FORCE)  
+#  ELSE (--${VAR}_SET_BUILD_ALL_OFF)
+    SET(${VAR} ON CACHE BOOL "Forced to ON by --BUILD_ALL" FORCE)
+#    SET(--${VAR}_SET_BUILD_ALL_OFF ON CACHE BOOL "" FORCE)  
+#    MESSAGE(ERROR "Build All -> ${VAR}")
+#  ENDIF (--${VAR}_SET_BUILD_ALL_OFF)
+ENDIF(--BUILD_ALL)
+ENDMACRO(SWITCH_ON_IF_BUILD_ALL)
+#-----------------------------------------------------------------------------
diff --git a/kernel/cmake/BBTKBuildDoxygenDoc.cmake b/kernel/cmake/BBTKBuildDoxygenDoc.cmake
new file mode 100644 (file)
index 0000000..787a1cc
--- /dev/null
@@ -0,0 +1,71 @@
+
+
+MACRO(BBTK_BUILD_DOXYGEN_DOC NAME INPUT DOC_RELATIVE_INSTALL_PATH PREDEFINED)
+
+  #--------------------------------------------------------------------------
+  SET(USE_DOXYGEN ON CACHE BOOL "" FORCE)
+  
+  # Name
+  SET(DOXYGEN_PROJECT_NAME "${NAME}")
+
+  # Inputs
+  STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${INPUT}")
+
+  # Output dirs
+  SET(DOXYGEN_HTML_OUTPUT "html")
+  SET(DOXYGEN_OUTPUT ${PROJECT_BINARY_DIR}/${BBTK_DOC_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH})
+  IF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
+    FILE(MAKE_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
+  ENDIF(NOT IS_DIRECTORY ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT})
+
+  # Doc exclude
+  SET(DOXYGEN_EXCLUDE "")
+  STRING(REGEX REPLACE ";" " " DOXYGEN_EXCLUDE "${DOXYGEN_EXCLUDE}")
+
+  # Log file name 
+  SET(DOXYGEN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/doxygen.log")
+
+  # Predefined symbols
+  STRING(REGEX REPLACE ";" " " DOXYGEN_DOC_PREDEFINED "${PREDEFINED}")
+  
+  #---------------------------------------------------------------------------
+  # DOT verification
+  IF(DOT)
+    GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH ${DOT} PATH)
+    SET(DOXYGEN_HAVE_DOT "YES")
+  ELSE(DOT)
+    SET(DOXYGEN_DOT_PATH "")
+    SET(DOXYGEN_HAVE_DOT "NO")
+  ENDIF(DOT)
+  
+  #---------------------------------------------------------------------------
+  # Create file and project
+  CONFIGURE_FILE(
+    ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.txt
+    ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
+    IMMEDIATE
+    )
+  
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
+    COMMAND 
+    ${DOXYGEN}
+    ARGS
+    ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
+    #  DEPENDS bbtk bbi 
+    )
+  
+  ADD_CUSTOM_TARGET(doxygen ALL
+    DEPENDS  ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}/index.html
+    )
+  
+  INSTALL(
+    DIRECTORY
+    ${DOXYGEN_OUTPUT}/${DOXYGEN_HTML_OUTPUT}
+    DESTINATION
+    ${PROJECT_BINARY_DIR}/${BBTK_DOC_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}
+    )
+  #--------------------------------------------------------------------------
+
+ENDMACRO(BBTK_BUILD_DOXYGEN_DOC)
diff --git a/kernel/cmake/BBTKBuildHtmlDocFromLatex.cmake b/kernel/cmake/BBTKBuildHtmlDocFromLatex.cmake
new file mode 100644 (file)
index 0000000..f1d647e
--- /dev/null
@@ -0,0 +1,28 @@
+
+
+MACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX TEX_FILE)
+  SET(USE_TTH ON CACHE BOOL "" FORCE)
+  
+  #-------------------------------------------------------------------------
+  ##  MESSAGE(STATUS ${LATEX_tth_CONVERTER})
+  
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.html
+    COMMAND 
+    #    tth 
+    ${LATEX_tth_CONVERTER}
+    ARGS
+    -e2 ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.tex 2>tth.log
+ #   DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
+    )
+  ADD_CUSTOM_TARGET(${TEX_FILE}.html ALL
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.html
+    )
+  # Install
+  INSTALL( 
+    FILES ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.html
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/${BBTK_DOC_INSTALL_PATH}/${TEX_FILE}
+    )   
+  #-------------------------------------------------------------------------
+  
+ENDMACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX)
diff --git a/kernel/cmake/BBTKBuildLatexDoc.cmake b/kernel/cmake/BBTKBuildLatexDoc.cmake
new file mode 100644 (file)
index 0000000..1bd7644
--- /dev/null
@@ -0,0 +1,55 @@
+
+
+MACRO(BBTK_BUILD_LATEX_DOC TEX_FILE)
+  
+  SET(USE_LATEX ON CACHE BOOL "" FORCE)
+
+  #MESSAGE(STATUS "Tex file : ${TEX_FILE}")
+  #---------------------------------------------------------------------------
+  CONFIGURE_FILE(
+    ${CMAKE_CURRENT_SOURCE_DIR}/${TEX_FILE}.tex
+    ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.tex
+    COPYONLY
+    )
+  CONFIGURE_FILE(
+    ${CMAKE_CURRENT_SOURCE_DIR}/../config.tex
+    ${CMAKE_CURRENT_BINARY_DIR}/config.tex
+    COPYONLY
+    )
+  #---------------------------------------------------------------------------
+  
+  # Have to run latex twice to get references, toc, etc.
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.aux 
+    COMMAND 
+    # latex
+    ${LATEX_COMPILER}
+    ARGS
+    -interaction=batchmode ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE} -output-directory=${CMAKE_CURRENT_BINARY_DIR}/
+    
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.tex 
+    ${CMAKE_CURRENT_BINARY_DIR}/config.tex 
+    )
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
+    COMMAND 
+    # latex
+    ${LATEX_COMPILER}
+    ARGS
+    -interaction=batchmode ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE} -output-directory=${CMAKE_CURRENT_BINARY_DIR}/
+    
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.aux 
+    )
+  
+  # pdf target
+  ADD_CUSTOM_TARGET(${TEX_FILE}.pdf ALL
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf)
+
+  # Install
+  INSTALL( 
+    FILES ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/${BBTK_DOC_INSTALL_PATH}/${TEX_FILE}
+    )  
+
+
+ENDMACRO(BBTK_BUILD_LATEX_DOC)
index 0e5fe48af918f772599a35f35f0065951a16d78c..3d41137ae42fa24da118dc4226ecfb13b1757288 100644 (file)
 #---------------------------------------------------------------------------
-# Package dependencies
-IF(${BBTK_PACKAGE_NAME}_USE_VTK)
-  SET(USE_VTK ON CACHE BOOL "Use VTK" FORCE)
-  SET(BBTK_PACKAGE_LIBS
-    ${BBTK_PACKAGE_LIBS}
-    ${BBTK_VTK_LIBRARIES}
-    )
-ENDIF(${BBTK_PACKAGE_NAME}_USE_VTK)
+# If not a core package must find bbtk and include necessary cmake scripts
+IF(NOT BBTK_CORE_PACKAGE)
+## TO DO 
+# FIND_LIBRARY(BBTK)
+# INCLUDE(${BBTK_DIR}/BBTKMacros.cmake)
+# INCLUDE(${BBTK_DIR}/BBTKFindLibraries.cmake)
+# etc.
+ENDIF(NOT BBTK_CORE_PACKAGE)
+#---------------------------------------------------------------------------
 
-IF(${BBTK_PACKAGE_NAME}_USE_ITK)
-  SET(USE_ITK ON CACHE BOOL "Use ITK" FORCE)
-  SET(BBTK_PACKAGE_LIBS
-    ${BBTK_PACKAGE_LIBS}
-    ${BBTK_ITK_LIBRARIES}
-    )
-ENDIF(${BBTK_PACKAGE_NAME}_USE_ITK)
+#-----------------------------------------------------------------------------
+# DOES THE USER WANT TO BUILD THE PACKAGE ?
+OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME} 
+  "Build the bbtk package ${BBTK_PACKAGE_NAME} ?" OFF)
+SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
+#-----------------------------------------------------------------------------
 
-IF(${BBTK_PACKAGE_NAME}_USE_GDCM)
-  SET(USE_GDCM ON CACHE BOOL "Use GDCM" FORCE)
-  SET(BBTK_PACKAGE_LIBS
-    ${BBTK_PACKAGE_LIBS}
-    ${BBTK_GDCM_LIBRARIES}
-    )
-ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM)
+#-----------------------------------------------------------------------------
+# IF THE USER HAS CHOSEN TO BUILD THE PACKAGE
+IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
+  #---------------------------------------------------------------------------
 
-IF(${BBTK_PACKAGE_NAME}_USE_GSMIS)
-  SET(USE_GSMIS ON CACHE BOOL "Use GSMIS" FORCE)
-  SET(BBTK_PACKAGE_LIBS
-    ${BBTK_PACKAGE_LIBS}
-    ${BBTK_GSMIS_LIBRARIES}
-    )
-ENDIF(${BBTK_PACKAGE_NAME}_USE_GSMIS)
+  #---------------------------------------------------------------------------
+  # Package dependencies
+  IF(${BBTK_PACKAGE_NAME}_USE_VTK)
+    SET(USE_VTK ON CACHE BOOL "Use VTK" FORCE)
+    SET(BBTK_PACKAGE_LIBS
+      ${BBTK_PACKAGE_LIBS}
+      ${BBTK_VTK_LIBRARIES}
+      )
+  ENDIF(${BBTK_PACKAGE_NAME}_USE_VTK)
+  
+  IF(${BBTK_PACKAGE_NAME}_USE_ITK)
+    SET(USE_ITK ON CACHE BOOL "Use ITK" FORCE)
+    SET(BBTK_PACKAGE_LIBS
+      ${BBTK_PACKAGE_LIBS}
+      ${BBTK_ITK_LIBRARIES}
+      )
+  ENDIF(${BBTK_PACKAGE_NAME}_USE_ITK)
+  
+  IF(${BBTK_PACKAGE_NAME}_USE_GDCM)
+    SET(USE_GDCM ON CACHE BOOL "Use GDCM" FORCE)
+    SET(BBTK_PACKAGE_LIBS
+      ${BBTK_PACKAGE_LIBS}
+      ${BBTK_GDCM_LIBRARIES}
+      )
+  ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM)
+  
+  IF(${BBTK_PACKAGE_NAME}_USE_GSMIS)
+    SET(USE_GSMIS ON CACHE BOOL "Use GSMIS" FORCE)
+    SET(BBTK_PACKAGE_LIBS
+      ${BBTK_PACKAGE_LIBS}
+      ${BBTK_GSMIS_LIBRARIES}
+      )
+  ENDIF(${BBTK_PACKAGE_NAME}_USE_GSMIS)
+  
+  IF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS)
+    IF(BBTK_CORE_PACKAGE)
+      SET(BBTK_USE_WXWIDGETS ON CACHE BOOL "Use wxWidgets" FORCE)
+      MESSAGE(STATUS "BBTK_USE_WXWIDGETS forced to ON by the compilation of the package ${BBTK_PACKAGE_NAME}")
+      # bbtk already links against wx ...
+      #    SET(BBTK_PACKAGE_LIBS
+      #      ${BBTK_PACKAGE_LIBS}
+      #      ${BBTK_WXWIDGETS_LIBRARIES}
+      #      )
+    ELSE(BBTK_CORE_PACKAGE)
+      # If linking against a non-wx bbtk : problem
+      IF(NOT BBTK_USE_WXWIDGETS)
+       MESSAGE(FATAL_ERROR "The bbtk package ${BBTK_PACKAGE_NAME} needs wxWidgets however the bbtk library which was found on your system was not compiled with wxWidgets : recompile it and rebuild the package.")
+      ELSE(NOT BBTK_USE_WXWIDGETS)
+       SET(USE_WXWIDGETS ON CACHE BOOL "Use wxWidgets" FORCE)
+      ENDIF(NOT BBTK_USE_WXWIDGETS)
+    ENDIF(BBTK_CORE_PACKAGE)
+  ENDIF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS)
 
-IF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS)
-  SET(BBTK_USE_WXWIDGETS ON CACHE BOOL "Use wxWidgets" FORCE)
-  MESSAGE(STATUS "BBTK_USE_WXWIDGETS forced to ON by the compilation of the package ${BBTK_PACKAGE_NAME}")
-  # bbtk already links against wx ...
-  #    SET(BBTK_PACKAGE_LIBS
-  #      ${BBTK_PACKAGE_LIBS}
-  #      ${BBTK_WXWIDGETS_LIBRARIES}
-  #      )
-ENDIF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS)
 
+  #---------------------------------------------------------------------------
 
+  #----------------------------------------------------------------------------
+  # DEFINES ${PACKAGE_NAME}_AUTHOR
+  # ADD_DEFINITIONS( -D${PACKAGE_NAME}_AUTHOR="${PACKAGE_AUTHOR}")
+  #----------------------------------------------------------------------------
+  #----------------------------------------------------------------------------
+  # DEFINES ${PACKAGE_NAME}_DESCRIPTION
+  # ADD_DEFINITIONS( -D${PACKAGE_NAME}_DESCRIPTION="${PACKAGE_DESCRIPTION}")
+  #----------------------------------------------------------------------------
+  #----------------------------------------------------------------------------
+  # DEFINES ${BBTK_PACKAGE_NAME}_VERSION
+  SET(BBTK_PACKAGE_VERSION 
+    "${BBTK_PACKAGE_MAJOR_VERSION}.${BBTK_PACKAGE_MINOR_VERSION}.${BBTK_PACKAGE_BUILD_VERSION}")
+  #ADD_DEFINITIONS( -D${BBTK_PACKAGE_NAME}_VERSION=${BBTK_PACKAGE_VERSION})
+  #----------------------------------------------------------------------------
+  
+  
+  #---------------------------------------------------------------------------
+  # Recurse into subdirs
+  SUBDIRS(src)
+#  SUBDIRS(doc)
+#  SUBDIRS(bbs)
 #---------------------------------------------------------------------------
 
 
 
-
-#----------------------------------------------------------------------------
-# DEFINES ${PACKAGE_NAME}_AUTHOR
-# ADD_DEFINITIONS( -D${PACKAGE_NAME}_AUTHOR="${PACKAGE_AUTHOR}")
-#----------------------------------------------------------------------------
-#----------------------------------------------------------------------------
-# DEFINES ${PACKAGE_NAME}_DESCRIPTION
-# ADD_DEFINITIONS( -D${PACKAGE_NAME}_DESCRIPTION="${PACKAGE_DESCRIPTION}")
-#----------------------------------------------------------------------------
-#----------------------------------------------------------------------------
-# DEFINES ${BBTK_PACKAGE_NAME}_VERSION
-SET(BBTK_PACKAGE_VERSION 
-  "${BBTK_PACKAGE_MAJOR_VERSION}.${BBTK_PACKAGE_MINOR_VERSION}.${BBTK_PACKAGE_BUILD_VERSION}")
-#ADD_DEFINITIONS( -D${BBTK_PACKAGE_NAME}_VERSION=${BBTK_PACKAGE_VERSION})
-#----------------------------------------------------------------------------
-
+#---------------------------------------------------------------------------
+ENDIF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
+#-----------------------------------------------------------------------------
+# EOF
+#-----------------------------------------------------------------------------
 
 
 
index bd7f7717d0b17d1c576844ce62e2da6bd6a9d099..dbfa54036bda31ab977de1e780851ae4d56b8411 100644 (file)
-  #----------------------------------------------------------------------------
-
-
-
-  IF(BUILD_bbtk_DOC_DOXYGEN) 
-       FIND_PACKAGE(Doxygen)
-       IF(DOXYGEN)
-               # Build the package documentation
-               SET(DOXYGEN_HTML_OUTPUT "html")
-               SET(DOXYGEN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/bbtk_${BBTK_PACKAGE_NAME}_Doxygen.log")
-
-               # Input : Sources
-               SET(DOXYGEN_INPUT 
-                 ${DOXYGEN_INPUT}
-                 ${PROJECT_SOURCE_DIR}/src/packages/${BBTK_PACKAGE_NAME}
-               )
-
-               STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${DOXYGEN_INPUT}")
-
-               # Output dir
-               SET(DOXYGEN_OUTPUT 
-                 ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/)
-
-               # Doc exclude
-               SET(DOXYGEN_EXCLUDE "")
-               STRING(REGEX REPLACE ";" " " DOXYGEN_EXCLUDE "${DOXYGEN_EXCLUDE}")
-
-               # Predefined symbols
-               SET(DOXYGEN_PROJECT_NAME "BBTK ${BBTK_PACKAGE_NAME} BBTK_PACKAGE")
-
-               STRING(REGEX REPLACE ";" " " DOXYGEN_DOC_PREDEFINED "${DOXYGEN_DOC_PREDEFINED}")
-
-               #-----------------------------------------------------------------------------
-               # DOT verification
-
-               IF(DOT)
-                  GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH ${DOT} PATH)
-                  SET(DOXYGEN_HAVE_DOT "YES")
-               ELSE(DOT)
-                  SET(DOXYGEN_DOT_PATH "")
-                  SET(DOXYGEN_HAVE_DOT "NO")
-               ENDIF(DOT)
-
-               #-----------------------------------------------------------------------------
-               # Create file and project
-               CONFIGURE_FILE(
-                  ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Doxyfile.txt
-                  ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
-                  IMMEDIATE
-               )
-
-               ADD_CUSTOM_COMMAND(
-                 OUTPUT ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/html/index.html
-                 COMMAND 
-                 ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
-                 DEPENDS bb${BBTK_PACKAGE_NAME} 
-               )
-
-               ADD_CUSTOM_TARGET(doxygen-bbtk-${BBTK_PACKAGE_NAME} ALL
-                  DEPENDS ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/html/index.html 
-               )
-       ELSE(DOXYGEN)
-               MESSAGE(FATAL_ERROR "Doxygen not found. Required to build the doxygen documentation")
-       ENDIF(DOXYGEN)
-
-  ENDIF(BUILD_bbtk_DOC_DOXYGEN) 
-
-
-
-
-  #----------------------------------------------------------------------------
-  # bbdoc
-  #---------------------------------------------------------------------------
-  IF(BUILD_bbtk_DOC_BBTK_PACKAGE) 
+#---------------------------------------------------------------------------
+# If not a core package 
+# set the build doc option
+# and include necessary cmake scripts
+IF(NOT BBTK_CORE_PACKAGE)
+## TO DO 
+# INCLUDE(${BBTK_DIR}/BBTKMacros.cmake)
+# INCLUDE(${BBTK_DIR}/BBTKFindLibraries.cmake)
+# etc.
+OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC 
+  "Build the bbtk package ${BBTK_PACKAGE_NAME} html documentation ?" OFF)
+SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
+IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
+  SET(BUILD_bbtk_DOC_BBTK_PACKAGE ON) 
+  # INCLUDE
+ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC)
+
+OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC 
+  "Build the bbtk package ${BBTK_PACKAGE_NAME} doxygen documentation ?" OFF)
+SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
+IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
+  SET(BUILD_bbtk_DOC_DOXYGEN ON) 
+  # INCLUDE
+ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC)
+ENDIF(NOT BBTK_CORE_PACKAGE)
+#---------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+
+
+
+IF(BUILD_bbtk_DOC_DOXYGEN) 
+  SUBDIRS(doxygen)
+
+  # Input : Sources
+  SET(DOXYGEN_INPUT 
+    ${DOXYGEN_INPUT}
+    ${PROJECT_SOURCE_DIR}/src/packages/${BBTK_PACKAGE_NAME}
+    )
     
-    #    MARK_AS_ADVANCED( bbdoc_PATH )
-
-    FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc/packages)
-    FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME})
-      
-
-    IF(WIN32)
-      IF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
-       SET(bbdoc_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/$(IntDir)/bbdoc.exe)
-      ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
-       SET(bbdoc_EXECUTABLE $(SolutionDir)/bin/$(OutDir)/bbdoc.exe)
-      ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
-    ELSE(WIN32)
-      SET(bbdoc_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/bbdoc)
-    ENDIF(WIN32)      
-  
-# NEVER USE CONFIGURATION FILE BUT ALWAYS BUILD WITH THE JUST COMPILED LIBS 
-# NOT THE INSTALLED ONES !  
- #   IF(-bbtk_USE_CONFIGURATION_FILE)
-      # just pass the package name, not the full path name!
-      # and pass the option '1' to bbdoc to use config file
- #     SET(bbdoc_INPUT ${BBTK_PACKAGE_NAME} 1)    
- #   ELSE(-bbtk_USE_CONFIGURATION_FILE)
-      
-      
-      
-      IF(WIN32)
-       IF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
-         SET(bbdoc_INPUT ${EXECUTABLE_OUTPUT_PATH}/$(IntDir)/${BBTK_PACKAGE_NAME})
-       ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
-         SET(bbdoc_INPUT $(SolutionDir)/bin/$(OutDir)/${BBTK_PACKAGE_NAME})
-       ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
-      ELSE(WIN32)
-        SET(bbdoc_INPUT ${LIBRARY_OUTPUT_PATH}/${BBTK_PACKAGE_NAME})
-      ENDIF(WIN32)    
- #   ENDIF(-bbtk_USE_CONFIGURATION_FILE)
+    STRING(REGEX REPLACE ";" " " DOXYGEN_INPUT "${DOXYGEN_INPUT}")
+    
+    # Output dir
+    SET(DOXYGEN_OUTPUT 
+      ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/)
+    
+    # Doc exclude
+    SET(DOXYGEN_EXCLUDE "")
+    STRING(REGEX REPLACE ";" " " DOXYGEN_EXCLUDE "${DOXYGEN_EXCLUDE}")
+    
+    # Predefined symbols
+    SET(DOXYGEN_PROJECT_NAME "BBTK ${BBTK_PACKAGE_NAME} BBTK_PACKAGE")
+    
+    STRING(REGEX REPLACE ";" " " DOXYGEN_DOC_PREDEFINED "${DOXYGEN_DOC_PREDEFINED}")
+    
+    #-----------------------------------------------------------------------------
+    # DOT verification
+    
+    IF(DOT)
+      GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH ${DOT} PATH)
+      SET(DOXYGEN_HAVE_DOT "YES")
+    ELSE(DOT)
+      SET(DOXYGEN_DOT_PATH "")
+      SET(DOXYGEN_HAVE_DOT "NO")
+    ENDIF(DOT)
+    
+    #-----------------------------------------------------------------------------
+    # Create file and project
+    CONFIGURE_FILE(
+      ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Doxyfile.txt
+      ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
+      IMMEDIATE
+      )
     
-
     ADD_CUSTOM_COMMAND(
-      OUTPUT ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/${BBTK_PACKAGE_NAME}.html
+      OUTPUT ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/html/index.html
       COMMAND 
-      ${bbdoc_EXECUTABLE} ${bbdoc_INPUT} ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/${BBTK_PACKAGE_NAME}.html
-      DEPENDS 
-      bb${BBTK_PACKAGE_NAME}
-      ${bbdoc_EXECUTABLE}
-      )     
+      ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.txt
+      DEPENDS bb${BBTK_PACKAGE_NAME} 
+      )
     
-    ADD_CUSTOM_TARGET(${BBTK_PACKAGE_NAME}.html ALL
-      DEPENDS ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/${BBTK_PACKAGE_NAME}.html)
-    
-  ENDIF(BUILD_bbtk_DOC_BBTK_PACKAGE) 
+    ADD_CUSTOM_TARGET(doxygen-bbtk-${BBTK_PACKAGE_NAME} ALL
+      DEPENDS ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/html/index.html 
+      )
+  ELSE(DOXYGEN)
+    MESSAGE(FATAL_ERROR "Doxygen not found. Required to build the doxygen documentation")
+  ENDIF(DOXYGEN)
+  
+ENDIF(BUILD_bbtk_DOC_DOXYGEN) 
+
+
+
+
+#----------------------------------------------------------------------------
+# bbdoc
+#---------------------------------------------------------------------------
+IF(BUILD_bbtk_DOC_BBTK_PACKAGE) 
   
+  #    MARK_AS_ADVANCED( bbdoc_PATH )
   
+  FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc/packages)
+  FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME})
+  
+  
+  IF(WIN32)
+    IF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+      SET(bbdoc_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/$(IntDir)/bbdoc.exe)
+    ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+      SET(bbdoc_EXECUTABLE $(SolutionDir)/bin/$(OutDir)/bbdoc.exe)
+    ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+  ELSE(WIN32)
+    SET(bbdoc_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/bbdoc)
+  ENDIF(WIN32)      
+  
+  # NEVER USE CONFIGURATION FILE BUT ALWAYS BUILD WITH THE JUST COMPILED LIBS 
+  # NOT THE INSTALLED ONES !  
+  #   IF(-bbtk_USE_CONFIGURATION_FILE)
+  # just pass the package name, not the full path name!
+  # and pass the option '1' to bbdoc to use config file
+  #     SET(bbdoc_INPUT ${BBTK_PACKAGE_NAME} 1)    
+  #   ELSE(-bbtk_USE_CONFIGURATION_FILE)
+  
+  
+  
+  IF(WIN32)
+    IF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+      SET(bbdoc_INPUT ${EXECUTABLE_OUTPUT_PATH}/$(IntDir)/${BBTK_PACKAGE_NAME})
+    ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+      SET(bbdoc_INPUT $(SolutionDir)/bin/$(OutDir)/${BBTK_PACKAGE_NAME})
+    ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+  ELSE(WIN32)
+    SET(bbdoc_INPUT ${LIBRARY_OUTPUT_PATH}/${BBTK_PACKAGE_NAME})
+  ENDIF(WIN32)    
+  #   ENDIF(-bbtk_USE_CONFIGURATION_FILE)
+  
+  
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/${BBTK_PACKAGE_NAME}.html
+    COMMAND 
+    ${bbdoc_EXECUTABLE} ${bbdoc_INPUT} ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/${BBTK_PACKAGE_NAME}.html
+    DEPENDS 
+    bb${BBTK_PACKAGE_NAME}
+    ${bbdoc_EXECUTABLE}
+    )     
+  
+  ADD_CUSTOM_TARGET(${BBTK_PACKAGE_NAME}.html ALL
+    DEPENDS ${PROJECT_BINARY_DIR}/doc/packages/${BBTK_PACKAGE_NAME}/${BBTK_PACKAGE_NAME}.html)
+  
+ENDIF(BUILD_bbtk_DOC_BBTK_PACKAGE) 
+
+
index 43179eaa08845d6cbb681b10549613234706e98d..ab6cfbd0a6f6e5f8847b176e6f5299bbf1ecfa04 100644 (file)
@@ -15,7 +15,10 @@ CONFIGURE_FILE(
   ${CMAKE_CURRENT_BINARY_DIR}/bb${BBTK_PACKAGE_NAME}Package.h
   @ONLY IMMEDIATE
   ) 
-INSTALL_FILES(/include/bb${BBTK_PACKAGE_NAME} FILES bb${BBTK_PACKAGE_NAME}Package.h)  
+INSTALL_FILES(
+  /include/bb${BBTK_PACKAGE_NAME} 
+  FILES 
+  bb${BBTK_PACKAGE_NAME}Package.h)  
 #----------------------------------------------------------------------------
   
 #----------------------------------------------------------------------------
@@ -63,26 +66,20 @@ FOREACH(xmlfile ${BBTK_PACKAGE_XML_SOURCES})
   
   GET_FILENAME_COMPONENT(filename "${xmlfile}" NAME_WE) 
   
-  IF(WIN32)
-    SET(bbfy_EXECUTABLE $(TargetDir)/bbfy.exe)
-  ELSE(WIN32)
-    SET(bbfy_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/bbfy)
-  ENDIF(WIN32)      
-  
-  IF(BBFY_DEPENDENCY)
-    SET(BBFY_DEPENDENCY_STR ${bbfy_EXECUTABLE})
-  ENDIF(BBFY_DEPENDENCY)
+  #  IF(BBFY_DEPENDENCY)
+  #    SET(BBFY_DEPENDENCY_STR ${bbfy_EXECUTABLE})
+  #  ENDIF(BBFY_DEPENDENCY)
   
   SET(BBFY_CXX_OUT ${CMAKE_CURRENT_BINARY_DIR}/${filename}.cxx)
   
   ADD_CUSTOM_COMMAND(
     OUTPUT ${BBFY_CXX_OUT}
     COMMAND 
-    ${bbfy_EXECUTABLE} ${xmlfile} ${CMAKE_CURRENT_BINARY_DIR}/ -q
+    ${BBTK_BBFY} ${xmlfile} ${CMAKE_CURRENT_BINARY_DIR}/ -q
     DEPENDS ${xmlfile}
     # LG : REMOVE AUTOMATIC DEPEDENCY ON bbfy BECAUSE CAUSED ALWAYS REBUILD xml BOXES WHEN bbtk CHANGED HENCE bbfy CHANGED
     ${BBFY_DEPENDENCY_STR} 
-    #${bbfy_EXECUTABLE
+    #${BBTK_BBFY
     )
   
   SET_SOURCE_FILES_PROPERTIES(
@@ -98,6 +95,7 @@ FOREACH(xmlfile ${BBTK_PACKAGE_XML_SOURCES})
   ENDIF(NOT BBTK_PACKAGE_CXX_SOURCES MATCHES "${filename}") 
   
   INSTALL_FILES(/include/bb${BBTK_PACKAGE_NAME} FILES ${filename}.h)  
+
 ENDFOREACH(xmlfile)
 #----------------------------------------------------------------------------
 
@@ -110,7 +108,6 @@ ADD_LIBRARY(bb${BBTK_PACKAGE_NAME} SHARED
   )
 TARGET_LINK_LIBRARIES(bb${BBTK_PACKAGE_NAME} 
   bbtk
-  #  ${BBP_LINK_LIBRARIES} 
   ${BBTK_PACKAGE_LIBS}
   )
 #----------------------------------------------------------------------------
index 96ff1c840c69bb63398c82fccadebfdf7773670a..4b7316405e9e7906fbdd13f0439a7c089811a5c1 100644 (file)
@@ -177,3 +177,37 @@ SET(BBTK_WXWIDGETS_LIBRARIES
 
 ENDIF(USE_WXWIDGETS)
 #-----------------------------------------------------------------------------
+
+
+
+#-----------------------------------------------------------------------------
+IF(USE_DOXYGEN) 
+  FIND_PACKAGE(Doxygen REQUIRED)
+#  MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN}")
+  #  IF(DOXYGEN)
+#    
+#  ELSE(DOXYGEN)
+#    MESSAGE(FATAL_ERROR "Doxygen not found. Required to build the doxygen documentation")
+#  ENDIF(DOXYGEN)
+ENDIF(USE_DOXYGEN)
+#-----------------------------------------------------------------------------
+
+
+#-----------------------------------------------------------------------------
+IF(USE_LATEX) 
+  FIND_PACKAGE(LATEX REQUIRED)
+  MESSAGE(STATUS "Looking for latex... - found ${LATEX_COMPILER}")
+ENDIF(USE_LATEX) 
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+IF(USE_TTH) 
+  FIND_FILE(LATEX_tth_CONVERTER NAME tth tth.exe PATHS . c:/Creatis/tth_exe/ ~/Creatis/tth ~/Creatis/tth_linux)
+  IF (NOT LATEX_tth_CONVERTER)
+    MESSAGE(FATAL_ERROR "TTH not found (LATEX_tth_CONVERTER). Required to build the HTML documentation from tex source")
+  ELSE (NOT LATEX_tth_CONVERTER)
+    MESSAGE(STATUS "Looking for tth... - found ${LATEX_tth_CONVERTER}")
+  ENDIF(NOT LATEX_tth_CONVERTER)
+  MARK_AS_ADVANCED(LATEX_tth_CONVERTER)
+ENDIF(USE_TTH)
+#-----------------------------------------------------------------------------
similarity index 56%
rename from kernel/cmake/ADD_DEF.cmake
rename to kernel/cmake/BBTKMacros.cmake
index a76413de82a3b001639574c566965c71bb006a8d..5fa33e459c197e42d32d1e5a9b1d47e7ef52fce7 100644 (file)
@@ -1,3 +1,4 @@
+
 #-----------------------------------------------------------------------------
 # MACRO TO ADD A COMPILER DEFINITION WHICH ADDS ALSO THE DEF 
 # INTO DOXYGEN PREDEFINED VAR 
@@ -31,3 +32,32 @@ MACRO(ADD_DEF_WITH_VAL DEF VAL)
   MARK_AS_ADVANCED(DOXYGEN_DOC_PREDEFINED)
 ENDMACRO(ADD_DEF_WITH_VAL)
 #-----------------------------------------------------------------------------
+
+
+#========================================================================
+# MACRO WHICH COPIES ALL IMAGES (png, jpg, gif) 
+# FROM SOURCE TREE TO DOC BUILD TREE
+# AND INSTALL THEM IN BBTK DOC TREE
+MACRO(BBTK_DOC_INSTALL_IMAGES DOC_RELATIVE_INSTALL_PATH)
+  FILE(GLOB PNG_IMAGES "." "*.png")
+  FILE(GLOB JPG_IMAGES "." "*.jpg")
+  FILE(GLOB TIF_IMAGES "." "*.tif")
+  SET(IMAGES
+    ${PNG_IMAGES}
+    ${JPG_IMAGES}
+    ${TIF_IMAGES}
+    )
+  FOREACH(image ${IMAGES})  
+    GET_FILENAME_COMPONENT(filename "${image}" NAME)
+    CONFIGURE_FILE(
+      ${image}
+       ${PROJECT_BINARY_DIR}/${BBTK_DOC_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}/${filename}
+      COPYONLY
+      )  
+  ENDFOREACH(image)
+  INSTALL( 
+      FILES ${IMAGES} 
+      DESTINATION ${CMAKE_INSTALL_PREFIX}/${BBTK_DOC_INSTALL_PATH}/${DOC_RELATIVE_INSTALL_PATH}
+    )  
+ENDMACRO(BBTK_DOC_INSTALL_IMAGES)
+#========================================================================
diff --git a/kernel/cmake/BBTKPaths.cmake b/kernel/cmake/BBTKPaths.cmake
new file mode 100644 (file)
index 0000000..f574194
--- /dev/null
@@ -0,0 +1,42 @@
+#-----------------------------------------------------------------------------
+# The var BBTK_BIN_PATH
+# gives the system-dependent path to output binaries
+# BBTK_BBI, BBTK_BBFY and BBTK_BBDOC 
+# point to the system-dependent applications 
+# (.exe on win / no extension on lin) 
+IF(WIN32)
+  IF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+    SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH}/$(IntDir))
+  ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+    SET(BBTK_BIN_PATH $(SolutionDir)/bin/$(OutDir))
+  ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+  SET(BBTK_BBI ${BBTK_BIN_PATH}/bbi.exe)
+  SET(BBTK_BBFY ${BBTK_BIN_PATH}/bbfy.exe)
+  SET(BBTK_BBDOC ${BBTK_BIN_PATH}/bbdoc.exe)
+ELSE(WIN32)
+  SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH})
+  SET(BBTK_BBI ${BBTK_BIN_PATH}/bbi)
+  SET(BBTK_BBFY ${BBTK_BIN_PATH}/bbfy)
+  SET(BBTK_BBDOC ${BBTK_BIN_PATH}/bbdoc)
+ENDIF(WIN32)  
+
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# The vars BBTK_DOC_INSTALL_PATH and BBTK_BBS_INSTALL_PATH
+# store documentation and scripts install paths 
+# (different on win/lin)
+IF(WIN32)
+  SET(BBTK_DOC_INSTALL_PATH doc)
+  SET(BBTK_BBS_INSTALL_PATH bbs)
+ELSE(WIN32)
+  SET(BBTK_SHARE_INSTALL_PATH share/bbtk)
+  SET(BBTK_DOC_INSTALL_PATH share/bbtk/doc)
+  SET(BBTK_BBS_INSTALL_PATH share/bbtk/bbs)
+ENDIF(WIN32)   
+
+ADD_DEF_WITH_VAL(BBTK_DOC_REL_PATH ${BBTK_DOC_INSTALL_PATH})
+ADD_DEF_WITH_VAL(BBTK_BBS_REL_PATH ${BBTK_BBS_INSTALL_PATH})
+
+MESSAGE(STATUS "doc='${BBTK_DOC_INSTALL_PATH}'")
+#-----------------------------------------------------------------------------
diff --git a/kernel/doc/CMakeLists.txt b/kernel/doc/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..73e04d5
--- /dev/null
@@ -0,0 +1,131 @@
+
+#-----------------------------------------------------------------------------
+IF(UNIX)
+  # Make symbolic links to get doc links work in build tree
+  IF(NOT IS_DIRECTORY ${PROJECT_BINARY_DIR}/${BBTK_DOC_INSTALL_PATH})
+    FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/${BBTK_SHARE_INSTALL_PATH})
+    EXECUTE_PROCESS(
+      COMMAND ln -s ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_BINARY_DIR}/${BBTK_DOC_INSTALL_PATH})
+#    EXECUTE_PROCESS(
+#      COMMAND ln -s ${CMAKE_CURRENT_BINARY_DIR}/.. ${PROJECT_BINARY_DIR}/${BBTK_BBS_INSTALL_PATH})
+  ENDIF(NOT IS_DIRECTORY ${PROJECT_BINARY_DIR}/${BBTK_DOC_INSTALL_PATH})
+ENDIF(UNIX)
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+OPTION(BUILD_bbtk_DOC "Build documentation for bbtk." OFF)
+SWITCH_ON_IF_BUILD_ALL(BUILD_bbtk_DOC)
+#-----------------------------------------------------------------------------
+
+
+#-----------------------------------------------------------------------------
+IF(BUILD_bbtk_DOC)
+  
+  OPTION(BUILD_bbtk_DOC_PACKAGE 
+    "Build bbtk packages documentation (bbi)."          ON)
+  OPTION(BUILD_bbtk_DOC_DOXYGEN 
+    "Build doxygen documentation (doxygen)."            ON)
+  OPTION(BUILD_bbtk_DOC_GUIDES_PDF 
+    "Build bbtk Guides', PDF format (latex)."   ON)
+  OPTION(BUILD_bbtk_DOC_GUIDES_HTML 
+    "Build bbtk Guides', HTML format (latex+tth)."      ON)
+
+ELSE(BUILD_bbtk_DOC)
+  
+  IF(BUILD_bbtk_DOC_PACKAGE)
+    SET(BUILD_bbtk_DOC_PACKAGE OFF CACHE BOOL 
+      "Build bbtk packages documentation (bbdoc)."     FORCE)
+  ENDIF(BUILD_bbtk_DOC_PACKAGE)
+  IF(BUILD_bbtk_DOC_DOXYGEN)
+    SET(BUILD_bbtk_DOC_DOXYGEN OFF CACHE BOOL 
+      "Build doxygen documentation. (doxygen)"         FORCE)
+  ENDIF(BUILD_bbtk_DOC_DOXYGEN)
+  
+  IF(BUILD_bbtk_DOC_GUIDES_PDF)
+    SET(BUILD_bbtk_DOC_GUIDES_PDF OFF CACHE BOOL 
+      "Build bbtk Guides', PDF format (latex)."        FORCE)
+  ENDIF(BUILD_bbtk_DOC_GUIDES_PDF)
+  
+  IF(BUILD_bbtk_DOC_GUIDES_HTML)
+    SET(BUILD_bbtk_DOC_GUIDES_HTML OFF CACHE BOOL 
+      "Build bbtk Guides', HTML format (latex tth)."           FORCE)
+  ENDIF(BUILD_bbtk_DOC_GUIDES_HTML)
+#  IF(BUILD_bbtk_DOC_SCRIPTS)
+#    SET(BUILD_bbtk_DOC_SCRIPTS_HTML OFF CACHE BOOL 
+#      "Build bbtk scripts documentation (bbi+dot)."           FORCE)
+#  ENDIF(BUILD_bbtk_DOC_SCRIPTS)
+  
+ENDIF(BUILD_bbtk_DOC)
+
+
+#-----------------------------------------------------------------------------
+
+IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_DOXYGEN)
+  INCLUDE(../cmake/BBTKBuildDoxygenDoc.cmake)
+  SUBDIRS(bbtkDoxygen)
+ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_DOXYGEN)
+#-----------------------------------------------------------------------------
+
+
+#-----------------------------------------------------------------------------
+IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF)
+  INCLUDE(../cmake/BBTKBuildLatexDoc.cmake)
+ELSE(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
+  MACRO(BBTK_BUILD_LATEX_DOC TEX_FILE)
+  ENDMACRO(BBTK_BUILD_LATEX_DOC)
+ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF)
+#-----------------------------------------------------------------------------
+
+
+#-----------------------------------------------------------------------------
+IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
+  INCLUDE(../cmake/BBTKBuildHtmlDocFromLatex.cmake)
+ELSE(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
+  MACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX SOURCE)
+  ENDMACRO(BBTK_BUILD_HTML_DOC_FROM_LATEX)
+ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_HTML)
+ENDIF(BUILD_bbtk_DOC_GUIDES_PDF)
+#-----------------------------------------------------------------------------
+
+
+#-----------------------------------------------------------------------------
+IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF OR BUILD_bbtk_DOC_GUIDES_HTML)
+  SUBDIRS(bbtkUsersGuide)
+  SUBDIRS(bbtkPackageDevelopersGuide)
+  SUBDIRS(bbtkDevelopersGuide)
+ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_GUIDES_PDF OR BUILD_bbtk_DOC_GUIDES_HTML)
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+#IF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_SCRIPTS) 
+#  SUBDIRS(scripts)
+#ENDIF(BUILD_bbtk_DOC AND BUILD_bbtk_DOC_SCRIPTS) 
+#-----------------------------------------------------------------------------
+
+
+#-----------------------------------------------------------------------------
+# Web site
+IF(BUILD_bbtk_DOC)
+  # Configure doc index.html for build tree doc
+  CONFIGURE_FILE(
+    index.html
+    ${CMAKE_CURRENT_BINARY_DIR}/index.html
+    @ONLY
+    )
+  # Install
+  INSTALL( 
+    FILES ${CMAKE_CURRENT_BINARY_DIR}/index.html 
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/${BBTK_DOC_INSTALL_PATH}
+    )  
+  SUBDIRS(bbtkWebSite)
+  INSTALL(
+    DIRECTORY  ${BBTK_BINARY_DIR}/kernel/doc 
+    DESTINATION  ${CMAKE_INSTALL_PREFIX}
+    )
+ENDIF(BUILD_bbtk_DOC)
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# Creates the packages subdir
+#FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/packages)
+#-----------------------------------------------------------------------------
diff --git a/kernel/doc/bbtkDevelopersGuide/CMakeLists.txt b/kernel/doc/bbtkDevelopersGuide/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..61cbc10
--- /dev/null
@@ -0,0 +1,3 @@
+BBTK_DOC_INSTALL_IMAGES(bbtkDevelopersGuide)
+BBTK_BUILD_LATEX_DOC(bbtkDevelopersGuide)
+BBTK_BUILD_HTML_DOC_FROM_LATEX(bbtkDevelopersGuide)
diff --git a/kernel/doc/bbtkDevelopersGuide/bbtkDevelopersGuide.tex b/kernel/doc/bbtkDevelopersGuide/bbtkDevelopersGuide.tex
new file mode 100644 (file)
index 0000000..0de7e4e
--- /dev/null
@@ -0,0 +1,46 @@
+\documentclass[a4paper,11pt]{report}
+\input{config.tex}
+\author{L. Guigues}
+\title{The Black Box Tool Kit\\Developers' Guide}
+
+\begin{document}
+\maketitle
+\tableofcontents
+\chapter{Introduction}
+
+
+\chapter{Misc}
+\section{Displaying messages}
+
+\section{Types and RTTI}
+
+
+
+In \bbtk the class conveying the information on a type is 
+\begin{verbatim}
+bbtk::TypeInfo
+\end{verbatim}
+which is simply a typedef on 
+\begin{verbatim}
+const std::type_info&
+\end{verbatim}
+Remember that all constructors ofthe std::type\_info class are private, 
+hence objects can only be created by the operator \texttt{typeid} 
+which returns a const reference on a type\_info. 
+Hence the \bbtk type TypeInfo conveys that const reference 
+and cannot be itself referenced. 
+Any function or method which takes or returns a TypeInfo must take 
+or return it \emph{by value} (see e.g. the TypeName function below).
+To print the name of a type use one of the template functions 
+\begin{verbatim}
+template <class T> std::string TypeName();
+template <class T> std::string TypeName(const T&);
+template <class T> std::string TypeName(bbtk::TypeInfo);
+\end{verbatim}
+
+
+\begin{verbatim}
+BBTK_DEFINE_HUMAN_READABLE_TYPE_NAME(std::string,"string");
+\end{verbatim}
+
+\end{document} 
diff --git a/kernel/doc/bbtkDevelopersGuide/naming_conventions.txt b/kernel/doc/bbtkDevelopersGuide/naming_conventions.txt
new file mode 100644 (file)
index 0000000..f84f404
--- /dev/null
@@ -0,0 +1,81 @@
+* cmake : PACKAGE_NAME : std, itk, vtk
+(nom bbi ; utilisé par load)
+
+* librairie créée : bbstd.dll / libbbstd.so, etc. 
+  bb<PACKAGE_NAME>.dll / libbb<PACKAGE_NAME>.so
+
+* Sources :
+  Type de boite appelé BOX_TYPE_NAME (i.e. dans bbi "new BOX_TYPE_NAME a")
+  - bb<PACKAGE_NAME><BOX_TYPE_NAME>.h / .cxx / .xml
+  Ex : bbstdCast.h
+
+  dans bb<PACKAGE_NAME><BOX_TYPE_NAME>.h :
+  * Symbole de blockage : __bb<PACKAGE_NAME><BOX_TYPE_NAME>_h_INCLUDED__
+  ex : #ifndef __bbstdCast_h_INCLUDED__
+       #define __bbstdCast_h_INCLUDED__
+       ...
+       #endif // __bbstdCast_h_INCLUDED__
+
+
+  * Namespace : bb<PACKAGE_NAME>
+  ex : 
+       namespace bbstd 
+       {
+       ...
+       } // namespace bbstd
+
+  * Classe <BOX_TYPE_NAME>
+  ex : 
+       class Cast : public bbtk::UserBlackBox
+       {
+       }; // class Cast
+  * Descriptor :
+    BEGIN_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
+    ...
+    BBTK_NAME(<BOX_TYPE_NAME>)
+    ...
+    END_DESCRIBE_BLACK_BOX(<BOX_TYPE_NAME>,parent)
+
+ * Utilisation : si on a la boite B definie dans package P1 et dans package P2 
+  * Utilisation c++ :
+    #include "bbstdCast.h"
+    #include "bbP1B.h"
+    #include "bbP2B.h"
+    main() 
+    {
+       bbtk::BlackBox* b = new bbstd::Cast("b");
+       bbtk::BlackBox* c = new bbP1::B("c");
+       bbtk::BlackBox* d = new bbP2::B("d");
+    }
+
+  * Utilisation bbi :
+    >load std
+    >load P1
+    >load P2
+    >new Cast b 
+    >new B c
+    ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
+    >new P1::B c
+    >new P2::B d
+    // THIS IS OK
+    >help P1
+    Package P1 v1.0.0 - foo.bar at corp.com
+    My marvelous package
+    Black boxes :
+      B : Uncompress a file in jpeg format
+    >help P2
+    Package P2 v1.0.0 - bar.foo at expat.co
+    I made this package for fun
+    Black boxes :
+      B : Automatic scientific article generator
+    >help B
+    ERROR : A black box of type B exists in packages P1 and P2. Do you mean P1::B or P2::B ?
+    >help P1::B
+    Black box <P1::B>
+    Uncompress a file in jpeg format
+    By : foo.bar at corp.com
+    * Inputs :
+    ...
+
+
+
diff --git a/kernel/doc/bbtkDoxygen/CMakeLists.txt b/kernel/doc/bbtkDoxygen/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..1e183f2
--- /dev/null
@@ -0,0 +1,21 @@
+
+CONFIGURE_FILE(
+  ${CMAKE_CURRENT_SOURCE_DIR}/CodingStyle.html
+  ${CMAKE_CURRENT_BINARY_DIR}/CodingStyle.html
+  IMMEDIATE
+  )
+CONFIGURE_FILE(
+  ${CMAKE_CURRENT_SOURCE_DIR}/DoxyMainPage.txt
+  ${CMAKE_CURRENT_BINARY_DIR}/DoxyMainPage.txt
+  IMMEDIATE
+  )
+
+SET(INPUT 
+  ${CMAKE_CURRENT_BINARY_DIR}/DoxyMainPage.txt
+  ${PROJECT_SOURCE_DIR}/kernel/src
+  ${PROJECT_SOURCE_DIR}/kernel/appli
+  )
+
+INCLUDE(${BBTK_DIR}/BBTKBuildDoxygenDoc.cmake)
+BBTK_BUILD_DOXYGEN_DOC("BBTK" "${INPUT}" "bbtkDoxygen" "${DOXYGEN_DOC_PREDEFINED}")
+
diff --git a/kernel/doc/bbtkDoxygen/CodingStyle.html b/kernel/doc/bbtkDoxygen/CodingStyle.html
new file mode 100644 (file)
index 0000000..57758d7
--- /dev/null
@@ -0,0 +1,360 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+   <meta http-equiv="Content-Type"
+   content="text/html;charset=iso-8859-1"><title>bbtk Developpers</title></head>
+
+<body>
+
+<!--#######################################################################-->
+<h1>bbtk coding style (and other religious/agnostic beliefs)</h1>
+<hr size="1"><address style=""></address>
+
+<pre>* Introduction:
+   The following coding style intends to ease the work of developpers
+   themselves but also of users who will study, maintain, fix, and extend
+   the code. Any bread crumbs that you can drop in the way of explanatory
+   names and comments will go a long way towards helping other readers and
+   developers.
+   Keep in mind that to a large extent the structure of code directly
+   expresses its implementation.
+                                                                                
+* Language:
+ - C++ (for the kernel) and Python (for the wrappers).
+ - all the names (variables, members, methods, functions) and comments
+   should be based on English. Documentation, guides, web site and other
+   informations should be in English.
+   Make sure you use correct (basic) English and complete, grammatically
+   correct sentences for comments and documentation.
+                                                                                
+* General layout:
+ - Each line of code should take no more than 79 characters. Break the code
+   across multiple lines as necessary.
+ - Methods and functions should keep a reasonable number of lines when
+   possible (a typical editor displays 50 lines). Avoid code duplication.
+   Always prefer creating a new method or function to duplication.
+   A high indentation level generally suggests the need for a new
+   method or function.
+ - All the code should be properly indented. The appropriate indentation
+   level is TWO spaces for each level of indentation. DO NOT USE TABS.
+   Set up your editor to insert spaces. Using tabs may look good in your
+   editor but will wreak havoc in others, or in external tools (e.g. side
+   by side diffs).
+ - The declaration of variables within classes, methods, and functions
+   should be one declaration per line. Provide them with default values
+   and don't rely on compilers for default initialization.
+                                                                                
+* Naming conventions:
+ - Generalities:
+   In general, names are constructed by using case change to indicate
+   separate words, as in ImageDataSize (standing for "image data size").
+   Underscores are not used. Variable names are choosen carefully with the
+   intention to convey the meaning behind the code. Names are generally
+   spelled out; use of abbreviations is discouraged.
+   [Note: abbreviation are allowable when in common use, and should be in
+    uppercase as in LUT or RGBA.]
+   While this does result in long names, it self-documents the code.
+ - Naming Files:
+   Files should have the same name as the class, with a "bbtk" prepended.
+   Header files are named .h, while implementation files are named either
+   .cxx or .txx, depending on whether they are implementations of templated
+   classes. For example, the class bbtk::BlackBox is declared and defined
+   in the files bbtkBlackBox.h and bbtkBlackBox.cxx.
+ - Naming Class Data Members, Methods, and Functions:
+   Class data members (aka Attributes) are named beginning with a lower case 'm'
+   (m as 'member'!) followed by capital letter as in mGroupPixel, in order not
+   be confused with methods names.
+   Global functions and class methods, either static or class members, are
+   named beginning with a capital letter, as in GetImageDataSize().
+ - Naming Local Variables:
+   Local variables begin in lowercase. There is more flexibility in the
+   naming of local variables although they still should convey some
+   semantics.
+ - Naming function parameters:
+   Function parameters begin in lowercase. There is more flexibility in the
+   naming of function parameters although they still should convey some
+   semantics.
+                                                                                 
+* Classes:
+ - Don't use the inline keyword when defining an inline function
+   within a class definition.
+   (Any method defined within a .h file is ipso facto considered as 'inline'.
+   Dont write useless stuff!)
+ - As stated in the "Naming conventions" section, class data members
+   named beginning with a lower case 'm' followed by capital letter 
+   as in mGroupPixel.
+   But the parameter names of method should be named with a lowercase
+   letter (in order to distinguish at a glance data members, from parameters
+   and also to avoid potential collisions with data members):
+      void A::SetGroupPixel( int groupPixel )
+      {
+         mGroupPixel = groupPixel;
+      }
+ - Don't use trailing ';' in inline function definition.
+   use :
+   void A::SetGroupPixel( int groupPixel ){mGroupPixel = groupPixel;}
+     NOT
+   void A::SetGroupPixel( int groupPixel ){mGroupPixel = groupPixel;};
+ - Do not repeat the 'virtual' keyword when overriding virtual base methods
+   in declaration of subclasses:
+     class A
+     {
+        virtual void foo(...);
+     };
+     class B : public bbtk::A
+     {
+        void foo(...);          // and NOT: virtual void foo(...);
+     };
+     
+    (when the keyword 'virtual' is used at the parent level, it's propagated 
+     for all the child classes)
+
+ - In declaration of subclasses, always preprend the class name with 'bbtk::'
+   in order not to confuse Umbrello ( OpenSource UML diagram generator)
+     class A
+     {
+        ...
+     };
+     class B : public bbtk::A // and NOT: class B: public A
+     {
+        ...   
+     };    
+ - The public, protected, private declarations should be at the
+   same indent level as the class. Use :
+     class A
+     {
+     public:
+        void bar(...);
+     protected:
+        void foo(...); 
+     private:
+        void pff(...);
+     };
+     
+ - The Data members should be declared at the end of the class declaration :
+     class A
+     {
+     public:
+        void bar(...);
+     protected:
+        void foo(...);
+     private:
+        void pff(...);
+
+     // --- Data members
+     
+     public:
+        int mPublicCounter;
+     protected:
+        int mProtectedCounter;
+     private:
+        int mPrivateCounter;     
+     }; 
+ - Method and functions devoided of arguments should not use the void
+   notation. Use :
+     SomeType Header::GetPixelData()
+   and not
+     SomeType Header::GetPixelData(void)
+                                                                                
+* Use of braces:
+ - Braces must be used to delimit the scope of an if, for, while, switch, or
+   other control structure. Braces are placed on a line by themselves, and
+   at the same indentation level as the control structure to which they
+   belong:
+      for (i=0; * i&lt;3; i++)
+      {
+         ...
+      }
+   and NOT :
+      for (i=0; * i&lt;3; i++) {
+         ...
+      }   
+   or when using an if:
+      if ( condition )
+      {
+         ...
+      }
+      else if ( other condition )
+      {
+         ...
+      }
+      else
+      {
+        ....
+      }
+    and NOT :
+      if ( condition ) {
+         ...
+      } else if ( other condition ) {
+         ...
+      } else {
+         ....
+      }    
+   You can choose to use braces on a line with a code block when
+   the block consists of a single line:
+      if ( condition ) { foo=1; }
+      else if ( condition2 ) { foo=3; }
+      else { return; }
+   or
+      for (i=0; i&lt;3; ++i) {x[i]=0.0;}
+   Methods and functions should follow the same usage of braces:
+      void File::ParsePixelData()
+      {
+         ...
+      }
+
+* Special layout:
+ - Avoid code mixed with comments on a single line. Instead, prepend the
+   logical blocks of code with the concerned comments.
+ - Use parentheses around conditions e.g. with an if statement:
+      if ( someLocalVariable == 2 ) { ... }
+ - Add spaces around parentheses, or braces. Use
+      if ( someLocalVariable == 2 ) { mClassMember += 1; }
+   and not
+      if (someLocalVariable == 2) {mClassMember += 1;}
+ - Add spaces around each side of the assignement operator, and
+   around binary operators used in boolean expression. Use
+      someLocalVariable = mClassMember * 2;
+      if ( someLocalVariable == 2 || mClassMember == 2 ) ...
+   and not
+      someLocalVariable=mClassMember*2;
+      if ( someLocalVariable==2||mClassMember==2 ) ...
+                                                                                
+* Miscelaneous:
+ - Don't use underscores. Don't use tabs. Don't use control characters
+   like ^M. Anyhow, cvs is configured to reject such commits.
+ - Comments should be in C++ style ("// ...", two slashes, per line). Don't
+   use C style comments ("/* ... */").
+ - The last line of a file should terminate with "\n".
+ - Returned arguments of methods and functions should not be wrapped with
+   parentheses. Use
+      return iter-&gt;second;
+   but do not use
+      return ( iter-&gt;second );
+                                                                                
+* Debugging and Verbose modes:
+   Never use std::cout. Instead use the bbtkMessage, bbtkDebugMessage, bbtkWarning or bbtkError macros and their variants. Example:
+      #include "bbtkMessageManager.h"
+      ...
+      {
+         bbtkDebugMessageInc("MyClass",9,"Local function name: entering.");
+         ...
+         bbtkDecTab("MyClass",9);
+      }
+    will send the message to std::cout when the Debug messages are compiled 
+    and the Message Level for the category of messages "MyClass" is greater than 9.
+                                                                                
+* Documentation:
+   The Doxygen open-source system is used to generate on-line documentation.
+   Doxygen requires the embedding of simple comments in the code which is in
+   turn extracted and formatted into documentation. See :
+      http://www.stack.nl/~dimitri/doxygen/
+   for more information about Doxygen.
+ - Documenting a class:
+   Classes should be documented using the class and brief doxygen commands,
+   followed by the detailed class description:
+      /**
+       * \class Header
+       * \brief Header acts as container of Dicom elements of an image.
+       *
+       * Detailed description of the class is provided here
+       * ...
+       */
+   The key here is that the comment starts with /**, each subsequent line has
+   an aligned *, and the comment block terminates with a */.
+ - Documenting class members and inline methods:
+   All the members and the inline methods should be documented within
+   the class declaration ( .h file) as shown in the following example:
+      class Header
+      {
+         /// True when parsing was successfull. False otherwise.
+         bool mReadable = false;
+                                                                                
+         /// \brief The number of lines of the image as interpreted from
+         ///        the various elements encountered at header parsing.
+         int mNumberOfLines = -1;
+                                                                                
+         /// Predicate implemented as accessor around \ref mReadable.
+         bool IsReadable() { return mReadable; }
+      };
+ - Documenting a Method:
+   Methods should be documented using the following comment block style
+   as shown in the following example:
+                                                                                
+      /**
+       * \brief  Within the Dicom Elements (parsed with the public and private
+       *         dictionaries), look for the element value representation of
+       *         a given tag.
+       * @param  group  Group number of the searched tag.
+       * @param  elem Element number of the searched tag.
+       * @return Corresponding element value representation when it exists,
+       *         and the string "bbtk::Unfound" otherwise.
+       */
+      std::string Document::GetEntryByNumber(guint16 group, guint16 elem)
+      {
+         ...
+      }
+                                                                                
+* External includes and C style:
+ - Only the C++ standard library and the STL includes should be used.
+   When including don't use the .h extension (use #include <iostream>
+   instead of #include <iostream.h>).
+   Note: include the stl header AFTER the bbtk ones (otherwise pragma
+         warnings won't work).
+ - Don't use the C standard library. Don't include stdio.h, ctype.h...
+   Don't use printf(), sprinf(), FILE*...
+ - Don't use the NULL notation (neither as macro, nor as const int NULL=0).
+   A pointer that doesn't refer to an object should simply be defined as
+      DataPointer *myDataPointer = 0;
+                                                                                
+* Basic types:
+ - Assume T is a given type. When declaring or defining with the
+   "pointer to T" notation, the * character must be adjacent to
+   the variable and not the type. That is use
+      T *foo = 0;
+   and not
+      T* foo = 0;
+   nor
+      T * foo = 0;
+ - Assume T is a given type. When declaring or defining with the
+   "reference to T" notation, the &amp; character must be adjacent to
+   the variable and not the type. That is use :
+      T &amp;foo = 0;
+   and not
+      T&amp; foo = 0;
+
+   (Doxygen will not have any longer to correct)
+
+ - Always define a typedef for a new type and be consistent in usage.
+   Use :
+      typedef Header *HeaderPointer;
+      HeaderPointer myHeaderPointer;
+      
+ - One notorious counter example for non using C style inclusion concerns
+   exact-width integers (since there seem to be no equivalent for C++).
+   When using exact-width integers use the typedef names defined by
+   the Basic ISO C99: 7.18 Integer types i.e.
+      int8_t     int16_t     int32_t     int64_t (signed integers)
+   and
+      uint8_t    uint16_t    uint32_t    uint64_t (unsigned integers).
+   Conversion table is then:
+    unsigned char       -&gt; uint8_t;
+    unsigned short      -&gt; uint16_t;
+    unsigned int        -&gt; uint32_t;
+    unsigned long       -&gt; uint32_t;
+    unsigned long long  -&gt; uint64_t;
+    (signed) char       -&gt; int8_t;
+    short               -&gt; int16_t;
+    int                 -&gt; int32_t;
+    long                -&gt; int32_t;
+    long long           -&gt; int64_t;
+   Hence do not use declarations like "unsigned int".
+   With g++, accessing those typedef is achieved by the following
+      #include &lt; stdint.h &gt;
+</iostream.h></iostream></pre>
+
+
+<!--#######################################################################-->
+<hr size="1"><address style=""></address>
+
+</body></html>
diff --git a/kernel/doc/bbtkDoxygen/DoxyMainPage.txt b/kernel/doc/bbtkDoxygen/DoxyMainPage.txt
new file mode 100755 (executable)
index 0000000..94c4c71
--- /dev/null
@@ -0,0 +1,19 @@
+/**
+ * \mainpage bbtk documentation
+
+\htmlonly 
+
+"A black box is any system in which only the input and output characteristics are of interest - without regard to its internal mechanism or structure" (from <A href="http://en.wikipedia.org/wiki/Black_box_%28disambiguation%29" > wikipedia </A>)
+
+<li> 
+<A href="../CodingStyle.html"> Coding Style </A>
+</li>
+
+\endhtmlonly
+
+
+
+
+         
+ */
diff --git a/kernel/doc/bbtkDoxygen/Doxyfile.txt b/kernel/doc/bbtkDoxygen/Doxyfile.txt
new file mode 100755 (executable)
index 0000000..0dc4306
--- /dev/null
@@ -0,0 +1,764 @@
+# Doxyfile 1.2.14
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+PROJECT_NAME           = @DOXYGEN_PROJECT_NAME@
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+PROJECT_NUMBER         = @PROJECT_VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+OUTPUT_DIRECTORY       = @DOXYGEN_OUTPUT@
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, 
+# German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, 
+# Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+EXTRACT_PRIVATE        = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+EXTRACT_LOCAL_CLASSES  = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+HIDE_UNDOC_CLASSES     = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+REPEAT_BRIEF           = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+INLINE_INHERITED_MEMB  = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+STRIP_FROM_PATH        = 
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+INTERNAL_DOCS          = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+STRIP_CODE_COMMENTS    = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+VERBATIM_HEADERS       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+SHOW_INCLUDE_FILES     = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+JAVADOC_AUTOBRIEF      = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+SORT_MEMBER_DOCS       = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+GENERATE_BUGLIST       = YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+SHOW_USED_FILES        = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+QUIET                  = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, then doxygen will generate warnings 
+# for error documented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+WARN_LOGFILE           = @DOXYGEN_LOGFILE@
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+INPUT                  = @DOXYGEN_INPUT@
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+FILE_PATTERNS          = *.h *.cxx *.txx
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+EXCLUDE                = @DOXYGEN_EXCLUDE@
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+EXAMPLE_PATTERNS       = *.cxx
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse.
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+INLINE_SOURCES         = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+COLS_IN_ALPHA_INDEX    = 3
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+HTML_OUTPUT            = @DOXYGEN_HTML_OUTPUT@
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+, 
+# or Internet explorer 4.0+). Note that for large projects the tree generation 
+# can take a very long time. In such cases it is better to disable this feature. 
+# Windows users are probably better off using the HTML help feature.
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+LATEX_OUTPUT           = latex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+GENERATE_XML           = NO
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+PREDEFINED             = @DOXYGEN_DOC_PREDEFINED@
+                        
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line and do not end with a semicolon. Such function macros are typically 
+# used for boiler-plate code, and will confuse the parser if not removed.
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+CLASS_DIAGRAMS         = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+HAVE_DOT               = @DOXYGEN_HAVE_DOT@
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+TEMPLATE_RELATIONS     = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+HIDE_UNDOC_RELATIONS   = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are gif, jpg, and png
+# If left blank gif will be used.
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+DOT_PATH               = "@DOXYGEN_DOT_PATH@"
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+SEARCHENGINE           = NO
diff --git a/kernel/doc/bbtkPackageDevelopersGuide/CMakeLists.txt b/kernel/doc/bbtkPackageDevelopersGuide/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..78998d9
--- /dev/null
@@ -0,0 +1,3 @@
+BBTK_DOC_INSTALL_IMAGES(bbtkPackageDevelopersGuide)
+BBTK_BUILD_LATEX_DOC(bbtkPackageDevelopersGuide)
+BBTK_BUILD_HTML_DOC_FROM_LATEX(bbtkPackageDevelopersGuide)
diff --git a/kernel/doc/bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.tex b/kernel/doc/bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.tex
new file mode 100644 (file)
index 0000000..ab4cb9f
--- /dev/null
@@ -0,0 +1,614 @@
+% ==========================================
+\documentclass[11pt,final,a4paper]{article}
+\input{config.tex}
+\begin{document}
+\title{The Black Box Toolkit\\Package Developers' Guide}
+\date{\today}
+\author{Laurent Guigues}
+\maketitle
+% ==========================================
+\tableofcontents
+% ==========================================
+
+
+% ==========================================
+%\section*{Abstract}
+% ==========================================
+\newpage
+% ==========================================
+% ==========================================
+\vspace{0.5cm}\hrule
+%\section{Creating your own black boxes}
+%\label{bbp}
+% ==========================================
+
+% ==========================================
+\section{Steps in the creation of new black boxes}
+% ==========================================
+Any black box must be included in a \bbtk package, 
+that is in a particular shared library which can be loaded 
+dynamically by \bbtk (hence applications which use \bbtk, 
+such as the interpreter \bbi). 
+
+\begin{enumerate}
+\item \textbf{Create a new package. }
+Before defining any black box you  
+have to create a package, or more precisely  
+the files which will allow you to generate the package 
+(compile and link the shared library) and may be install it. 
+The utility \texttt{bbCreatePackage} does it for you. 
+
+Two cases occur :
+\begin{itemize}
+\item The black boxes you want to create are based on 
+a processing code (\CPP classes or \C functions) which 
+is in an existing project handled by \cmake
+and you want the new package to be part of your existing project. 
+You will have to create your new package into the source tree of your 
+project. 
+\item You do not have an already existing project (you want 
+to create the new boxes from scratch) or you want/are imposed  
+that the existing project remain external to the package project.
+You will have to create your new package in a new location and 
+may be include/link against existing libraries. 
+\end{itemize}
+
+\item \textbf{Describe your new box. }
+You can do it either :
+\begin{itemize}
+\item In \CPP code. You will have to write the class for 
+your box, mostly using \bbtk macros.  
+\item In \xml code. 
+When configuring your project with \cmake, 
+the utility \bbfy will then generate the corresponding \CPP code. 
+\end{itemize}
+
+\end{enumerate}
+
+% ==========================================
+\section{Creating a new black box package}
+% ==========================================
+
+The utility \texttt{bbCreatePackage} allows to 
+create a new void package. It is a command script 
+(a \texttt{bash} script on linux,
+a \texttt{dos} script on windows) 
+which creates the directory structure and the \texttt{cmake} 
+files necessary to build the project.
+
+Its usage is as follows :
+\begin{verbatim}
+> bbCreatePackage <package-folder-with-complete-path>
+\end{verbatim}
+
+You must then decide the name of your new package. 
+It will be the name used to load the package in \texttt{bbi}. 
+
+For example, on linux, turn to an empty folder and type :
+
+\begin{verbatim}
+> bbCreatePackage pack1
+\end{verbatim}
+
+you get :
+
+\begin{verbatim}
+----- Creating new black box package in 'pack1' -----
+-> Creating directory 'pack1'
+-> Creating file 'pack1/CMakeLists.txt'
+-> Creating directory 'pack1/cmake'
+-> Copying files in 'pack1/cmake'
+Done !
+Edit the file 'pack1/CMakeLists.txt' to customize your package
+\end{verbatim}
+
+the file tree obtained is :
+
+\begin{verbatim}
+> tree pack1
+pack1/
+|-- CMakeLists.txt
+`-- cmake
+    |-- Configure.cmake
+    |-- ConfigurePackage.cmake
+    |-- FindGTK2.cmake
+    |-- FindLibrary.cmake.in
+    |-- FindwxW.cmake
+    |-- GenerateLibraryConfig.cmake
+    |-- InstallLibrary.cmake
+    |-- LibraryConfig.cmake.in
+    |-- UseLibrary.cmake.in
+    |-- bbPackage.cxx.in
+    `-- bbPackage.h.in
+
+1 directory, 12 files
+\end{verbatim}
+
+The directory \texttt{pack1} is the directory of your new package, 
+in which you will create the files describing your black boxes.
+But first, you have to customize your new package, by editing the file 
+\texttt{CMakeLists.txt} in the \texttt{pack1} directory.
+This file contains :
+
+\begin{file}{pack1/CMakeLists.txt}
+\small
+\begin{verbatim}
+#...........................................................................
+# CMake configuration file for a bbtk package. 
+# Automatically generated by bbCreatePackage.
+# - The lines which are between dotted comments (#...) must be left unchanged 
+# - The lines which are between dashed comments (#===) can be edited to customize the package
+#...........................................................................
+
+#...........................................................................
+INCLUDE(cmake/Configure.cmake)
+#...........................................................................
+
+
+#===========================================================================
+# THE NAME OF THE PACKAGE 
+SET(PACKAGE_NAME Example)
+#===========================================================================
+
+
+#...........................................................................
+# DOES THE USER WANT TO BUILD THE PACKAGE ?
+OPTION(BUILD_PACKAGE_${PACKAGE_NAME} 
+  "Build the bbtk package ${PACKAGE_NAME}" ON)
+#...........................................................................
+
+#...........................................................................
+# IF THE USER HAS CHOSEN TO BUILD THE PACKAGE
+IF(BUILD_PACKAGE_${PACKAGE_NAME})
+  #...........................................................................
+
+
+  #===========================================================================
+  # UNCOMMENT NEXT LINES IF THE PACKAGE USES THE VTK LIBRARY, THE ITK LIB, ETC.
+  # SET(${PACKAGE_NAME}_USE_VTK  ON)
+  # SET(${PACKAGE_NAME}_USE_ITK  ON)
+  # SET(${PACKAGE_NAME}_USE_GDCM ON)
+  # SET(${PACKAGE_NAME}_USE_GSMIS ON)
+  # SET(${PACKAGE_NAME}_USE_WXWIDGETS ON)
+  #===========================================================================
+  
+  #===========================================================================
+  # PACKAGE AUTHOR : PREFERABLY PROVIDE YOUR EMAIL ADDRESS
+  SET(PACKAGE_AUTHOR "foo.bar@creatis.insa-lyon.fr")
+  #===========================================================================
+
+  #===========================================================================
+  # PACKAGE DESCRIPTION
+  SET(PACKAGE_DESCRIPTION "My marvelous black box package")
+  #===========================================================================
+
+  #===========================================================================
+  # PACKAGE VERSION NUMBER 
+  SET(PACKAGE_MAJOR_VERSION 1)
+  SET(PACKAGE_MINOR_VERSION 0)
+  SET(PACKAGE_BUILD_VERSION 0)
+  #===========================================================================
+  #===========================================================================
+  # THE xml SOURCES OF THE PACKAGE
+  # EITHER UNCOMMENT NEXT LINE TO bbfy ALL .xml OF THE DIRECTORY :
+  SET(COMPILE_ALL_XML ON)
+  # ... OR LIST THE FILES TO COMPILE MANUALLY :
+  #SET(PACKAGE_XML_SOURCES
+    # LIST HERE THE FILES TO bbfy TO BUILD THE LIB
+    # E.G. TO bbfy "toto.xml" ADD "toto" (NO EXTENSION)
+  #    )
+  #===========================================================================
+
+  #===========================================================================
+  # THE C++ SOURCES OF THE PACKAGE
+  # EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE DIRECTORY :
+  SET(COMPILE_ALL_CXX ON)
+  # ... OR LIST THE FILES TO COMPILE MANUALLY :
+  #SET(PACKAGE_CXX_SOURCES
+    # LIST HERE THE FILES TO COMPILE TO BUILD THE LIB
+    # E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION)
+  #    )
+  #===========================================================================
+
+  #===========================================================================
+  INCLUDE_DIRECTORIES(
+    # LIST HERE YOUR ADDITIONAL INCLUDE DIRECTORIES (EXCEPT BBTK'S)
+    )
+  #===========================================================================
+  #===========================================================================
+  SET(PACKAGE_LIBS 
+    # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST (EXCEPT BBTK'S)   
+    )
+  #===========================================================================
+
+  
+  #...........................................................................
+  INCLUDE(cmake/ConfigurePackage.cmake)
+  #...........................................................................
+  
+ENDIF(BUILD_PACKAGE_\${PACKAGE_NAME})
+#...........................................................................
+# EOF
+#...........................................................................
+\end{verbatim}
+\end{file}
+
+The comments in the file should be easily understandable !
+You have to customize the lines which are enclosed 
+between dashed comment lines.
+In these sections, you can set :
+\begin{itemize}
+\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 
+\lin the object file will be called \texttt{libbb}name\texttt{.so} 
+and on \win it  will be called \texttt{bb}name\texttt{.dll}.
+\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.
+\item The \textbf{author(s)} of the package. Preferably provide e-mail adresses.
+\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.
+\item The \textbf{version} of the package.
+\item The \textbf{\xml sources} of the package : you can list each input \xml file explicitly or tell \cmake to include in the project all the \xml files of the directory. 
+\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.
+\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...).
+\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...).
+\end{itemize}
+
+Of course, this is only a framework and you can add any other \cmake commands
+in the file.
+
+% ==========================================
+\section{Creating a new box}
+% ==========================================
+
+% ==========================================
+\subsection{Principles}
+% ==========================================
+
+\subsubsection{\texttt{C++} or \texttt{XML} ?}
+There are two ways to create a new black box in an existing package :
+\begin{itemize}
+\item Write an \xml description file which will be automatically 
+translated in \CPP by the \bbfy application (recommanded).
+\item Write the \CPP code of the box using \bbtk macros.
+\end{itemize}
+
+\subsubsection{From which \bbtk class inherit ?}
+
+Apart from this choice of the description langage to use, 
+there is an important choice to do concerning the implementation of the box. 
+In \CPP, a black box is nothing but a class which has the standard 
+interface of all black boxes : what's its name ? inputs ? outputs ? and so on. 
+The abstract description of this interface is done in the class 
+\texttt{bbtk::BlackBox} and is implemented in its child classes : 
+\texttt{bbtk::UserBlackBox} and \texttt{bbtk::WxBlackBox} 
+\footnote{all the classes of the \bbtk library are in a \emph{namespace} 
+called \texttt{bbtk} 
+and the \CPP header of a class called \texttt{NameOfAClass} is 
+in the file called \texttt{bbtkNameOfAClass.h}}.
+To create a new black box, you have to inherit one of these two  
+concrete classes in order to inherit the black box interface and a 
+particular implementation of this interface. 
+If your black box is a \emph{Widget} black box, 
+that is a black box which has (or is) 
+a piece of a graphical interface based on the \wx library,
+then it must inherit the class \texttt{bbtk::WxBlackBox}. 
+Concretely, a \texttt{bbtk::WxBlackBox} is associated 
+a \texttt{wxWindow} and must be able to return a pointer to it. 
+If your black box is not a widget black box, it must inherit 
+\texttt{bbtk::UserBlackBox}.
+
+\subsubsection{Inherit or encapsulate ?}
+
+Now, your black box will do something (hopefully !). 
+When you decide to write a new black box, 
+you should be in one of these three cases :
+\begin{enumerate}
+\item You already have a \texttt{C}-like function which 
+does the processing that you wish to 'blackboxify'
+\item You already have a \CPP class which 
+does the processing that you wish to 'blackboxify'
+\item You start from scratch without any existing code
+\end{enumerate}
+
+The idea of \BBTK is to embed processing codes into 
+\CPP objects which have a standard and generic interface - 
+namely black boxes - to be able to chain arbitrary 
+processes afterwards. 
+
+In \CPP, in order to embed an existing processing \emph{class}  
+into a standard interface you only have two possibilities :
+\begin{enumerate}
+\item {\bf Inherit} the existing processing class 
+\emph{and} the interface class (e.g. \texttt{bbtk::UserBlackBox}).
+In this case you have to :
+\begin{enumerate}
+\item make the link between the inputs and outputs of the black box 
+and the interface of the inherited class
+\item call the processing 
+method of the inherited class in the processing method of the black box.
+\end{enumerate}
+\item {\bf Encapsulate} the existing processing class 
+in a class inherited from 
+the interface class (e.g. \texttt{bbtk::UserBlackBox}).
+In this case you have to :
+\begin{enumerate}
+\item declare it as a member of the black box, 
+\item instantiate it at the right time 
+(either in the constructor or in the processing method of the black box)
+\item in the processing method of the black box : 
+\begin{enumerate}
+\item set the inputs of the member procesing class with the inputs of the black box, 
+\item call the processing method of the encapsulated class  
+\item set the ouputs of the black box with the outputs of the encapsulated 
+class.
+\end{enumerate}
+\end{enumerate}
+\end{enumerate}
+
+If you wish to 'blackboxify' a C-like \emph{function}, 
+you do not have the choice, you can only use the second mechanism, 
+namely encapsulation.
+
+Obviously, the inheritance mechanism is more powerfull 
+and - when it is possible to use it - it demands less effort 
+because, as we will see, in \bbtk you can directly 
+link the accessors to the input and output data of the box 
+to the accessors of the inherited processing class, 
+as well as the procesing method of the black box 
+to the processing method of the inherited processing class, 
+very much like a callback mechanism.
+
+\subsubsection{Informations to provide}
+
+Finally, to create a new black box, you will have to give :
+\begin{enumerate}
+\item The {\bf name} of the box 
+\item The {\bf author} of the box
+\item A {\bf description} of the box
+\item The {\bf package} to which the box belongs (can we do it automatically ? LG : think about it)
+\item Its {\bf parent black box}, either \texttt{bbtk::UserBlackBox} or \texttt{bbtk::WxBlackBox} 
+\item $[$Optional$]$ The additional {\bf include files} which are necessary for the code to compile (classes or functions declarations ...)  
+\item $[$Optional$]$ The other {\bf parent(s)} of the box (which must be known hence their header included)
+\item $[$Optional$]$ The {\bf namespace} to which the box belongs
+\item The box {\bf inputs} and {\bf outputs}, and for each one :
+\begin{enumerate}
+\item Its {\bf name} : the string which will identify the input or output
+\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.  
+\item Its {\bf help} : a string describing the input / output 
+\end{enumerate}
+\item Its {\bf processing} code, which can be a simple callback or an arbitrary complex code
+\end{enumerate}
+
+\subsubsection{Input and output accessors}
+
+When you encapsulate a processing class or a C function 
+or when you write down a black box from scratch, 
+you must access the inputs and outputs of the black box, 
+in order to interface it manually with your processing method 
+or simply write your processing code 
+(there are other cases in which you also need to access the 
+inputs and outputs, we will talk about them later). 
+
+The only thing you must know about the \CPP code generated 
+from your \xml or your \CPP macro-based description 
+is that when you declare an input 
+or an output of a black box then 
+two \emph{accessors} for this input or output are generated : 
+one to \emph{get} the value of the input or output and 
+one to \emph{set} it. 
+These accessors have normalized names : 
+
+\begin{itemize} 
+\item The declaration of an {\bf input} called \texttt{NAME} and 
+of type \texttt{TYPE} generates the two accessors
+\footnote{For the sake of simplicity, the parameters and return value are 
+shown here as if they were all passed by value. 
+However the actual code can use references. 
+The same way, the issue of const or non const methods is eluded here. 
+Different cases occur in practice.}: 
+\begin{itemize} 
+\item \texttt{void bbSetInput<NAME>(<TYPE>);} 
+\item \texttt{<TYPE> bbGetInput<NAME>();} 
+\end{itemize}
+\item The declaration of an {\bf output} called \texttt{NAME} and  
+of type \texttt{TYPE} generates the two accessors:
+\begin{itemize} 
+\item \texttt{void bbSetOutput<NAME>(<TYPE>);} 
+\item \texttt{<TYPE> bbGetOutput<NAME>();} 
+\end{itemize}
+\end{itemize}
+
+For example, declaring an input called \texttt{Image} 
+would generate the two accessors \texttt{bbSetInputImage} and 
+\texttt{bbGetInputImage}. 
+
+Note that 
+\begin{itemize}
+\item All \bbtk methods are prefixed by \texttt{bb} 
+to avoid conflicts with potential inherited methods. 
+\item An input and an output can have the same name (e.g. 'Image').
+No conflict between accessors occur (e.g. 
+four distinct accessors are created : 
+\texttt{bbSetInputImage}, 
+\texttt{bbGetInputImage}, 
+\texttt{bbSetOutputImage} and 
+\texttt{bbGetOutputImage}).
+\end{itemize}
+
+% ==========================================
+\subsection{\texttt{XML} description of a box}
+% ==========================================
+
+% ==========================================
+\subsubsection{General \texttt{xml} tags}
+% ==========================================
+
+Let us examine the \texttt{xml} file 
+describing the \texttt{Add} box of the \texttt{std} package :
+
+\begin{file}{\texttt{src/packages/std/bbAdd.xml}}
+\small
+\begin{verbatim}
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<blackbox name="Add">
+
+  <description> Adds its inputs                      </description>
+  <author>      laurent.guigues@creatis.insa-lyon.fr </author>
+  <package>     std                                  </package>
+
+  <parentblackbox> bbtk::UserBlackBox                </parentblackbox>
+  <namespace>      bbstd                             </namespace>
+
+  <input  name="In1" type="double">  First number to add   </input>
+  <input  name="In2" type="double">  Second number to add  </input>
+  <output name="Out" type="double">  Result                </output>
+
+  <process><PRE>
+    bbSetOutputOut( bbGetInputIn1() + bbGetInputIn2() );
+  </PRE></process>
+
+</blackbox>
+\end{verbatim}
+\end{file}
+
+The tags and their role are easily understandable.
+
+As the box is not a widget, we inherit from 
+\texttt{bbtk::UserBlackBox} (\texttt{parentblackbox} tag).
+
+Note that we decided to include the generated class 
+into the namespace \texttt{bbstd}.
+
+The only part of the file which demand a bit of explaination is 
+the body of the \texttt{process} tag, which describes the 
+actual code to execute in the box. 
+This code must be enclosed in a \texttt{<PRE></PRE>} tag 
+to tell the \xml parser not to interpret it as \xml instructions. 
+This is necessary to be able to use any symbol, 
+like the \texttt{<} and \texttt{>} which have a 
+special meaning in \xml. 
+In the case of the \texttt{Add} box, the process code 
+is very simple : remember that 
+\texttt{bbGetInputIn1} is the 
+accessor to the input \texttt{In1} declared above and 
+\texttt{bbGetInputIn2} is the 
+accessor to the input \texttt{In2};  
+the code simply adds the values of the two inputs 
+and sets the output \texttt{Out} with the resulting value.
+
+To describe your own black boxes in \xml code, 
+you can use the template \texttt{xml} file 
+\texttt{examples/TEMPLATE\_bbPackagenameBoxname.xml}.
+
+If \texttt{MyPack} is the name of your package and 
+\texttt{MyBox} the name of your box, then :
+\begin{enumerate}
+\item Copy this file in your package folder with 
+the normalised name \texttt{bbMyPackMyBox.xml} 
+\item Replace each occurrence of \$PACKAGENAME\$ by MyPack 
+and each occurrence of \$BOXNAME\$ by MyBox.
+\item Fill in the description and author tags
+\item Create your inputs and outputs
+\item Fill in the process tag 
+\end{enumerate} 
+
+
+% ==========================================
+\subsubsection{Specific \texttt{xml} tags for \texttt{itk::ImageToImageFilter} classes bbfication}
+% ==========================================
+
+% ==========================================
+\subsubsection{Specific \texttt{xml} tags for \texttt{vtkImageAlgorithm} classes bbfication}
+% ==========================================
+
+% ==========================================
+\subsubsection{Specific \texttt{xml} tags for \texttt{vtkPolyDataAlgorithm} classes bbfication}
+% ==========================================
+
+% ==========================================
+\subsubsection{\bbfy \texttt{xml} tags reference}
+% ==========================================
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{xml_tags}
+\bbfy \texttt{xml} tags reference}
+\small
+\begin{tabular}{|lcllm{6cm}|}
+\hline
+Tag & Attributes & Condition & Multiplicity & Description
+ \\ \hline
+
+\texttt{<blackbox>} & \texttt{name} & - & 1 & The name of the box \\ \hline
+               & \texttt{type} & - & 1 & The type of the box. In: 
+       \{\texttt{standard} (default), 
+\texttt{itkImageToImageFilter},
+\texttt{vtkImageAlgorithm},
+\texttt{vtkPolyDataAlgorithm}\} \\\hline
+& \texttt{generic} & a) & 0-1 &
+Generate the generic filter (see text)\\ \hline 
+
+\texttt{<description>} & - & - & 0-n &  The description of the box. Multiple occurrence are concatenated \\\hline 
+\texttt{<author>} & - & - & 0-n &  The author of the box. Multiple occurrence are concatenated \\\hline 
+\texttt{<parentblackbox>} & - & - & 1 &  The parent black box of the box.
+In: \{\texttt{bbtk::BlackBox, bbtk::WxBlackBox, bbtk::WxContainerBlackBox}\}\\\hline 
+\texttt{<package>} & - & - & 1 &  The package of the box \\\hline 
+\texttt{<namespace>} & - & - & 0-1 &  The namespace of the box. 
+Use \texttt{bbPACKAGE}, where \texttt{PACKAGE} is the name of the package\\\hline 
+\texttt{<include>} & - & - & 0-n & Additionnal file to include 
+(generates : \texttt{\#include 'value'})\\\hline 
+
+\texttt{<template>} & - & - & 0-n &  Template parameter of the box. The template parameter list is generated in the order of appearance of the tag. \\\hline 
+
+\texttt{<itkparent>} &  - & a) &  1 & The parent itk class (with namespace) \\\hline
+
+\texttt{<vtkparent>} &  - & b) &  1 & The parent vtk class \\\hline
+
+\texttt{<input>} & \texttt{name} & - & 1 &  The name of the input \\\hline 
+        & \texttt{type} & - & 1 &  The type of the input \\\hline 
+        & \texttt{special} & - & 0-1 & In: \{\texttt{``itk input'', 
+``vtk input'', ``itk parameter'', ``vtk parameter''}\} (see below).\\\hline 
+        & \texttt{generic\_type} & c) & 0-1 & The ``generic'' type of the input (see text). \\\hline 
+\texttt{<output>} & \texttt{name} & - & 1 &  The name of the output \\\hline 
+        & \texttt{type} & - & 1 &  The type of the output \\\hline 
+        & \texttt{special} & - & 0-1 & In: \{\texttt{``itk output'', 
+``vtk output''}\} (see below).\\\hline 
+        & \texttt{generic\_type} & c) & 0-1 & The ``generic'' type of the output (see text).\\\hline 
+
+\texttt{<process>} & - & - & 0-1 & The code of the processing method of the box. Must be put between clear tags : \texttt{<PRE></PRE>} \\\hline 
+
+\end{tabular}
+\end{table}
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{xml_tags}
+\bbfy \texttt{xml} tags conditions}
+\small
+\begin{tabular}{|ll|}
+\hline
+a) & \texttt{<blackbox type == ''itkImageToImageFilter''>} \\ \hline
+b) & \texttt{<blackbox type == ''vtkImageAlgorithm'' or ''vtkPolyDataAlgorithm''>} \\ \hline
+c) & \texttt{<blackbox type == ''itkImageToImageFilter''>} and 
+       \texttt{<blackbox generic>} is present. \\ \hline
+\end{tabular}
+\end{table}
+
+
+% ==========================================
+\subsection{\CPP description of a box}
+% ==========================================
+
+TO DO...
+
+Look at the files \texttt{examples/TEMPLATE\_bbPackagenameBoxname.h/cxx}
+and \texttt{examples/TEMPLATE\_bbPackagenameWXBoxname.h/cxx}
+
+%\bibliography{all}
+
+
+
+%\section{Conclusion}
+\end{document}
+
diff --git a/kernel/doc/bbtkUsersGuide/1plus2plus3.fig b/kernel/doc/bbtkUsersGuide/1plus2plus3.fig
new file mode 100644 (file)
index 0000000..30051f1
--- /dev/null
@@ -0,0 +1,39 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        2400 2400 3600 2400 3600 3600 2400 3600 2400 2400
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        4800 2700 6000 2700 6000 3900 4800 3900 4800 2700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        1800 2700 2400 2700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        1800 3300 2400 3300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 4
+       1 1 1.00 60.00 120.00
+        1800 3900 4200 3900 4200 3600 4800 3600
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        6000 3300 6600 3300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        3600 3000 4800 3000
+4 0 0 50 -1 0 16 0.0000 4 165 585 2700 3000 Add a\001
+4 0 0 50 -1 0 16 0.0000 4 165 600 5175 3375 Add b\001
+4 0 0 50 -1 0 16 0.0000 4 165 375 6150 3150 Out\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 4425 2850 In1\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 4425 3450 In2\001
+4 0 0 50 -1 0 16 0.0000 4 165 375 3675 2850 Out\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 2025 2550 In1\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 2025 3150 In2\001
+4 0 0 50 -1 1 16 0.0000 4 165 120 1575 2775 1\001
+4 0 0 50 -1 1 16 0.0000 4 165 120 1575 3375 2\001
+4 0 0 50 -1 1 16 0.0000 4 165 120 1575 3975 3\001
diff --git a/kernel/doc/bbtkUsersGuide/1plus2plus3.png b/kernel/doc/bbtkUsersGuide/1plus2plus3.png
new file mode 100644 (file)
index 0000000..f464de6
Binary files /dev/null and b/kernel/doc/bbtkUsersGuide/1plus2plus3.png differ
diff --git a/kernel/doc/bbtkUsersGuide/Add3.fig b/kernel/doc/bbtkUsersGuide/Add3.fig
new file mode 100644 (file)
index 0000000..734d7dc
--- /dev/null
@@ -0,0 +1,43 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        2400 2400 3600 2400 3600 3600 2400 3600 2400 2400
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        4800 2700 6000 2700 6000 3900 4800 3900 4800 2700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        1200 2700 2400 2700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        1200 3300 2400 3300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 4
+       1 1 1.00 60.00 120.00
+        1200 3900 4200 3900 4200 3600 4800 3600
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        6000 3300 7200 3300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 60.00 120.00
+        3600 3000 4800 3000
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        1875 1725 6600 1725 6600 4200 1875 4200 1875 1725
+4 0 0 50 -1 0 16 0.0000 4 165 585 2700 3000 Add a\001
+4 0 0 50 -1 0 16 0.0000 4 165 600 5175 3375 Add b\001
+4 0 0 50 -1 0 16 0.0000 4 165 375 6150 3150 Out\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 4425 2850 In1\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 4425 3450 In2\001
+4 0 0 50 -1 0 16 0.0000 4 165 375 3675 2850 Out\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 2025 2550 In1\001
+4 0 0 50 -1 0 16 0.0000 4 165 315 2025 3150 In2\001
+4 0 0 50 -1 0 16 0.0000 4 120 120 1275 2550 x\001
+4 0 0 50 -1 0 16 0.0000 4 180 120 1275 3150 y\001
+4 0 0 50 -1 0 16 0.0000 4 120 105 1275 3750 z\001
+4 0 0 50 -1 0 16 0.0000 4 165 555 6825 3150 result\001
+4 0 0 50 -1 0 16 0.0000 4 165 540 3975 2025 Add3\001
diff --git a/kernel/doc/bbtkUsersGuide/Add3.png b/kernel/doc/bbtkUsersGuide/Add3.png
new file mode 100644 (file)
index 0000000..3b8277b
Binary files /dev/null and b/kernel/doc/bbtkUsersGuide/Add3.png differ
diff --git a/kernel/doc/bbtkUsersGuide/CMakeLists.txt b/kernel/doc/bbtkUsersGuide/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..8aae893
--- /dev/null
@@ -0,0 +1,3 @@
+BBTK_DOC_INSTALL_IMAGES(bbtkUsersGuide)
+BBTK_BUILD_LATEX_DOC(bbtkUsersGuide)
+BBTK_BUILD_HTML_DOC_FROM_LATEX(bbtkUsersGuide)
diff --git a/kernel/doc/bbtkUsersGuide/bb-architecture.fig b/kernel/doc/bbtkUsersGuide/bb-architecture.fig
new file mode 100644 (file)
index 0000000..813591e
--- /dev/null
@@ -0,0 +1,64 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 6675 5100 8250 5550
+2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
+        8250 5550 8250 5100 6675 5100 6675 5550 8250 5550
+4 1 0 50 -1 3 16 0.0000 4 165 285 7500 5400 std\001
+-6
+6 5025 9000 7650 9600
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 120.00 120.00
+        5100 9150 5700 9150
+2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 1 0 2
+       1 1 1.00 120.00 120.00
+        5100 9450 5700 9450
+4 0 0 50 -1 0 16 0.0000 4 225 1770 5850 9525 Load dynamically\001
+4 0 0 50 -1 0 16 0.0000 4 225 1215 5850 9225 Link against\001
+-6
+6 3450 5025 4800 5625
+1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 4125 5325 600 225 4125 5325 4725 5550
+4 0 0 50 -1 2 16 0.0000 4 165 345 3975 5400 bbi\001
+-6
+6 3750 5550 5100 6150
+1 1 0 1 0 7 50 -1 -1 0.000 1 0.0000 4425 5850 600 225 4425 5850 5025 6075
+4 1 0 50 -1 2 16 0.0000 4 225 480 4425 5925 bbfy\001
+-6
+6 6900 5625 8475 6075
+2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
+        8475 6075 8475 5625 6900 5625 6900 6075 8475 6075
+4 1 0 50 -1 3 16 0.0000 4 120 285 7725 5925 wx\001
+-6
+1 1 2 1 0 7 50 -1 -1 3.000 1 0.0000 5018 6893 600 225 5018 6893 5618 6893
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        3375 4125 5700 4125 5700 7275 3375 7275 3375 4125
+2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 1 0 2
+       1 1 1.00 120.00 120.00
+        5700 6000 6450 6000
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        3375 7875 9075 7875 9075 8700 3375 8700 3375 7875
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 120.00 120.00
+        4650 7275 4650 7875
+2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+       1 1 1.00 120.00 120.00
+        7800 7275 7800 7875
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+        6450 4125 9075 4125 9075 7275 6450 7275 6450 4125
+2 4 2 1 0 7 50 -1 -1 3.000 0 0 7 0 0 5
+        9000 7125 7425 7125 7425 6675 9000 6675 9000 7125
+4 0 0 50 -1 3 18 0.0000 4 255 1455 3825 4500 Applications\001
+4 1 0 50 -1 3 18 0.0000 4 195 495 6150 8250 bbtk\001
+4 0 0 50 -1 3 18 0.0000 4 255 2355 6600 4500 Black Box Packages\001
+4 0 0 50 -1 0 16 0.0000 4 225 1785 6900 4800 Dynamic libraries\001
+4 0 0 50 -1 2 20 0.0000 4 45 225 7950 6375 ...\001
+4 0 0 50 -1 2 20 0.0000 4 45 225 4650 6375 ...\001
+4 1 0 50 -1 2 16 0.0000 4 225 885 5018 6968 userApp\001
+4 1 0 50 -1 3 16 0.0000 4 210 1260 8250 6975 userPackage\001
+4 0 0 50 -1 0 16 0.0000 4 225 2580 5025 8550 library (static or dynamic)\001
diff --git a/kernel/doc/bbtkUsersGuide/bb-architecture.png b/kernel/doc/bbtkUsersGuide/bb-architecture.png
new file mode 100644 (file)
index 0000000..e54e85f
Binary files /dev/null and b/kernel/doc/bbtkUsersGuide/bb-architecture.png differ
diff --git a/kernel/doc/bbtkUsersGuide/bbtkUsersGuide.tex b/kernel/doc/bbtkUsersGuide/bbtkUsersGuide.tex
new file mode 100644 (file)
index 0000000..fb6e131
--- /dev/null
@@ -0,0 +1,1429 @@
+% ==========================================
+\documentclass[11pt,final,a4paper]{article}
+\input{config.tex}
+\begin{document}
+\title{The Black Box Toolkit\\User's Guide}
+\date{\today}
+\author{Laurent Guigues}
+\maketitle
+% ==========================================
+\tableofcontents
+% ==========================================
+
+
+% ==========================================
+%\section*{Abstract}
+% ==========================================
+\newpage
+% ==========================================
+\hrule
+\section{What is {\bf bbtk} ?}
+% ==========================================
+\BBTK(\bbtkns) is a set of tools 
+(\CPP libraries and executables) 
+providing a \CPP framework for the definition 
+of elementary processing \emph{units}, called {\bf black boxes}, 
+and the definition and execution of processing \emph{chains} 
+made up of these black boxes. 
+
+% ==========================================
+\subsection{The black box philosophy}
+% ==========================================
+\href{http://en.wikipedia.org/wiki/Black_box_\%28disambiguation\%29}{Wikipedia}
+defines a {\bf black box} as 
+\emph{``any component in a system in which only the input and output 
+characteristics are of interest, without regard to its internal mechanism 
+or structure''}. 
+
+\BBTK provides a systematic framework 
+to encapsulate (or ``wrap'') any 
+existing \texttt{C} or \CPP processing code into an object 
+(a black box) having a {\bf generic symbolic interface}, where 
+
+\begin{itemize}
+\item{\bf generic} means that the interface is \emph{the same} 
+for all boxes. Hence one does not need to know which particular 
+method allows, say, to set a particular input or 
+get a particular output of the box. 
+One can use a black box in a purely abstract way. 
+\item{\bf symbolic} means 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 
+attached to a box: description of the box, author, 
+description of its inputs and outputs, etc.
+\end{itemize}
+
+(in fact, genericity is achieved because the interface is symbolic. 
+I let you think about this\dots)
+
+Of course, symbolic data attached to box can be 
+{\bf queried}: what are the inputs/outputs of the box ? 
+what are their type ? description ? etc.
+This allows {\bf automatic documentation} of boxes. 
+
+The abstract definition of black boxes is the most basic 
+aspect of \BBTK architecture. 
+Another key aspect is the groupement of black boxes into 
+so called {\bf packages}, 
+which are \emph{dynamic libraries} which can also 
+be queried, in particular about the boxes they provide. 
+The package structure then offers a mechanism which 
+is like a \emph{'plug-in'} mechanism.
+\BBTK provides the methods to load a package at run-time, 
+and create instances of the boxes it contains. 
+
+These two mechanisms (black boxes and packages) 
+then gives the way to:
+
+\begin{itemize}
+\item The definition of an {\bf interpreted language}, 
+which allows to manipulate packages and boxes very easily in symbolic way. 
+\BBTK provides one: \bbi (the Black Box Interpreter). 
+\item {\bf Automatic documentation} of existing packages. 
+\texttt{html} documentation of packages is proposed by 
+the \bbdoc application.
+\end{itemize}
+
+Finally, these different components allow {\bf efficient}:
+
+\begin{itemize}
+\item {\bf capitalization and reuse} of existing processings, 
+including {\bf documentation} 
+\item {\bf testing, prototyping} in a very simple script language
+\item {\bf inter-operability} between atomic processings which 
+have been written by different persons, using different libraries, etc. 
+\end{itemize}
+
+% ==========================================
+\subsection{\bbtk components}
+% ==========================================
+\BBTK includes:
+\begin{itemize}
+\item A \CPP {\bf\emph{library}} - called \bbtk - which defines a framework 
+(abstract classes) to develop black boxes and to store them into 
+dynamic libraries, called black box \emph{packages}.
+\item Different {\bf\emph{black box packages}}:
+\begin{itemize}
+\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 \texttt{itk} library.
+\item {\bf\emph{vtk}}: the basic image and surfaces processing package, based on the \texttt{vtk} library.
+\item {\bf\emph{wxvtk}}: widget boxes based on the \texttt{vtk} library.
+\item {\bf\emph{itkvtk}}: boxes to convert \texttt{itk} structures into \texttt{vtk} structures and conversally. 
+\end{itemize}
+\item An {\bf\emph{interpreter}}, called \bbi, which allows to 
+load black box packages and to define and execute 
+processing chains by connecting various black boxes of the already loaded packages.
+\item {\bf\emph{Utilities}}:
+\begin{itemize}
+\item \bbfy generates the \CPP code of a black box from a 
+description file written in \texttt{xml}.
+\item \bbdoc generates the html documentation of a black box package 
+(author, description, description of its black boxes: 
+author, description, inputs, outputs, and so on).
+\item \bbCreatePackage creates a directory on disk which contains the basic files to start the development of a new black box package.
+\end{itemize} 
+\end{itemize}
+
+The general architecture of \BBTK 
+is shown in figure \ref{bb-architecture}.
+
+\begin{figure}[!ht]
+\caption{\label{bb-architecture}\BBTK architecture}
+\begin{center}
+\includegraphics[width=0.6\textwidth]{bb-architecture.png}
+\end{center}
+\end{figure}
+
+% ==========================================
+\subsection{Structure of this guide}
+% ==========================================
+
+This guide is divided into two parts. 
+
+The first part (\ref{bbi}) 
+is devoted to the use of the \emph{black box interpreter} \bbi. 
+This is the highest level of use of the toolkit, which 
+allows to create and execute processing chains by connecting 
+black boxes of existing packages. 
+
+The second part (\ref{cpp}) explains how to 
+use the black box toolkit framework in \CPP code, 
+typically to develop large applications which 
+involve complex graphical interfaces.
+
+% ==========================================
+% ==========================================
+% ==========================================
+% ==========================================
+% ==========================================
+% ==========================================
+\vspace{0.5cm}\hrule
+\section{The black box interpreter (bbi)}
+\label{bbi}
+% ==========================================
+
+% ==========================================
+%\subsection{Structure of this part}
+% ==========================================
+
+Using the black box interpreter is very simple. 
+Everything is done with only a few commands.
+The philosophy of this part is also very simple: 
+it introduces the \bbi commands using examples, 
+starting with the most simple commands.  
+The first section of this part 
+(\ref{bbi-getting-started})
+is designed like a tutorial, 
+which progressively introduces all the concepts of \bbi. 
+We suggest you run \bbi and follow the examples, 
+to see how it works in practice. 
+At the end of this section, 
+you will be able to use \bbi and write 
+own black box processing scripts. 
+
+After this tutorial, 
+the section \ref{bbi-more-on} 
+(called \emph{more on...}) 
+goes deeper into various issues of \bbi. 
+Read it at your convenience, 
+either linearly to learn more about \bbi, 
+or in random order to get an answer 
+to a particular question. 
+
+Finally, the section \ref{bbi-reference}
+summarizes all the commands of \bbi, 
+their parameters and effect. 
+Use it as a reference.
+
+% ==========================================
+\subsection{Getting started}
+\label{bbi-getting-started}
+% ==========================================
+\subsubsection{Creating and executing black boxes}
+% ==========================================
+
+To run the black box interpreter, 
+open a console and type \texttt{bbi} 
+or double click on the application icon.
+You get a message and a prompt:
+\begin{verbatim}
+$$ bbi
+BBI (Black Box Interpreter) - bbtk "1.0.0" - (c) Creatis 2007
+>
+\end{verbatim}
+
+If you type:
+\begin{verbatim}
+> help 
+\end{verbatim}
+
+you get the list of the commands of the interpreter:
+\begin{verbatim}
+Available commands:
+ author
+ config
+ connect
+ define
+ delete
+ description
+ endefine
+ exec
+ graph
+ help
+ include
+ input
+ load
+ message
+ new
+ output
+ print
+ quit
+ reset
+ set
+ unload
+\end{verbatim}
+
+To get help on a particular command type \texttt{help <command-name>},
+for example:
+\begin{verbatim}
+> help quit
+\end{verbatim}
+
+gives:
+\begin{verbatim}
+ quit: 
+   usage: quit
+    Quits the program (during script execution it stops the complete execution)
+\end{verbatim}
+
+The \texttt{help} command has multiple usages. 
+It is used to get help on almost anything in \bbi !
+Type \texttt{'help help'} to get help on the \texttt{help} command itself:
+\begin{verbatim}
+> help help
+ usage: 
+         (1) help 
+         (2) help <command name> 
+         (3) help packages [all]
+         (4) help <package name> [all]
+         (5) help <black box type> 
+         (6) help <black box name>
+  Effect:
+         (1) Lists all available commands;
+         (2) Prints help on a particular command; 
+         (3) Lists the packages loaded and their black boxes.
+             Add 'all' to list adaptors; 
+         (4) Prints short help on the black boxes of a package.
+             Add 'all' to include adaptors; 
+         (5) Prints full help on a black box type; 
+         (6) Prints information on the inputs, outputs and connections of a black box instance.
+\end{verbatim}
+
+At start \bbi does not know any black box. 
+If you type \texttt{'help packages'}, which is 
+the third form of the \texttt{help} command, you get:
+\begin{verbatim}
+> help packages
+user
+  workspace
+\end{verbatim}
+
+which means that \bbi only knows one package 
+(library of black boxes) called \texttt{user}
+and which contains a black box called \texttt{workspace}.
+The \texttt{user} package is an internal package to \bbi, 
+which stores user-defined black box types. 
+At start, it already contains 
+one box, called \texttt{workspace}.
+\texttt{workspace} is a special type of black box, 
+called complex black box, whose purpose is 
+to store other black boxes. 
+Any black box you create in \bbi is stored 
+in \texttt{workspace}  
+(this will be explained in details in sections 
+\ref{bbi-writing-scripts} and 
+\ref{bbi-more-on-complex-black-boxes}). 
+
+If you type \texttt{'help workspace'}, you get:
+\begin{verbatim}
+> help workspace
+Complex Black Box <user::workspace>
+ User's workspace
+ By: bbi (internal)
+ * No inputs
+ * No outputs
+ * No boxes
+\end{verbatim}
+
+In the text displayed, 
+the \texttt{user::} prepended to the name \texttt{workspace} 
+means that the box \texttt{workspace} 
+belongs to the \texttt{user} package. 
+Then comes a description and three lines which 
+tell that \texttt{workspace} does not have any input 
+nor output nor boxes yet.
+
+In order to let \bbi know of some black boxes, 
+you must load another package. 
+The \texttt{std} package is the ``standard'' package, 
+which contains basic useful black boxes. 
+
+To load it, type:
+\begin{verbatim}
+> load std
+\end{verbatim}
+
+Then if you type:
+\begin{verbatim}
+> help packages
+\end{verbatim}
+
+you get something like:
+\begin{verbatim}
+std
+  Add 
+  ... 
+user
+  workspace
+> 
+\end{verbatim}
+
+Now \bbi knows the package \texttt{std} and the black boxes it provides,
+such as the \texttt{'Add'} box. 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:  
+\begin{verbatim}
+> help Add
+\end{verbatim}
+
+You get:
+\begin{verbatim}
+Black Box <std::Add>
+ Adds its inputs
+ By: laurent.guigues@creatis.insa-lyon.fr
+ * Inputs: 
+   'In1'         <double>: First number to add
+   'In2'         <double>: Second number to add
+   'ProcessMode' <int>   : Set the process mode of the box (0=Pipeline | 1=Always | 2=Reactive)
+ * Outputs: 
+   'Out'          <double>: Result
+\end{verbatim}
+
+Like previously, 
+the \texttt{std::} prepended to the name \texttt{Add} 
+means that the box \texttt{Add} 
+belongs to the \texttt{std} package. 
+Then comes a description 
+(the one which was provided by the author of the box), 
+the author(s) of the box (usually e-mail adress(es)). 
+Finally comes the lists of inputs and outputs of the box.
+For each input or output, \bbi provides 
+its \emph{name} (between quotes, e.g. \texttt{'ProcessMode'}), 
+its \emph{type} (between \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 make the difference between box \emph{types} 
+and \emph{instances} of box types. 
+The \texttt{Add} box of the package \texttt{std} is in fact 
+a \emph{type} of box, like \texttt{int} is a type of data 
+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 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. 
+
+After the creation of the box \texttt{a}, type:
+\begin{verbatim}
+> help workspace
+\end{verbatim}
+
+you get:
+\begin{verbatim}
+Complex Black Box <user::workspace>
+ User's workspace
+ By: bbi (internal)
+ * No inputs
+ * No outputs
+ * Boxes: 
+    'a' <std::Add>
+\end{verbatim}
+
+which means that \bbi's workspace now contains a black box 
+of type \texttt{std::Add} and name \texttt{a}.
+
+Now look back at the help on \texttt{Add} boxes: 
+you can see that this type of box has two inputs, 
+with name \texttt{In1} and \texttt{In2},
+and an output, with name \texttt{Out}.
+
+You can set the input \texttt{In1} 
+of the \texttt{Add} box \texttt{a} to the value $1$ 
+by the command:
+\begin{verbatim}
+> set a.In1 1 
+\end{verbatim}
+
+Similarly, setting the input \texttt{In2} of \texttt{a} to the value $2$
+is done with:
+\begin{verbatim}
+> set a.In2 2
+\end{verbatim}
+And you print the output \texttt{Out} of the box \texttt{a} with:
+\begin{verbatim}
+> print "result=$a.Out$"
+result=3
+\end{verbatim}
+
+In the string passed to the \texttt{print} command, 
+each substring enclosed between a couple of \$ is considered 
+as the name of an output of a box. 
+To process this special substrings, \bbi does:
+\begin{enumerate}
+\item Processes the box if needed (see below)
+\item Converts the output of the box to a string if possible 
+(see below)
+\item Substitutes the result in the string to print
+\end{enumerate}
+
+Box processing is needed if:
+\begin{itemize}
+\item at least input has changed since last processing or
+\item the input \texttt{'ProcessMode'} of the box is set to 
+\texttt{1}, which forces box reprocessing. 
+\end{itemize}
+
+Note that all boxes have the input \texttt{'ProcessMode'}. 
+
+Another way to process the box \texttt{a} is to issue the command:
+\begin{verbatim}
+> exec a
+\end{verbatim}
+
+however this command does not display anything (except if the 
+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. 
+
+To exit \bbi, type:
+\begin{verbatim}
+> quit
+Good bye !
+\end{verbatim}
+
+% ==========================================
+\hrule
+\paragraph{Summary}
+%\hrule
+\begin{itemize}
+\item The \texttt{load} command allows to load a package.
+\item \texttt{help} gives help on:
+\begin{itemize} 
+\item Available commands if you just type \texttt{help}.
+\item A particular command if you type \texttt{help <command-name>}.
+\item All available packages and their boxes (without description) if you type \texttt{help packages}.
+\item A particular package and its boxes (with brief description) if you type \texttt{help <package-name>}.
+\item A particular black box type (with full description) if you type \texttt{help <box-type-name>}. In particular, \texttt{help workspace} displays information on the content of the \texttt{'workspace'} black box, which stores the boxes created by the user (by \texttt{new}).
+\end{itemize}
+%\item \texttt{list} displays the list of black box instances created so far (by \texttt{new}).
+\item \texttt{new} creates an instance of a black box. 
+\item \texttt{set} sets the value of an input of a black box. 
+\item In all \bbi, to reference the input called \texttt{i} 
+of a black box called \texttt{b} you must type \texttt{'b.i'}. 
+The same syntax holds for outputs.
+\item \texttt{print} prints a string, substituting each substring of the form \$b.o\$ by the value of the output \texttt{o} of the black box \texttt{b}. 
+\item \texttt{exec} runs the process of a box if needed. 
+\item \texttt{quit} quits \bbi.
+\end{itemize}
+\hrule
+% ==========================================
+
+% ==========================================
+\subsubsection{Connecting black boxes}
+\label{bbi-connecting-black-boxes}
+% ==========================================
+
+\BBTK allows to create 
+and execute processing chains, 
+also called \emph{pipelines}, 
+by connecting black boxes.
+This section explains how to do it with examples. 
+Read section \ref{bbi-more-on-pipeline-processing} to get 
+more information on pipeline processing.
+
+First start \bbi and load the package \texttt{std}:
+\begin{verbatim}
+$$ bbi
+BBI (Black Box Interpreter) - bbtk "1.0.0" - (c) Creatis 2007
+> load std
+\end{verbatim}
+
+Assume you want to compute $1+2+3$. You can do it by 
+chaining two \texttt{Add} boxes, as shown in figure 
+\ref{bbi-fig-connecting-black-boxes-1}. 
+
+\begin{figure}[!ht]
+\caption{\label{bbi-fig-connecting-black-boxes-1}
+A simple pipeline which adds 3 numbers}
+\begin{center}
+\includegraphics[width=0.5\textwidth]{1plus2plus3.png}
+\end{center}
+\end{figure}
+
+The \bbi instructions to create and execute this pipeline are:
+\begin{verbatim}
+> new Add a
+> new Add b
+> connect a.Out b.In1
+> set a.In1 1
+> set a.In2 2
+> set b.In2 3
+> print $b.Out$
+6
+\end{verbatim}
+
+The first three commands build the pipeline, 
+the next three set its inputs and the last one 
+executes it and prints its output.
+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:
+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 
+chains of boxes (see \ref{bbi-more-on-pipeline-processing} 
+for details).
+
+Of course, to be able to connect two boxes, 
+the output and the input must be compatibles. 
+You can always connect an output to an input of the \emph{same} type, 
+but you can do more, thanks to particular black boxes called {\bf adaptors}.
+
+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).
+
+In \bbi, if you type:
+\begin{verbatim}
+> load std
+> help std all
+\end{verbatim}
+you get:
+\begin{verbatim}
+ Package std v1.0.0 - laurent.guigues@creatis.insa-lyon.fr
+ Basic useful black boxes
+ Black boxes: 
+   Add                                    : Adds its inputs
+   Cast<double,float>                [DA] : Casts a double into a float
+   Cast<double,int>                  [DA] : Casts a double into a int
+    ... 
+   Convert<unsigned int,string>      [DA] : Converts a unsigned int into a s...
+   Convert<unsigned short,string>    [DA] : Converts a unsigned short into a...
+   Print                                  : Prints its input to standard out...
+>
+\end{verbatim}
+
+The \texttt{Cast<?,?>} and \texttt{Convert<?,?>} boxes are \emph{default adaptors}, which is signaled by the tag \texttt{[DA]} before their descriptions.
+
+Once you have loaded the package \texttt{std}, you can 
+plug an output of type \texttt{char} into an input of type \texttt{double}. 
+When \bbi encounters the \texttt{connect} command, 
+it looks for an adequate \emph{adaptor} in the  loaded packages. 
+In our case, as the package \texttt{std} provides the 
+\texttt{Cast<char,double>} adaptor, \bbi automatically creates an 
+instance of this adaptor and place it \emph{between} 
+the output and the input you want to connect 
+(however this adaptor is hidden to you, 
+it is embedded into the created connection and does not appear 
+as an existing black box). 
+When the pipeline is processed the 
+adaptor converts the output data into the required input type, 
+in a totally transparent way.
+In our example, the \texttt{Cast<char,double>} adaptor 
+would simply cast the value of the \texttt{char} into a \texttt{double}, 
+however arbitrarily complex type conversion can be done.
+
+Question: 
+if two adaptors with the same input and output types exist 
+in the packages loaded, 
+which one is chosen by \bbi at connection ? 
+-> Role of default adaptors
+
+Note that the \texttt{set} and \texttt{print} commands of \bbi 
+work with adaptors from \texttt{string} to the type of the input to set 
+or from the type of the output to print to \texttt{string}. 
+Hence in order to \texttt{set} or \texttt{print} values the adequate 
+adaptors must be available in the packages currently loaded.
+% ==========================================
+\hrule
+\paragraph{Summary}
+%\hrule
+\begin{itemize}
+\item The \texttt{connect} command allows to connect two black boxes
+\item You can connect two black boxes if (and only if): 
+\begin{itemize}
+\item The output and the input are of the same type, or
+\item There is an adaptor black box in the packages loaded which 
+converts data of the output type into data of the input type
+\end{itemize}
+\item \texttt{help <package name>} does not display the adaptors of the package. To see them use: \texttt{help <package name> all}.
+including adaptors
+\end{itemize}
+\hrule
+% ==========================================
+
+% ==========================================
+\subsubsection{Creating complex black boxes}
+\label{bbi-complex-black-boxes}
+% ==========================================
+
+Remember the pipeline of figure 
+\ref{bbi-fig-connecting-black-boxes-1}, which 
+computed the sum of three doubles ?
+You can view 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, 
+as shown in figure \ref{bbi-fig-complex-black-box-1}.
+
+\begin{figure}[!ht]
+\caption{\label{bbi-fig-complex-black-box-1}
+Creating the complex black box \texttt{Add3}}
+\begin{center}
+\includegraphics[width=0.5\textwidth]{Add3.png}
+\end{center}
+\end{figure}
+
+The \bbi commands to define this complex black box are 
+the following:
+
+\begin{verbatim}
+> load std
+>
+> define Add3
+>
+> new Add a
+> new Add b
+> connect a.Out b.In1
+>
+> author "myself"
+> description "adds 3 doubles"
+> input x a.In1 "first double to add"
+> input y a.In2 "second double to add"
+> input z b.In2 "third double to add"
+> output result b.Out "output"
+>
+> endefine
+\end{verbatim}
+
+Explainations:
+
+As we will use \texttt{Add} boxes, we need to load the package \texttt{std}, which is done in first line.
+
+The command \texttt{define} then starts the definition 
+of the complex box type, which will be called \texttt{Add3}. 
+
+The next three lines define the pipeline, 
+exactly in the same way than outside a complex box definition. 
+
+The commands \texttt{author}, \texttt{description}, \texttt{input} 
+and \texttt{output} are commands specific to complex boxes definition:
+
+\texttt{author} and \texttt{description} are used for the documentation 
+of the new box. You can provide multiple \texttt{author} or 
+\texttt{description} commands, the arguments of the commands will 
+be concatenated to produce the final author and description strings.
+
+\texttt{input} and \texttt{output} are used to define the inputs and outputs 
+of the new complex box. 
+Their syntax is the same: for each new input/output you need to say 
+to which internal input/output it corresponds and to provide 
+a help string documenting the input/output.
+In our example, we define that the box \texttt{Add3} has 
+three inputs: \texttt{x}, \texttt{y} and \texttt{z}. 
+The input \texttt{x} corresponds to the input \texttt{In1} of the 
+internal box \texttt{a}. 
+In the same way, the external input \texttt{y} 
+corresponds to the internal input \texttt{a.In2}, and 
+the external input \texttt{In3} to \texttt{b.In2}. 
+The only output of the new box is called \texttt{result}
+and corresponds to \texttt{b.Out}. 
+The figure \ref{bbi-fig-complex-black-box-1} 
+illustrates the external to internal 
+input/output correspondence.
+
+Finally, the \texttt{endefine} command ends the definition of the 
+new box type.
+
+After this definition, if you ask for help 
+on packages, you get:
+\begin{verbatim}
+> help packages
+std
+  Add
+  ...
+user
+  Add3
+  workspace
+\end{verbatim}
+
+The \texttt{user} package now contains a new black box type, called 
+\texttt{Add3}. If you ask for help on this type of box, you get:
+\begin{verbatim}
+> help Add3
+Complex Black Box <user::Add3>
+ adds 3 doubles
+ By: myself
+ * Inputs: 
+    'x'      <double>: first double to add
+    'y'      <double>: second double to add
+    'z'      <double>: third double to add
+ * Outputs: 
+    'result' <double>: output
+ * Boxes: 
+    'a' <std::Add>
+    'b' <std::Add>
+\end{verbatim}
+
+and you can use it like any other box, for example type:
+
+\begin{verbatim}
+> new Add3 a
+> set a.x 1
+> set a.y 2
+> set a.z 3
+> print $a.result$
+6
+\end{verbatim}
+
+
+% ==========================================
+\hrule
+\paragraph{Summary}
+%\hrule
+\begin{itemize}
+\item The \texttt{define/endefine} commands allows to define complex black box types, i.e. types of black boxes made up of other black boxes. 
+Inside a \texttt{define/endefine} block:
+\begin{itemize}
+\item The \texttt{author} and \texttt{description} commands allow to document the new type of box
+\item The \texttt{input} and \texttt{output} commands allow to define the inputs and outputs of the new type of box, that is to which inputs and outputs 
+of internal boxes they correspond.  
+\end{itemize}
+\end{itemize}
+\hrule
+% ==========================================
+
+% ==========================================
+\subsubsection{Writing scripts}
+\label{bbi-writing-scripts}
+% ==========================================
+
+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. 
+Doing this, you start writing \bbi scripts.
+The conventionnal extension for such scripts is \texttt{bbs} 
+(black box script).
+
+For example, the \texttt{Add3} complex box we previously worked on 
+can be defined in the \texttt{Add3.bbs} file:
+
+\begin{file}{Add3.bbs}
+\begin{verbatim}
+# Defines the Add3 black box which adds 3 doubles 
+load std
+
+define Add3
+  # I am the author 
+  author "myself"
+  description "adds 3 doubles"
+  # Pipeline creation
+  new Add a
+  new Add b
+  connect a.Out b.In1
+  # Inputs definition
+  input x a.In1 "first double to add
+  input y a.In2 "second double to add
+  input z b.In2 "third double to add"
+  # Output definition
+  output result b.Out "output"
+endefine
+\end{verbatim}
+\end{file}
+
+Lines starting with a \texttt{\#} character are ignored, they 
+are considered as comments by \bbi.
+To use this file in \bbi, use the \texttt{include} command:
+
+\begin{verbatim}
+> include Add3.bbs
+> help Add3
+Complex Black Box <user::Add3>
+ adds 3 doubles
+ By: myself
+ * Inputs: 
+    'x'      <double>: first double to add
+    'y'      <double>: second double to add
+    'z'      <double>: third double to add
+ * Outputs: 
+    'result' <double>: output
+ * Boxes: 
+    'a' <std::Add>
+    'b' <std::Add>
+>
+and so on ...
+\end{verbatim}
+
+If the file has the \texttt{bbs} extension, you can ommit it and just type:
+\begin{verbatim}
+> include Add3
+\end{verbatim}
+
+Of course, you can include script files in other script files, 
+like in the following example:
+
+\begin{file}{Add4.bbs}
+\begin{verbatim}
+# Defines the Add4 black box which adds 4 doubles 
+include Add3
+
+define Add4
+  author "myself"
+  description "adds 4 doubles"
+  new Add3 a
+  new Add b
+  connect a.Out b.In1
+  input In1 a.In1 "first double to add
+  input In2 a.In2 "second double to add
+  input In3 a.In3 "third double to add"
+  input In4 b.In2 "fourth double to add"
+  output Out b.Out "output"
+endefine
+\end{verbatim}
+\end{file}
+
+TO DO: 
+
+- naming conventions:  one cbb per file with the same name
+- search paths 
+
+% ==========================================
+\hrule
+\paragraph{Summary}
+%\hrule
+\begin{itemize}
+\item The \texttt{include} command allows to include a script file in \bbi.
+\item Lines starting with a \texttt{\#} are treated as comments in \bbi scripts.
+\end{itemize}
+\hrule
+% ==========================================
+
+% ==========================================
+\subsubsection{Creating command line applications}
+\label{bbi-command-line-app}
+% ==========================================
+
+Now that you now how to create complex black boxes 
+(with \texttt{define/endefine}), think 
+back to the \texttt{workspace} object. 
+Remember that it is also 
+a \texttt{complex black box}. 
+In fact what you are doing when you type \bbi commands 
+outside a \texttt{define/endefine} block 
+is to progressively define the \texttt{workspace} 
+complex black box.
+You can think of it like if at start 
+\bbi was issuing a command \texttt{'define workspace'} 
+and then letting you define the interior of the box 
+\texttt{workspace}.
+
+Remember that the command \texttt{inputs} 
+allows to define an input of a complex box. 
+Now, if you use the command \texttt{input} 
+outside a \texttt{define/endefine} block then 
+it defines an input of the \texttt{workspace} box, 
+that is an input of the \emph{main program}. 
+This input will then be connected to the 
+parameters that the user passes to the command line.
+
+For example, consider the script: 
+
+\begin{file}{add.bbs}
+\begin{verbatim}
+load std
+new Add a
+input x a.In1 "first number to add"
+input y a.In2 "second number to add"
+print "x+y=$a.Out$"
+\end{verbatim}
+\end{file}
+
+The third and fourth lines define two inputs \texttt{x} 
+and \texttt{y}. When you execute this script, 
+you can pass these two arguments on the command line, 
+like this:
+
+\begin{verbatim}
+> bbi add x=1 y=1
+x+y=2
+\end{verbatim}
+
+You can also invoke \bbi the option \texttt{-h}, 
+which gives help on the \texttt{workspace} box:
+
+\begin{verbatim}
+> bbi add -h
+ User's workspace
+ By: bbi (internal)
+ * Inputs: 
+    'x' <double>: first number to add
+    'y' <double>: second number to add
+\end{verbatim}
+
+To get a better help, use the \texttt{description} 
+and \texttt{author} commands:
+
+\begin{file}{add.bbs}
+\begin{verbatim}
+description "Adds two numbers"
+author "foo@bar.com"
+load std
+new Add a
+input x a.In1 "first number to add"
+input y a.In2 "second number to add"
+print "x+y=$a.Out$"
+\end{verbatim}
+\end{file}
+
+Now if you ask for help on the \texttt{add} script, you get:
+
+\begin{verbatim}
+> bbi add -h
+ Adds two numbers
+ By: foo@bar.com
+ * Inputs: 
+    'x' <double>: first number to add
+    'y' <double>: second number to add
+\end{verbatim}
+
+Rather than getting the inputs of a script 
+from the command line, you can ask \bbi to 
+prompt the user for the values, using the \texttt{-t}
+commutator:
+
+\begin{verbatim}
+> bbi add -t
+x=[the program waits for user answer]2
+y=[the program waits for user answer]5
+x+y=7
+\end{verbatim}
+
+If \bbi is compiled in graphical mode (with \wx), 
+you can also use the \texttt{-g} commutator. 
+\bbi then prompts the user in graphical mode, 
+displaying a dialog box for each input,
+like in fig. \ref{bb-input-dialog-box}.
+
+\begin{figure}[!ht]
+\caption{\label{bb-input-dialog-box}Input dialog box}
+\begin{center}
+\includegraphics[width=0.6\textwidth]{enter-the-value-of-x.png}
+\end{center}
+\end{figure}
+
+% ==========================================
+\hrule
+\paragraph{Summary}
+%\hrule
+\begin{itemize}
+\item The \texttt{input}, \texttt{description} and \texttt{author} commands,
+when they are used outside a \texttt{define/endefine} block allow 
+to define the inputs, description and author of the main program.
+\item Inputs of the main program can be passed on the command line 
+using the syntax \texttt{<input-name>=<value>}. 
+No white space is allowed, if the value or the input name 
+contains white spaces, enclose them 
+between double quotes, e.g. \texttt{"parameter with white spaces = gnu's not unix"}.
+\item The \texttt{-h} option of \bbi prints help on the main program.
+\item The \texttt{-t} option of \bbi orders the program to prompt for its inputs in text mode.
+\item The \texttt{-g} option of \bbi orders the program to prompt for its inputs in graphical mode.
+\end{itemize}
+\hrule
+% ==========================================
+
+% ==========================================
+\subsubsection{Using graphical interface boxes (widget boxes)}
+\label{bbi-widget}
+% ==========================================
+
+If \bbi is compiled in graphical mode 
+(option \texttt{BUILD\_bbi\_GRAPHICAL} of \cmake, requires \wx),
+then you can use special black boxes which are 
+graphical interface components (widgets). 
+Basic components are provided in the package \texttt{wx}, 
+such as buttons, sliders, file open/save dialogs, etc.
+
+As first example, type the following commands in \bbi:
+\begin{verbatim}
+> load wx 
+> new TextCtrl t
+> print $t.Out$\n
+\end{verbatim}
+
+When you type \texttt{enter} after the last line, 
+a window pops up in which you can entrer a text.
+When you close the window, the text you entered is printed by 
+the \texttt{print} command.
+
+Type \texttt{help wx}, you get something like:
+\begin{verbatim}
+Package wx v1.0.0- eduardo.davila/laurent.guigues@creatis.insa-lyon.fr
+ Basic graphical interface elements (slider, button ...) based on wxWidgets
+ Black boxes: 
+   Button      : Button that gives a string 
+   FileDialog  : FileDialog widget (wxFileDialog)
+   RadioButton : RadioButton group widget (wxRadioButton)  0-9 entries
+   Sizer       : Sizer widget (wxSizer)
+   Slider      : Slider widget (wxSlider)
+   Split       : Split widget (wxSplitterWindow)
+   StaticText  : wxWidget Static text
+   TextCtrl    : TextCtrl widget (wxTextCtrl)
+\end{verbatim}
+
+You can reproduce the same experiment as above using a 
+\texttt{Slider} or a \texttt{FileDialog} rather than a \texttt{TextCtrl}.
+See the files \texttt{test*.bbs} in the \texttt{scripts/test} directory.
+
+There are two kind of widgets: ``terminal'' widgets and ``container'' widgets.
+The \texttt{TextCtrl}, \texttt{FileDialog} or \texttt{Slider} widgets 
+are ``terminal'' widgets. 
+``container'' widgets are of another kind: they are made to 
+contain other widgets in order to build larger dialog boxes. 
+For example, the \texttt{Split} widget is a container which 
+``splits'' horizontally a window into two parts, 
+each part including another widget. 
+The size of the two parts can be adjusted by the user thanks 
+to a ``handle''.
+
+The script \texttt{scripts/test/testSplit.bbs} demonstrate its use. 
+Run it: it displays a window with two sliders. 
+Move the sliders and close the window. 
+The final positions of the sliders are printed out. 
+Now edit the file to see how this is done:
+
+\begin{file}{scripts/test/testSplit.bbs}
+\begin{verbatim}
+load std
+load wx
+
+new Slider s1
+new Slider s2
+
+new Split s
+connect s.Child s1.Parent
+connect s.Child s2.Parent
+
+print s1=$s1.Out$\\n
+print s2=$s2.Out$\\n
+\end{verbatim}
+\end{file}
+
+First, the two sliders \texttt{s1} and \texttt{s2} are created.
+A \texttt{Split} box \texttt{s} is also created. 
+The \texttt{connect} commands then ``includes'' the sliders in the 
+split ``container''. 
+The input \texttt{Parent} is common to all widget boxes: 
+every widget can be inserted into another widget. 
+The output \texttt{Child} is specific of \emph{container} 
+widgets 
+(in \bbi type \texttt{help Slider}: 
+you will see the input \texttt{Parent}; 
+type \texttt{help Split}: 
+you will see the input \texttt{Parent} 
+and the output \texttt{Child}). 
+When you connect the \texttt{Child} output of a container 
+to the \texttt{Parent} input of a widget, 
+you order to include the widget in the container.
+Of course, the order of connection is important. 
+In our case, the slider \texttt{s1} is included first, 
+then the slider \texttt{s2}: \texttt{s1} will be placed 
+on top of \texttt{s2} (the \texttt{Split} box is 
+implemented that way, but this is arbitrary choice).
+
+For the moment, there are only \emph{two} container widgets in the \texttt{wx} package: 
+the \texttt{Split} widget we just described and the \texttt{Sizer} 
+widget, which can have multiple children and 
+divides its window into as much parts as children, 
+each part of equal size. 
+The orientation of the sizer 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). 
+See the script \texttt{test/testSizerSplit.bbs} for an example.
+
+One word about a special widget in the package \texttt{wx}: 
+the \texttt{Button}... to be continued.
+
+
+TO DO: 
+\begin{enumerate}
+\item Make a tour of ``complex'' widgets of wxvtk 
+\item Explain the role of ProcessMode to update widgets
+\item Explain the creation of complex widgets (containers, contained...)
+\item Explain the ``control'' mechanism in bbi (switch exec commands, e.g. Button)
+\end{enumerate}
+
+
+% ==========================================
+\subsection{More on ...}
+\label{bbi-more-on}
+% ==========================================
+
+% ==========================================
+\subsubsection{Black box packages}
+\label{bbi-more-on-packages}
+% ==========================================
+
+% ==========================================
+\subsubsection{Pipeline processing}
+\label{bbi-more-on-pipeline-processing}
+% ==========================================
+
+% ==========================================
+\subsubsection{Complex black boxes}
+\label{bbi-more-on-complex-black-boxes}
+
+%\subsubsection{Advanced issues}
+%\paragraph{Reducing the number of inputs of a box}
+
+% ==========================================
+\subsubsection{Errors}
+\label{bbi-more-on-errors}
+
+% ==========================================
+\subsubsection{\bbtk configuration file and search pathes}
+\label{bbi-more-on-configuration}
+
+At start, \bbi tries to open an \texttt{xml} 
+configuration file named \texttt{bbtk\_config.xml}. 
+The search order is 
+\begin{enumerate}
+\item The current directory
+\item The subdir \texttt{.bbtk} of the user's home directory. 
+\begin{itemize} 
+\item On \texttt{Unix}, the home directory is the
+one stored by the environnement variable \texttt{HOME}, 
+typically \texttt{/home/username}.
+\item On \texttt{Windows}, the home directory is 
+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 
+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}
+\begin{verbatim}
+<?xml version="1.0" encoding="iso-8859-1"?>
+<config>
+  <bbtk_url> http://www.creatis.insa-lyon.fr/software/bbtk </bbtk_url>
+  <bbs_path> </bbs_path>     
+  <package_path> </package_path> 
+  <data_path> </data_path>
+</config>
+\end{verbatim}
+\end{file}
+
+You can add pathes 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>}.
+\end{itemize}
+
+% ==========================================
+\subsection{Language reference}
+\label{bbi-reference}
+% ==========================================
+
+
+
+
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{bbi-reference-box}
+\bbi pipeline creation and execution related commands.}
+\small
+\begin{tabular}{|lcm{6cm}|}
+\hline
+Command & Parameters & Effect \\ \hline
+
+\texttt{new} & \texttt{<boxtype>} \texttt{<box-name>}& 
+Creates a box of type \texttt{boxtype} and name  
+\texttt{box-name}.
+\\ \hline
+
+\texttt{delete} & \texttt{<box-name>} & 
+Destroys the box named \texttt{box-name}.
+\\ \hline 
+
+\texttt{connect} & \texttt{<box1.output>} \texttt{<box2.input>} & 
+Connects the output 
+\texttt{output} of the box named \texttt{box1} 
+to the input \texttt{input} of the box named \texttt{box2} \\ \hline 
+
+\texttt{set} & \texttt{<box.input>} \texttt{<value>} &
+Sets the input \texttt{input} of 
+the box named \texttt{box} to the value \texttt{value}.
+There must exist an \texttt{adaptor} 
+in the packages loaded which converts a \texttt{std::string} 
+to the type of the input \texttt{input}.
+ \\ \hline 
+
+\texttt{print} & \texttt{<string>} & 
+Prints the string after substituting each token of the form \texttt{\$box.output\$} by the adaptation to string of the value of the 
+output \texttt{output} of the box named \texttt{box}. 
+There must exist an \texttt{adaptor} 
+in the packages loaded which converts 
+the type of the output \texttt{output}
+to a \texttt{std::string}.
+\\ \hline 
+
+\texttt{exec} & \texttt{<box-name>} & 
+Executes the box named \texttt{box-name}.
+If needed the boxes 
+connected to its inputs 
+are also processed recursively (pipeline processing).\\ \hline 
+\end{tabular}
+\end{table}
+% ==========================================
+
+
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{bbi-reference-interpreter}\bbi intepreter related commands.}
+\small
+\begin{tabular}{|lcm{6cm}|}
+\hline
+Command & Parameters & Effect \\ \hline
+
+
+\texttt{help} & - & 
+Prints help on available commands \\ \hline 
+
+& \texttt{<command-name>} & 
+Prints help on the command \texttt{command-name} \\ \hline 
+
+& \texttt{packages} & 
+Prints help on available packages and their box types 
+(without description)\\ \hline 
+
+& \texttt{<package-name>} & 
+Prints help on the package \texttt{package-name} and its boxes 
+(with brief description). 
+The package must have been previously loaded
+\\ \hline 
+
+& \texttt{<box-type>} & 
+Prints help (with full description) on the type of box 
+\texttt{box-type}. 
+The box type must belong to a package which has been previously loaded
+\\ \hline 
+
+\texttt{include} & \texttt{<file-name>} & 
+Includes and executes the content of the file named \texttt{file-name} 
+exactly like if you were typing its content at the place were the 
+\texttt{include} command is.
+\\ \hline 
+
+\texttt{load} & \texttt{<package-name>} & 
+Loads the package \texttt{package-name}\\ \hline 
+
+\texttt{unload} & \texttt{<package-name>}& 
+Unloads the package \texttt{package-name}. 
+The package must have been previously loaded. 
+No box of a type defined in this package must still exist.
+\\ \hline 
+
+\texttt{message} & \texttt{<category>} \texttt{<level>} & 
+Sets the level of verbosity of \bbi for the category of messages 
+\texttt{category} to \texttt{level}.
+%See \ref{verbosity}.
+\\ \hline 
+
+\texttt{config} & - & Displays the Configuration parameters\\ \hline 
+
+\texttt{reset} & - & Deletes all boxes and unloads all packages so 
+that \bbi gets back to its initial state \\ \hline 
+
+\texttt{quit} & - & Exits the interpreter\\ \hline 
+
+\end{tabular}
+\end{table}
+% ==========================================
+
+
+
+
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{bbi-reference-complex-box}
+\bbi complex black box definition related commands.}
+\small
+\begin{tabular}{|lcm{6cm}|}
+\hline
+Command & Parameters & Effect \\ \hline
+
+
+\texttt{define} & \texttt{<box-type>} & 
+Starts the definition of a complex black box of type  
+\texttt{box-type}\\ \hline 
+
+\texttt{endefine} & - & 
+Ends the definition of a complex black box type\\ \hline 
+
+
+\texttt{author} & \texttt{<string>} & 
+Sets the author(s) of the complex black box currently being defined \\ \hline 
+
+\texttt{description} & \texttt{<string>} & 
+Sets the description of the complex black box currently being defined 
+\\ \hline 
+
+
+\texttt{input} & \texttt{<name>} \texttt{<box.input>} \texttt{<help>} & 
+Defines a new input for the current complex black box, 
+named \texttt{name}. 
+It is defined as corresponding to 
+the input \texttt{input} of the box \texttt{box}. 
+\texttt{<help>} is the help string for the new input.
+The box \texttt{box} must already have been created in the complex box 
+and of course have an input named \texttt{input}.
+\\ \hline 
+
+
+\texttt{output} & \texttt{<name>} \texttt{<box.output>} \texttt{<help>} & 
+Defines a new output for the current complex black box, 
+named \texttt{name}. 
+It is defined as corresponding to 
+the output \texttt{output} of the box \texttt{box}. 
+\texttt{<help>} is the help string for the new output.
+The box \texttt{box} must already have been created in the complex box and of course have an output named \texttt{output}. 
+\\ \hline 
+
+
+\end{tabular}
+\end{table}
+% ==========================================
+
+
+
+
+% ==========================================
+\vspace{0.5cm}\hrule
+\section{Using black boxes in \CPP programs}
+\label{cpp}
+% ==========================================
+
+
+
+
+%\bibliography{all}
+
+
+
+%\section{Conclusion}
+\end{document}
+
diff --git a/kernel/doc/bbtkUsersGuide/enter-the-value-of-x.png b/kernel/doc/bbtkUsersGuide/enter-the-value-of-x.png
new file mode 100644 (file)
index 0000000..8956fd3
Binary files /dev/null and b/kernel/doc/bbtkUsersGuide/enter-the-value-of-x.png differ
diff --git a/kernel/doc/bbtkWebSite/CMakeLists.txt b/kernel/doc/bbtkWebSite/CMakeLists.txt
new file mode 100644 (file)
index 0000000..dd6bb90
--- /dev/null
@@ -0,0 +1,30 @@
+
+BBTK_DOC_INSTALL_IMAGES(bbtkWebSite)
+
+#FILE(GLOB PNG_IMAGES "." "*.png")
+#FOREACH(image ${PNG_IMAGES})  
+#  GET_FILENAME_COMPONENT(filename "${image}" NAME)
+#  CONFIGURE_FILE(
+#    ${image}
+#    ${CMAKE_CURRENT_BINARY_DIR}/${filename}
+#    COPYONLY
+#    )
+#ENDFOREACH(image)
+
+# Configure for build tree and install 
+FILE(GLOB HTML_PAGES "." "*.html")
+FOREACH(page ${HTML_PAGES})  
+  GET_FILENAME_COMPONENT(filename "${page}" NAME)
+  CONFIGURE_FILE(
+    ${page}
+    ${CMAKE_CURRENT_BINARY_DIR}/${filename}
+    @ONLY
+    )
+  # Install
+  INSTALL(
+    FILES ${CMAKE_CURRENT_BINARY_DIR}/${filename}
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/${BBTK_DOC_INSTALL_PATH}/bbtkWebSite
+    )
+ENDFOREACH(page)
+
+
diff --git a/kernel/doc/bbtkWebSite/download.html b/kernel/doc/bbtkWebSite/download.html
new file mode 100644 (file)
index 0000000..0ef0c56
--- /dev/null
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>Download</title>
+</head>
+<body>
+<div style="text-align: center; font-weight: bold;"><big><big><big>Download<br>
+<span style="text-decoration: underline;"></span></big></big></big><br>
+<ol style="text-align: left;" id="mozToc">
+<!--mozToc h1 1 h2 2 h3 3 h4 4 h5 5 h6 6-->
+  <li><a href="#mozTocId715649">Get the latest stable release</a></li>
+  <li><a href="#mozTocId152913">Get the current sources from
+cvs repository</a>
+    <ol>
+      <li><a href="#mozTocId15332">Linux</a></li>
+      <li><a href="#mozTocId668026">Windows with TortoiseCVS </a></li>
+    </ol>
+  </li>
+</ol>
+<br>
+<div style="text-align: left;">
+<hr style="width: 100%; height: 2px;"><span
+ style="text-decoration: underline;"></span></div>
+<big><big><big></big></big></big>
+<div style="text-align: left;">
+<h1><a class="mozTocH1" name="mozTocId715649"></a><big><big><big><span
+ style="text-decoration: underline;"></span></big></big></big>Get the
+latest stable release</h1>
+<ul>
+  <li>Beta version 0.5.0 : <a href="bbtk_r0_5_0.tgz">tgz</a> <a
+ href="bbtk_r0_5_0.zip">zip</a> - New widget framework. Hope this is the first 'user level' stable version <br>
+  </li>
+  <li>Beta version 0.3.0 : <a href="bbtk_r0_3_0.tgz">tgz</a> <a
+ href="bbtk_r0_3_0.zip">zip</a><br>
+  </li>
+  <li>Beta version 0.2.0 : <a href="bbtk_r0_2_0.tgz">tgz</a> <a
+ href="bbtk_r0_2_0.zip">zip</a><br>
+  </li>
+  <li>Beta version 0.1.0 : <a href="bbtk_r11oct2007.tgz">tgz</a>
+&nbsp;<a href="bbtk_r11oct2007.zip">zip</a> <br>
+  </li>
+</ul>
+</div>
+<div style="text-align: left;">
+<hr style="width: 100%; height: 2px;">
+<h1><a class="mozTocH1" name="mozTocId152913"></a>Get the current
+sources from
+cvs repository</h1>
+<h2><a class="mozTocH2" name="mozTocId15332"></a>Linux</h2>
+<span style="font-weight: normal;">&nbsp;&nbsp;&nbsp; </span><big
+ style="font-weight: normal;">&nbsp;&nbsp;&nbsp; <small>&gt; cvs co -d
+:ext:username@cvs.creatis.insa-lyon.fr:/cvs/creatis bbtk</small></big><small><br>
+</small>
+<h2><a class="mozTocH2" name="mozTocId668026"></a><small><a
+ style="font-weight: normal;" class="mozTocH2" name="mozTocId530293"></a></small>Windows
+with TortoiseCVS<br style="font-weight: bold;">
+</h2>
+<big style="font-weight: bold;"><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></big><big
+ style="font-weight: bold;"><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></big>
+<ol style="font-weight: bold;">
+  <small> </small>
+  <li><big><big><small><small><span style="font-weight: normal;">Login
+with your public/private ssh key (Suggested program for
+windows is Putty)</span></small></small></big></big></li>
+  <small> </small>
+  <li><big><big><small><small><span style="font-weight: normal;">Right
+clic over the folder C:\Creatis and select "import CVS module" in the
+menu</span></small></small></big></big></li>
+  <small> </small>
+  <li style="font-weight: normal;">Select the options : </li>
+  <small></small>
+</ol>
+<big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+- Server: cvs.creatis.insa-lyon.fr</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+- Module root folder: /cvs/creatis</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+- User name: The one used in email login</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+- Clic on find the list of modules</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+- Select the "bbtk" module</span></small></small></big></big><small><small><span
+ style="font-weight: bold;">
+</span></small></small><br>
+</div>
+</div>
+</body>
+</html>
diff --git a/kernel/doc/bbtkWebSite/home.html b/kernel/doc/bbtkWebSite/home.html
new file mode 100644 (file)
index 0000000..dbd3282
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>Home</title>
+</head>
+<body>
+<div style="text-align: center;"><big><big><big><span
+ style="font-weight: bold;">The Black Box Toolkit<br>
+</span></big></big></big>
+<div style="text-align: left;"><big><br>
+</big><a
+ href="http://en.wikipedia.org/wiki/Black_box_%28disambiguation%29">Wikipedia</a>
+defines a <b>black box</b> as <em>"any component in a system in which
+only the input and output characteristics are of interest, without
+regard to its internal mechanism or structure"</em>.
+<div class="p"><!---->The <b>Black Box Toolkit</b> (<tt>bbtk</tt>) is
+a set of tools (<tt>C++</tt> libraries and executables) providing a <tt>C++</tt>
+framework for the definition of elementary processing <em>units</em>,
+called <b>black boxes</b>, and the definition and execution of
+processing <em>chains</em> made up of these black boxes.</div>
+<br>
+<big><big><big><span style="font-weight: bold;"></span></big></big></big></div>
+</div>
+</body>
+</html>
diff --git a/kernel/doc/bbtkWebSite/install.html b/kernel/doc/bbtkWebSite/install.html
new file mode 100644 (file)
index 0000000..f6ba93d
--- /dev/null
@@ -0,0 +1,840 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=ISO-8859-1"
+ http-equiv="content-type">
+  <title>Install</title>
+</head>
+<body>
+<div style="text-align: center; font-weight: bold;"><big><big><big><small></small></big></big></big>
+<div style="text-align: left;">
+<div style="text-align: center;"><big><big style="font-weight: normal;"><big><big>Install</big></big></big></big><br>
+<div style="text-align: left;">
+<ol id="mozToc">
+<!--mozToc h1 1 h2 2 h3 3 h4 4 h5 5 h6 6-->
+  <li><a href="#mozTocId820435">Linux</a>
+    <ol>
+      <li><a href="#mozTocId745245">Requirements</a></li>
+      <li><a href="#mozTocId775505">Known working configurations</a></li>
+      <li><a href="#mozTocId410988">Install from sources</a></li>
+    </ol>
+  </li>
+  <li><a href="#mozTocId777026">Windows </a>
+    <ol>
+      <li><a href="#mozTocId761363">Requirements</a></li>
+      <li><a href="#mozTocId681503">Known working configurations</a></li>
+      <li><a href="#mozTocId618885">Steps </a></li>
+    </ol>
+  </li>
+  <li><a href="#mozTocId915759">CMake build options</a></li>
+</ol>
+<hr style="width: 100%; height: 2px;"></div>
+</div>
+<h1><a class="mozTocH2" name="mozTocId820435"></a><big><big><big><small><small><span
+ style="font-weight: normal;">Linux</span></small></small></big></big></big></h1>
+<h2><a class="mozTocH3" name="mozTocId745245"></a><big><big><big><small><small><span
+ style="font-weight: normal;">Requirements</span></small></small></big></big></big></h2>
+<ul>
+  <li><span style="font-weight: normal;">cmake &gt;= 2.4.6</span></li>
+  <ul>
+    <ul>
+      <li><span style="font-weight: normal;"><a
+ href="http://www.cmake.org/HTML/Download.html">http://www.cmake.org/HTML/Download.html</a><br>
+        </span></li>
+    </ul>
+  </ul>
+  <li><span style="font-weight: normal;">optional : <br>
+    </span></li>
+  <ul>
+    <li><span style="font-weight: normal;">wxWidgets&nbsp; &gt;= &nbsp;
+2.6.3<br>
+      </span></li>
+    <ul>
+      <li><span style="font-weight: normal;">yum install wxGTK-devel
+(fedora extras repos)<br>
+        </span></li>
+    </ul>
+    <li><span style="font-weight: normal;">L<sub>a</sub>T<sub>e</sub>X
+to generate the pdf doc</span><br>
+      <span style="font-weight: normal;"></span></li>
+    <li><span style="font-weight: normal;">tth to generate the html doc</span></li>
+    <ul>
+      <li><span style="font-weight: normal;"><a
+ href="http://hutchinson.belmont.ma.us/tth/">http://hutchinson.belmont.ma.us/tth/</a><br>
+        </span></li>
+    </ul>
+    <li><span style="font-weight: normal;">itk to compile packages itk,
+itkvtk</span></li>
+    <ul>
+      <li><span style="font-weight: normal;">yum install
+InsightToolkit-devel (creatis repos)<br>
+        </span></li>
+    </ul>
+    <li><span style="font-weight: normal;">vtk to compile package vtk,
+wxvtk</span></li>
+    <ul>
+      <li><span style="font-weight: normal;">yum Install vtk-devel
+(fedora extras repos)</span><big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></big></li>
+      <li style="font-weight: bold;"><big><big><small><small><span
+ style="font-weight: normal;">Patches needed:</span></small></small></big></big></li>
+      <ul>
+        <li style="font-weight: bold;"><big><big><small><small><span
+ style="font-weight: normal;">problem with
+/usr/lib/vtk-5.0/VTKConfig.cmake : </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">had
+to change line 9: SET(VTK_INSTALL_PREFIX "${VTK_DIR}") by
+SET(VTK_INSTALL_PREFIX "") to be compatible with
+CMake/Modules/FindVTK.cmake</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+        <li style="font-weight: bold;"><big><big><small><small><span
+ style="font-weight: normal;">add /usr/local/lib in /etc/ld.so.conf or
+set LD_LIBRARY_PATH</span></small></small></big></big></li>
+      </ul>
+    </ul>
+  </ul>
+</ul>
+<big><big><big><small><small></small></small></big></big></big>
+<h2><a class="mozTocH3" name="mozTocId775505"></a><big><big><big><small><small><span
+ style="font-weight: normal;">Known working configurations</span></small></small></big></big></big></h2>
+<big><big><big><small><small><span style="font-weight: normal;">&nbsp;<small>
+- gcc: </small></span></small></small></big></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; 4.0.2 20051125 (Red Hat 4.0.2-8)</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; 4.1.1 20070105 (Red Hat 4.1.1-51)</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+4.1.2 20070626 (Red Hat 4.1.2-13)<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 4.2.0 (OpenSuse 10.3)<br
+ style="font-weight: normal;">
+</span></small></small></big></big><small></small><big><big><small><small><span
+ style="font-weight: normal;">&nbsp;&nbsp;
+- cmake: </span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; 2.4-patch 6</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- wxGTK-devel: </span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+2.6.3</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+2.8</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- InsightToolkit:</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; 2.8.1-5</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; 3.2</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; 3.4</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- vtk:</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp; 5.0.3-1</span></small></small></big></big><big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></big><br>
+<h2><a class="mozTocH3" name="mozTocId410988"></a><big><span
+ style="font-weight: normal;">Install from sources<span
+ style="font-weight: bold;"></span></span></big></h2>
+<span style="font-weight: normal;">&nbsp;&nbsp;&nbsp; Uncompress the
+archive or checkout the source from the cvs repository (see <a
+ href="download.html">Download page</a>).<br>
+&nbsp;&nbsp;&nbsp; In the parent folder of the bbtk sources type :<br>
+&nbsp;&nbsp;&nbsp; &gt; mkdir bbtkbin; cd bbtkbin<br>
+&nbsp;&nbsp;&nbsp; &gt; ccmake ../bbtk<br>
+&nbsp;&nbsp;&nbsp; <span style="font-style: italic;">Check the desired
+options. See </span><a style="font-style: italic;"
+ href="#mozTocId915759">CMake build options</a><span
+ style="font-style: italic;"> for a description. </span><br>
+<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; Type 'c' many
+times then 'g'.</span><br>
+&nbsp;&nbsp;&nbsp; &gt; make<br>
+&nbsp;&nbsp;&nbsp; &gt; make install<br>
+&nbsp;&nbsp; Enjoy !<br>
+<br>
+</span>
+<hr style="width: 100%; height: 2px;">
+<h1><a class="mozTocH2" name="mozTocId777026"></a><big><big><big><small><small><span
+ style="font-weight: normal;">Windows </span></small></small></big></big></big></h1>
+<big><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big></big>
+<h2><a class="mozTocH3" name="mozTocId761363"></a><big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></big><big><big><big><small><small><span
+ style="font-weight: normal;">Requirements</span></small></small></big></big></big></h2>
+<h3>Mandatory</h3>
+<ul>
+  <li><big><span style="font-weight: normal;">.net </span></big><br>
+    <big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/win/cmake-2.4.6-win32-x86.exe">CMake
+2.4 patch 6</a></span></small></small></big></big><big
+ style="font-weight: normal;"><big><big><small><small><small> to
+generate the project file for .net</small><br>
+    </small></small></big></big></big></li>
+</ul>
+<h3><big><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big></big>Optional</h3>
+<ul>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/win/TortoiseCVS-1.8.31.exe">TortoiseVCS</a> (Direct CVS
+tool within Explorer) and </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"><a
+ href="http://www.creatis.insa-lyon.fr/mywiki/SSH">Putty</a> (Telnet
+and SSH client) to get the sources from the cvs module</span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/wxWidgets-2.8.5.zip">wxWidgets-2.8.5</a> (sources) to
+build graphical interface boxes<br>
+    </span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/vtk-5.0.3.tar.gz">VTK
+5.0.3 source</a> (VTK 5.0.3 source code) to build vtk boxes (and if you
+want :&nbsp; </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"><a href="download/vtkdata-5.0.3.tar.gz">VTK
+5.0.3 data</a> (VTK 5.0.3 data folder) and </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"><a href="download/vtkDocHtml-5.0.3.tar.gz">VTK
+5.0.3 documentation</a> (VTK 5.0.3 html documentation))</span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/InsightToolkit-3.4.0.tar.gz">InsightToolkit-3.4.0</a>
+to build itk boxes</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/win/basic-miktex-2.6.2742.exe">Miktex</a> (TeX compiler
+and TeX-Pdf
+translation tool) to build documentations</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/win/tth_exe.zip">TTH</a>&nbsp;(TeX to HTML translation
+tool) to build html documentations</span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/win/doxygen-1.5.3-setup.exe">Doxygen</a> to build the
+code documentations</span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"><a
+ href="download/win/graphviz-2.2.1.exe">Graphviz</a> to generate the
+graphs in doxygen doc and black box pipelines graphs</span></small></small></big></big>&nbsp;&nbsp;
+    <br>
+  </li>
+</ul>
+<big><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big></big>
+<h2><a class="mozTocH2" name="mozTocId681503"></a><big><big><big><small><small><span
+ style="font-weight: normal;">Known working configurations</span></small></small></big></big></big></h2>
+<ul style="font-weight: bold;">
+  <li><big><big><small><small><span style="font-weight: normal;">.net
+????<br>
+    </span></small></small></big></big></li>
+  <li><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">cmake</span></small></small></big></big></li>
+  <ul>
+    <li><big><big><small><small><span style="font-weight: normal;">2.4
+patch 6</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+  </ul>
+  <li><big><big><small><small><span style="font-weight: normal;">wxWidgets</span></small></small></big></big></li>
+  <ul>
+    <li><big><big><small><small><span style="font-weight: normal;">2.8.5</span></small></small></big></big></li>
+  </ul>
+  <li><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">InsightToolkit</span></small></small></big></big></li>
+  <ul>
+    <li><big style="font-weight: normal;"><big><small><small><span
+ style="font-weight: normal;">3.4.0</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+  </ul>
+  <li><big><big><small><small><span style="font-weight: normal;">vtk</span></small></small></big></big></li>
+  <ul>
+    <li><big><big><small><small><span style="font-weight: normal;">5.0.3</span></small></small></big></big><small><span
+ style="font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+      </span></small><br>
+    </li>
+  </ul>
+</ul>
+<big><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big></big>
+<h2><a class="mozTocH2" name="mozTocId618885"></a><big><big><big><small><small><span
+ style="font-weight: normal;">Steps<br>
+</span></small></small></big></big></big></h2>
+<big><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big></big>
+<ul>
+  <li><big><big><small><small><span style="font-weight: normal;">Download
+the required files listed before.</span></small></small></big></big></li>
+</ul>
+<ul>
+  <li><big><big><small><small><span style="font-weight: normal;">CMAKE
+2.4.6</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+</ul>
+<big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"> 1.
+Uninstall previous versions of CMake (if any)</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">2.
+Double clic on the installation file cmake-2.4.6-win32-x86.exe</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big>
+<ul>
+  <li><big><big><small><small><span style="font-weight: normal;">Install
+VTK 5.0.3</span></small></small></big></big></li>
+</ul>
+<big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"> 1.
+Decompress in C:\Creatis\VTK5.0.3, each one in a separate
+folder, the
+files </span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- vtkdata-5.0.3.tar.gz<br>
+&nbsp;&nbsp; - vtkDocHtml-5.0.3.tar.gz<br>
+&nbsp;&nbsp; - basic-miktex-2.6.2742.exe.</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">2.
+Create the project of VTK5.0.3 in CMake with:</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- Binary folder C:\Creatis\VTK5.0.3Bin</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- Configuration:</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;
+</span></small></small></big></big><small><small
+ style="font-weight: bold;"><small><span style="font-weight: normal;"></span></small></small><span
+ style="font-weight: bold;">BUILD_SHARED_LIBS --&gt; ON</span><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;&nbsp;&nbsp;
+If you want to compile the examples set: </span></small></small></big></big><small><small
+ style="font-weight: bold;"><small><span style="font-weight: normal;"></span></small></small><span
+ style="font-weight: bold;">BUILD_EXAMPLES&nbsp; --&gt; ON</span><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- Check that the VTK_DATA_ROOT variable at CMake is
+C:\Creatis\VTK5.0.3\VTKData</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">&nbsp;&nbsp;
+- Clic configure once again and create (ok) the project</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;">3.
+Open
+the created VTK project at C:\Creatis\VTK5.0.3Bin\VTK.sln and build the
+entire solution</span></small></small></big></big><small><br
+ style="font-weight: normal;">
+</small><big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big>
+<ul>
+  <li><big><big><small><small><span style="font-weight: normal;"> TTH</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"> : Decompress </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">the file tth_exe.zip</span></small></small></big></big><small>
+    </small><big><big><small><small><span style="font-weight: normal;">in
+C:\Creatis\tth_exe </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big><br>
+  </li>
+</ul>
+<big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big>
+<ul>
+  <li><big><big><small><small><span style="font-weight: normal;">MikTeX</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"> : Double clic on the installation file
+basic-miktex-2.6.2742.exe (it is
+not necessary to change the default installation path)</span></small></small></big></big><br
+ style="font-weight: normal;">
+  </li>
+</ul>
+<small></small>
+<ul>
+  <li><big><big><small><small><span style="font-weight: normal;">BBTK</span></small></small></big></big></li>
+</ul>
+<big><big><small><small><span style="font-weight: normal;"></span></small></small></big></big>
+<ul>
+  <ul>
+    <li><big><big><small><small><span style="font-weight: normal;">Uncompress
+the sources in C:\Creatis\bbtk or checkout the source from the cvs </span></small></small></big></big><span
+ style="font-weight: normal;">(see <a href="download.html">Download
+page</a>).</span></li>
+    <li><big><big><small><small><span style="font-weight: normal;">Create
+the build folder </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">C:\Creatis\bbtkBin</span></small></small></big></big><span
+ style="font-weight: normal;"></span></li>
+    <li><span style="font-weight: normal;">Drag and drop the file
+C:\Creatis\bbtk\CMakeLists.txt on the CMakeSetup icon</span><big
+ style="font-weight: bold;"><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+    <ul>
+      <li><big style="font-weight: bold;"><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big><span
+ style="font-weight: normal;">Check the desired
+options for the build. See </span><a style="font-weight: normal;"
+ href="install.html#mozTocId915759">CMake build options</a><span
+ style="font-weight: normal;"> for a description.</span><span
+ style="font-weight: normal;"></span></li>
+      <li><span style="font-weight: normal;">If
+you want to build with vtk :</span><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+      <ul>
+        <li><big><big><small><small><span style="font-weight: normal;">Enable
+Show Advanced Values</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+        <li><big><big><small><small><span style="font-weight: normal;">Clic
+configure twice and check that the VTK_DIR variable at CMake
+is C:/Creatis/VTK5.0.3Bin</span></small></small></big></big></li>
+        <li><big><big><small><small><span style="font-weight: normal;">Clic
+configure one more time</span></small></small></big></big></li>
+      </ul>
+      <li><big><big><small><small><span style="font-weight: normal;">If
+you want to build with itk :</span></small></small></big></big></li>
+      <ul>
+        <li><big><big><small><small><span style="font-weight: normal;">Enable
+Show Advanced Values</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+      </ul>
+      <ul>
+        <li><big><big><small><small><span style="font-weight: normal;">Clic
+configure twice and check that the ITK_DIR variable at CMake
+is C:/Creatis/InsightToolkitBin</span></small></small></big></big></li>
+      </ul>
+      <ul>
+        <li><big><big><small><small><span style="font-weight: normal;">Clic
+configure one more time</span></small></small></big></big></li>
+      </ul>
+      <li><big><big><small><small><span style="font-weight: normal;">Clic
+configure many times and create the project </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"> (click ok).</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+    </ul>
+    <li><big><big><small><small><span style="font-weight: normal;"><span
+ style="font-weight: bold;">To build with WxWidgets</span> : Copy
+the debug dll files like wxbase26d_&lt;LIBRARY_NAME&gt;*.dll from
+wxWidgets to the bbtk binaries directory.&nbsp; Example : copy </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">C:\Creatis\wxWidgets-2.6.3\wxWidgets-2.6.3\lib\vc_dll
+      </span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">to: C:\Creatis\bbtkBin\bin\debug</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+    <li><big><big><small><small><span style="font-weight: normal;"><span
+ style="font-weight: bold;">To build with VTK</span> : Copy
+all the debug dll files from VTK5.0.3 to the bbtk binaries directory.
+Example : copy</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"> all files in
+C:\Creatis\VTK5.0.3Bin\bin\debug to</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;">: C:\Creatis\bbtkBin\bin\debug</span></small></small></big></big></li>
+    <li><big><big><small><small><span style="font-weight: normal;">To
+build with ITK : ...</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+    <li><big><big><small><small><span style="font-weight: normal;">Open
+the solution created by cmake : C:\Creatis\bbtkBin\BBTK.sln and build
+the entire solution.</span></small></small></big></big></li>
+    <ul>
+      <li><big><big><small><small><span style="font-weight: normal;">If
+you get dll error messages close the message(s) and after it's
+done, rebuild the complete solution.</span></small></small></big></big><big><big><small><small><span
+ style="font-weight: normal;"></span></small></small></big></big></li>
+      <li><big><big><small><small><span style="font-weight: normal;">If
+you get package intallation messages for missing and required
+files like <span style="font-style: italic;">fileName.sty</span>,
+install them all.</span></small></small></big></big></li>
+      <li style="font-weight: normal;">The packages correspond to
+on-line complements that the MikTex program
+needs to build the BBTK documentation.</li>
+    </ul>
+  </ul>
+</ul>
+Enjoy !<br>
+</div>
+<div style="text-align: left;">
+<hr style="width: 100%; height: 2px;"></div>
+<div style="text-align: left;">
+<h1><a class="mozTocH1" name="mozTocId915759"></a>CMake build options</h1>
+<span style="font-weight: normal;">The options in grey only appear if
+the last non grey option is set to
+ON (e.g. itk_IMAGE_DIM_2 and the following ones in grey only appear if
+BUILD_PACKAGE_itk is ON).</span><br style="font-weight: normal;">
+<span style="font-weight: normal;">Advanced options are not shown
+here... </span><br>
+<br>
+<table border="1" cellpadding="2" cellspacing="2" width="100%">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top;"><span style="font-weight: bold;">Option</span><br>
+      </td>
+      <td style="vertical-align: top;"><span style="font-weight: bold;">Explaination</span><br>
+      </td>
+      <td style="vertical-align: top;"><span style="font-weight: bold;">Default</span></td>
+    </tr>
+    <tr>
+      <td>ALL_BUILD<br>
+      </td>
+      <td>Set to ON to build all the components of the toolkit<br>
+      </td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BBTK_DATA_ROOT<br>
+      </td>
+      <td>Enter the path to the bbtk_data folder (will be written in
+the default bbtk_config.xml file)<br>
+      </td>
+      <td style="vertical-align: top;">-<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_APPLICATIONS<br>
+      </td>
+      <td> Set to ON to build bbtk applications : interpreter
+(bbi), xml to C++ code (bbfy), package documentation (bbdoc)</td>
+      <td style="vertical-align: top;">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+BUILD_bbi_GRAPHICAL<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to build bbi in graphical mode allowing to use widget boxes
+(requires wxWidgets) <br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_EXAMPLES<br>
+      </td>
+      <td>Set to ON to build the C++ examples</td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_PACKAGE_itk<br>
+      </td>
+      <td>Set to ON to build the package itk (requires the
+InsightToolkit installed)<br>
+      </td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_DIM_2<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of dimension 2<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_DIM_3</td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of dimension 3<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_DIM_4 </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of dimension 4<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_CHAR<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type char <br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_DOUBLE</td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type double<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_FLOAT<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type float<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_INT<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type int<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_SHORT<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type short<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_UCHAR<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type unsigned char<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_UINT<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type unsigned int<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+itk_IMAGE_TYPE_USHORT<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">Set
+to ON to compile itk images of type unsigned short<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_PACKAGE_itkvtk<br>
+      </td>
+      <td>Set to ON to build the package itkvtk (requires the
+InsightToolkit and VTK installed)</td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_PACKAGE_std<br>
+      </td>
+      <td>Set to ON to build the package std<br>
+      </td>
+      <td style="vertical-align: top;">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_PACKAGE_vtk<br>
+      </td>
+      <td>Set to ON to build the package vtk (requires VTK installed)</td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_PACKAGE_wx<br>
+      </td>
+      <td>Set to ON to build the package wx (requires wxWidgets
+installed)</td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_PACKAGE_wxvtk<br>
+      </td>
+      <td> Set to ON to build the package wxvtk (requires VTK and
+wxWidgets installed)</td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_SHARED_LIBS<br>
+      </td>
+      <td> Set to ON to build bbtk as a shared library (.so/.dll) -
+Remark that packages as always build as such<br>
+      </td>
+      <td style="vertical-align: top;">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td>BUILD_bbtk_DOC<br>
+      </td>
+      <td> Set to ON to build documentations<br>
+      </td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+BUILD_bbtk_DOC_DOXYGEN<br>
+      </td>
+      <td style="background-color: rgb(204, 204, 204);"> Set to ON to
+build doxygen documentation of bbtk and of the selected packages<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+BUILD_bbtk_DOC_GUIDES_HTML<br>
+      </td>
+      <td style="background-color: rgb(204, 204, 204);"> Set to ON to
+build bbtk Users' guide, Package developers' guide and Developers'
+guide in html format (requires LaTeX and tth)<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+BUILD_bbtk_DOC_GUIDES_PDF<br>
+      </td>
+      <td style="background-color: rgb(204, 204, 204);"> Set to ON to
+build bbtk Users' guide, Package developers' guide and
+Developers' guide in pdf format (requires LaTeX)</td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="background-color: rgb(204, 204, 204);">&nbsp;&nbsp;
+BUILD_bbtk_DOC_PACKAGE<br>
+      </td>
+      <td style="background-color: rgb(204, 204, 204);"> Set to ON to
+generate the packages html doc with bbdoc<br>
+      </td>
+      <td
+ style="vertical-align: top; background-color: rgb(204, 204, 204);">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td>CMAKE_BUILD_TYPE<br>
+      </td>
+      <td>Set to "Debug" or "Release" <br>
+      </td>
+      <td style="vertical-align: top;">-<br>
+      </td>
+    </tr>
+    <tr>
+      <td>CMAKE_INSTALL_PREFIX<br>
+      </td>
+      <td> Set the install location<br>
+      </td>
+      <td style="vertical-align: top;">/usr/local<br>
+      </td>
+    </tr>
+    <tr>
+      <td>GENERATE_RPMBUILD_SPEC<br>
+      </td>
+      <td> Set to ON to create a .spec file to generate a rpm with
+rpmbuild <br>
+      </td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>USE_CONFIGURATION_FILE<br>
+      </td>
+      <td> Set to ON to use the configuration file (bbtk_config.xml) in
+bbtk<br>
+      </td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>VERBOSE_MAKEFILE <br>
+      </td>
+      <td> Set to ON to generate a verbose makefile which echos the
+commands issued<br>
+      </td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>bbtk_COMPILE_DEBUG_MESSAGES<br>
+      </td>
+      <td>Set to ON to compile debug messages in bbtk</td>
+      <td style="vertical-align: top;">OFF<br>
+      </td>
+    </tr>
+    <tr>
+      <td>bbtk_COMPILE_ERROR_MESSAGES<br>
+      </td>
+      <td> Set to ON to compile error messages in bbtk</td>
+      <td style="vertical-align: top;">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td>bbtk_COMPILE_MESSAGES<br>
+      </td>
+      <td>Set to ON to compile normal messages in bbtk</td>
+      <td style="vertical-align: top;">ON<br>
+      </td>
+    </tr>
+    <tr>
+      <td>bbtk_COMPILE_WARNING_MESSAGES<br>
+      </td>
+      <td> Set to ON to compile warning messages in bbtk<br>
+      </td>
+      <td style="vertical-align: top;">ON<br>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</div>
+</div>
+</body>
+</html>
diff --git a/kernel/doc/bbtkWebSite/menu.html b/kernel/doc/bbtkWebSite/menu.html
new file mode 100644 (file)
index 0000000..b6d9f8a
--- /dev/null
@@ -0,0 +1,99 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>Untitled Document</title>
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+</head>
+<body style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
+<small><a target="information" href="home.html">Home</a><br>
+Screenshots<br>
+<a target="information" href="download.html">Download</a><br>
+<a target="information" href="install.html">Install</a><br>
+License<br>
+bbtk <a target="information"
+ href="http://www.creatis.insa-lyon.fr/mywiki/Informatique/bbtk">Wiki</a>
+</small><br>
+<hr style="width: 100%; height: 2px;">Documentation<small><span
+ style="font-weight: bold;"></span><br>
+<span style="font-weight: bold;"></span></small>
+<blockquote><small> </small></blockquote>
+<ul>
+  <small> </small>
+</ul>
+<small><font size="3"><small><a
+ href="../bbtkUsersGuide/bbtkUsersGuide.html" target="information">Users'
+Guide</a> (<font size="2"><small><small><a
+ href="../bbtkUsersGuide/bbtkUsersGuide.pdf" target="information">pdf</a></small></small></font>)</small></font></small><br>
+<small><font size="3"><small> <a
+ href="../bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.html"
+ target="information">Package Developers' Guide</a> (<font size="2"><small><small><a
+ href="../bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.pdf"
+ target="information">pdf</a></small></small></font>)</small></font></small><br>
+<small><font size="3"><small> </small></font></small><small><font
+ size="3"><small><a
+ href="../bbtkDevelopersGuide/bbtkDevelopersGuide.html"
+ target="information">Developers' Guide</a> (<font size="2"><small><small><a
+ href="../bbtkDevelopersGuide/bbtkDevelopersGuide.pdf"
+ target="information">pdf</a></small></small></font>)<br>
+Reference (pdf)<br>
+</small></font></small><small><font size="3"><small> <a
+ href="../bbtkDoxygen/html/index.html" target="information">Doxygen doc</a></small></font></small>
+<ul>
+</ul>
+<hr style="width: 100%; height: 2px;">Packages doc<small><br>
+</small>
+<blockquote><small> </small></blockquote>
+<small><b>itk :<big> </big></b></small><font size="2"><a
+ href="../packages/itk/bbdoc/index.html" target="information">bbdoc</a></font>
+- <font size="2"><a href="../packages/itk/doxygen/index.html"
+ target="information">doxygen</a></font> <br>
+<small><b> itkvtk : </b></small><font size="2"><a
+ href="../packages/itkvtk/bbdoc/index.html" target="information">bbdoc</a></font>
+- <font size="2"><a href="../packages/itkvtk/doxygen/index.html"
+ target="information">doxygen</a></font><br>
+<small><b> std : </b></small><span style="text-decoration: underline;"></span><font
+ size="2"><a href="../packages/std/bbdoc/index.html"
+ target="information">bbdoc</a></font>
+- <font size="2"><a href="../packages/std/doxygen/index.html"
+ target="information">doxygen</a></font><br>
+<small><b> vtk : </b></small><font size="2"><a
+ href="../packages/vtk/bbdoc/index.html" target="information">bbdoc</a></font>
+- <font size="2"><a href="../packages/vtk/doxygen/index.html"
+ target="information">doxygen</a></font><br>
+<small><b> wx : </b></small><font size="2"><a
+ href="../packages/wx/bbdoc/index.html" target="information">bbdoc</a></font>
+- <font size="2"><a href="../packages/wx/doxygen/index.html"
+ target="information">doxygen</a></font><br>
+<small><b> wxvtk : </b></small><font size="2"><a
+ href="../packages/wxvtk/bbdoc/index.html" target="information">bbdoc</a></font>
+- <font size="2"><a href="../packages/wxvtk/doxygen/index.html"
+ target="information">doxygen</a><br>
+<br>
+<span style="font-weight: bold;">browse packages </span></font><font
+ size="2"><a href="../packages/" target="information">folder</a></font>
+<ul>
+</ul>
+<hr style="width: 100%; height: 2px;">Scripts doc<br>
+<br>
+<small><a target="information" href="../scripts/bbtk/demo/index.html">scripts/demo</a></small><br>
+<small><a target="information" href="../scripts/bbtk/boxes/index.html">scripts/boxes</a></small><br>
+<small><a target="information"
+ href="../scripts/bbtk/utilities/index.html">scripts/utilities</a></small><br>
+<small><a target="information" href="../scripts/bbtk/test/index.html">scripts/test</a><br>
+</small>
+<ul>
+</ul>
+<blockquote><big> </big></blockquote>
+<p><font size="2"><span style="font-weight: bold;">browse scripts </span></font><font
+ size="2"><a href="../../scripts/" target="information">folder</a><br>
+</font></p>
+<p><font size="2"><span style="font-weight: bold;">browse scripts doc </span></font><font
+ size="2"><a href="../scripts/" target="information">folder</a></font>
+</p>
+<hr style="width: 100%; height: 2px;">
+<p><br>
+</p>
+<p>&nbsp;</p>
+</body>
+</html>
diff --git a/kernel/doc/config.tex b/kernel/doc/config.tex
new file mode 100644 (file)
index 0000000..920f965
--- /dev/null
@@ -0,0 +1,179 @@
+% ==========================================
+\newif\ifpdf 
+\ifx\pdfoutput\undefined \pdffalse % we are not running PDFLaTeX 
+\else 
+\pdfoutput=1 \pdftrue % we are running PDFLaTeX 
+\fi
+% ==========================================
+\usepackage[a4paper,textwidth=14cm]{geometry}
+\usepackage[latin1]{inputenc}
+\usepackage{varioref}
+\usepackage{url}
+\usepackage{multicol}
+\usepackage{colortbl}
+%\usepackage[active]{srcltx}
+\usepackage{color}
+\usepackage[english]{babel}
+%\usepackage{picins}
+\usepackage{fancyhdr}
+%\usepackage{picins}
+\usepackage{xspace}
+% ==========================================
+%%% Math
+\usepackage{amsmath,amsfonts,amssymb}
+\usepackage{bm}
+\usepackage{theorem}
+\usepackage{stmaryrd}
+
+% ==========================================
+%%% Graphics
+\usepackage{graphics}
+\ifpdf
+\usepackage[pdftex]{graphicx} 
+\else
+\usepackage[ps2pdf]{graphicx} 
+\fi
+\graphicspath{{figs/}}
+
+% ==========================================
+% bib
+\usepackage{natbib}
+%\bibliographystyle{abbrvnat}
+\bibliographystyle{plainnat}
+
+%\bibliographystyle{plain}
+
+% http://merkel.zoneo.net/Latex/natbib.php?lang=fr
+
+% ==========================================
+%% PDF configuration 
+% http://www.p-joeckel.de/pdflatex/)
+% http://ringlord.com/publications/latex-pdf-howto/
+
+%%%% Options of pdflatex
+\ifpdf
+\DeclareGraphicsExtensions{.pdf,.jpg,.mps,.png,.eps}
+\usepackage[pdftex,                %
+    bookmarks         = true,%     % Signets
+    bookmarksnumbered = true,%     % Signets numérotés
+    pdfpagemode       = None,%     % Signets/vignettes fermé à l'ouverture
+    pdfstartview      = FitH,%     % La page prend toute la largeur
+    pdfpagelayout     = SinglePage,% Vue par page
+    colorlinks        = true,%     % Liens en couleur
+    urlcolor          = magenta,%  % Couleur des liens externes
+    pdfborder         = {0 0 0}%   % Style de bordure : ici, pas de bordure
+    ]{hyperref}%                   % Utilisation de HyperTeX
+%\usepackage[pdftex,bookmarks,pagebackref]{hyperref}
+\pdfadjustspacing=1
+
+%%%% Options for latex + dvips -Ppdf + ps2pdf
+\else
+\DeclareGraphicsExtensions{.eps,.ps}
+\usepackage[ps2pdf,bookmarks,pagebackref]{hyperref}
+\fi
+
+%%%% Commun options
+\hypersetup{
+  linktocpage,%
+  %%------------- Color Links ------------------------------ 
+  colorlinks=true,% 
+  linkcolor=myred,%
+  citecolor=mydarkblue,% 
+  urlcolor=myblue,%
+  menucolor=red,%
+  %%------------- Doc Info --------------------------------- 
+  pdftitle={bbtk Users' Guide},%
+  pdfauthor={Laurent Guigues},%
+  %%------------ Doc View ----------------------------------}
+  pdfhighlight=/P,%
+  bookmarksopen=false,%
+  plainpages=false,
+  pdfpagemode=None}
+
+\hyperbaseurl{http://www.creatis.insa-lyon.fr/\string~guigues/}
+
+\definecolor{myblue}{rgb}{0,0,0.7}
+\definecolor{myred}{rgb}{0.7,0,0}
+\definecolor{mygreen}{rgb}{0,0.7,0}
+\definecolor{mydarkblue}{rgb}{0,0,0.5} 
+
+% ==========================================
+\def\todo{\scriptsize\fbox{\bf TODO !!}\normalsize}
+
+\def\x{\bm{x}}
+
+\def\BBTK{{\xspace}The {\bf Black Box Toolkit} }
+\def\bbtk{{\xspace}$\texttt{bbtk}$ }
+\def\bbi{{\xspace}$\texttt{bbi}$ }
+\def\bbfy{{\xspace}$\texttt{bbfy}$ }
+\def\bbdoc{{\xspace}$\texttt{bbdoc}$ }
+\def\bbCreatePackage{{\xspace}$\texttt{bbCreatePackage}$ }
+
+\def\bb{{\xspace}$\texttt{bb}$ }
+%\def\bbp{{\xspace}$\texttt{bbp}$\xspace}
+
+\def\cmake{{\xspace}$\texttt{cmake}$ }
+
+\def\C{{\xspace}$\texttt{C}$ }
+\def\CPP{{\xspace}$\texttt{C++}$ }
+
+\def\xml{{\xspace}$\texttt{xml}$ }
+
+\def\itk{{\xspace}$\texttt{itk}$ }
+\def\vtk{{\xspace}$\texttt{vtk}$ }
+\def\gdcm{{\xspace}$\texttt{gdcm}$ }
+\def\gsmis{{\xspace}$\texttt{gsmis}$ }
+\def\wx{{\xspace}$\texttt{wxWidgets}$ }
+
+\def\lin{{\xspace}\textit{Linux} }
+\def\win{{\xspace}\textit{Windows} }
+
+% the same macros with no space at the end
+
+\def\BBTKns{{\xspace}The {\bf Black Box Toolkit}}
+\def\bbtkns{{\xspace}$\texttt{bbtk}$}
+\def\bbins{{\xspace}$\texttt{bbi}$}
+\def\bbfyns{{\xspace}$\texttt{bbfy}$}
+\def\bbdocns{{\xspace}$\texttt{bbdoc}$}
+\def\bbCreatePackagens{{\xspace}$\texttt{bbCreatePackage}$}
+
+\def\bbns{{\xspace}$\texttt{bb}$}
+%\def\bbp{{\xspace}$\texttt{bbp}$\xspace}
+
+\def\cmakens{{\xspace}$\texttt{cmake}$}
+
+\def\Cns{{\xspace}$\texttt{C}$}
+\def\CPPns{{\xspace}$\texttt{C++}$}
+
+\def\xmlns{{\xspace}$\texttt{xml}$}
+
+\def\itkns{{\xspace}$\texttt{itk}$}
+\def\vtkns{{\xspace}$\texttt{vtk}$}
+\def\gdcmns{{\xspace}$\texttt{gdcm}$}
+\def\gsmisns{{\xspace}$\texttt{gsmis}$}
+\def\wxns{{\xspace}$\texttt{wxWidgets}$}
+
+\def\linns{{\xspace}\textit{Linux}}
+\def\winns{{\xspace}\textit{Windows}}
+% ==========================================
+%%% mode: latex
+%%% TeX-master: "bbtkUsersGuide"
+%%% End: 
+
+\newcounter{Ctrfile}
+%% env
+\newenvironment{file}[1]
+{
+\bigskip\hrule\smallskip
+\stepcounter{Ctrfile}
+\textbf{File #1}
+%\hspace{0.2cm}\arabic{Ctrfile}\hfill \textbf{#1}
+\smallskip\hrule\medskip
+%\algocaption{#1}
+}
+{
+\hrule\smallskip
+\hfill\textbf{End of file}
+\smallskip\hrule
+\bigskip
+}
diff --git a/kernel/doc/index.html b/kernel/doc/index.html
new file mode 100644 (file)
index 0000000..add035f
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+<head>
+<title>The Black Box Toolkit</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+<frameset cols="100,499" rows="*"> 
+  <frame src="bbtkWebSite/menu.html">
+  <frame name="information" src="bbtkWebSite/home.html">
+</frameset>
+<noframes>
+<body bgcolor="#FFFFFF" text="#000000">
+</body>
+</noframes> 
+</html>
index 026d707d319ffec04e581549fbce2215fde91059..715c400be3864afe040c51eceb2b0930c961a6cc 100644 (file)
@@ -1,4 +1,5 @@
 
+SET(BBTK_CORE_PACKAGE ON)
 
 #-----------------------------------------------------------------------------
 SUBDIRS(wx)
index cb15efae015072f937803587e829f9d5fb490e59..69336a8d80fe47becfeff6a1be589afbc2986a0e 100644 (file)
 
-#-----------------------------------------------------------------------------
+
+#===========================================================================
 # THE NAME OF THE BBTK PACKAGE = NAME OF THE CURRENT DIRECTORY
-GET_FILENAME_COMPONENT(BBTK_PACKAGE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
-#-----------------------------------------------------------------------------
-# DOES THE USER WANT TO BUILD THE PACKAGE ?
-OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME} 
-  "Build the bbtk package ${BBTK_PACKAGE_NAME}" OFF)
-#SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${PACKAGE_NAME})
-#-----------------------------------------------------------------------------
-
-
-#-----------------------------------------------------------------------------
-# IF THE USER HAS CHOSEN TO BUILD THE PACKAGE
-IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
-  #---------------------------------------------------------------------------
-
-
-  #===========================================================================
-  # SET(${BBTK_PACKAGE_NAME}_USE_VTK  ON)
-  # SET(${BBTK_PACKAGE_NAME}_USE_ITK  ON)
-  # SET(${BBTK_PACKAGE_NAME}_USE_GDCM ON)
-  # SET(${BBTK_PACKAGE_NAME}_USE_GSMIS ON)
-  SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON)
-  #===========================================================================
-
-
-
-
-  #===========================================================================
-  # USER SECTION
-  #===========================================================================
-
-  #===========================================================================
-  # PACKAGE AUTHOR
-  # !!! NO COMMA ALLOWED !!!
-  SET(BBTK_PACKAGE_AUTHOR "eduardo.davila/laurent.guigues@creatis.insa-lyon.fr")
-  #===========================================================================
-
-  #===========================================================================
-  # PACKAGE DESCRIPTION
-  SET(BBTK_PACKAGE_DESCRIPTION "Basic graphical interface elements (sliders, buttons ...) based on wxWidgets")
-  #===========================================================================
-
-  #===========================================================================
-  # PACKAGE VERSION NUMBER 
-  SET(BBTK_PACKAGE_MAJOR_VERSION 1)
-  SET(BBTK_PACKAGE_MINOR_VERSION 0)
-  SET(BBTK_PACKAGE_BUILD_VERSION 0)
-  #===========================================================================
-
-
-  #===========================================================================
-  # THE SOURCES OF THE PACKAGE
-  # EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE DIRECTORY :
-  SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON)
-  # ... OR LIST THE FILES TO COMPILE MANUALLY :
-  #SET(PACKAGE_SOURCES
-    # LIST HERE THE FILES TO COMPILE TO BUILD THE LIB
-    # E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION)
-  #    )
-  #===========================================================================
-  
-
-  #===========================================================================
-  INCLUDE_DIRECTORIES(
-    # LIST HERE YOUR INCLUDE DIRECTORIES (EXCEPT BBTK'S)
-    # (Of course, if you build a package outside bbtk, 
-    #  you have to list *all* the include directories -including BBTK's-)    
-    )
-  #===========================================================================
-
-  
-  #===========================================================================
-  SET(BBTK_PACKAGE_LIBS 
-    # LIST HERE THE LIBS TO LINK AGAINST (EXCEPT BBTK)
-    )
-  #===========================================================================
-  
-  #===========================================================================
-  # END OF USER SECTION 
-  # NOTHING INTERESTING FOR YOU BELOW
-  #===========================================================================
-  
-  
-  #---------------------------------------------------------------------------
-  # Include global configuration cmake script
-  INCLUDE(${BBTK_DIR}/BBTKConfigurePackage.cmake)
-  #---------------------------------------------------------------------------
-
-
-  #---------------------------------------------------------------------------
-  # Recurse into subdirs
-  SUBDIRS(src)
-#  SUBDIRS(doc)
-#  SUBDIRS(scripts)
-  #---------------------------------------------------------------------------
-
-  #---------------------------------------------------------------------------
-ENDIF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
-#-----------------------------------------------------------------------------
-# EOF
-#-----------------------------------------------------------------------------
+# GET_FILENAME_COMPONENT(BBTK_PACKAGE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+SET(BBTK_PACKAGE_NAME wx)
+#===========================================================================
+
+#===========================================================================
+# UNCOMMENT NEXT LINE IF IT IS A STANDALONE PROJECT, 
+# I.E. WHICH IS NOT INCLUDED INTO A WIDER PROJECT WHICH RECURSED INTO THIS 
+# DIRECTORY BY SUBDIRS.
+# ELSE PUT A "SUBDIRS(this_directory)" COMMAND INTO ../CMakeLists.txt
+# PROJECT(${BBTK_PACKAGE_NAME})
+#===========================================================================
+
+
+#===========================================================================
+# SET(BBTK_PACKAGE_USE_VTK  ON)
+# SET(BBTK_PACKAGE_USE_ITK  ON)
+# SET(BBTK_PACKAGE_USE_GDCM ON)
+# SET(BBTK_PACKAGE_USE_GSMIS ON)
+SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON)
+#===========================================================================
+
+#===========================================================================
+# PACKAGE AUTHOR
+# !!! NO COMMA ALLOWED !!!
+SET(BBTK_PACKAGE_AUTHOR "eduardo.davila/laurent.guigues@creatis.insa-lyon.fr")
+#===========================================================================
+
+#===========================================================================
+# PACKAGE DESCRIPTION
+SET(BBTK_PACKAGE_DESCRIPTION "Basic graphical interface elements (sliders, buttons ...) based on wxWidgets")
+#===========================================================================
+
+#===========================================================================
+# PACKAGE VERSION NUMBER 
+SET(BBTK_PACKAGE_MAJOR_VERSION 1)
+SET(BBTK_PACKAGE_MINOR_VERSION 0)
+SET(BBTK_PACKAGE_BUILD_VERSION 0)
+#===========================================================================
+
+#===========================================================================
+# THE SOURCES OF THE PACKAGE
+# EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE DIRECTORY :
+SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON)
+# ... OR LIST THE FILES TO COMPILE MANUALLY :
+#SET(PACKAGE_SOURCES
+# LIST HERE THE FILES TO COMPILE TO BUILD THE LIB
+# E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION)
+#    )
+#===========================================================================
+
+
+#===========================================================================
+INCLUDE_DIRECTORIES(
+  # LIST HERE YOUR INCLUDE DIRECTORIES (EXCEPT BBTK'S)
+  # (Of course, if you build a package outside bbtk, 
+  #  you have to list *all* the include directories -including BBTK's-)    
+  )
+#===========================================================================
+
+
+#===========================================================================
+SET(BBTK_PACKAGE_LIBS 
+  # LIST HERE THE LIBS TO LINK AGAINST (EXCEPT BBTK)
+  )
+#===========================================================================
+
+
+#===========================================================================
+# Include package configuration cmake script
+INCLUDE(${BBTK_DIR}/BBTKConfigurePackage.cmake)
+#===========================================================================