]> Creatis software - creaCLI.git/commitdiff
The following boxxes compilated with no errors
authorriveros <riveros@ei-ed-345.(none)>
Wed, 18 Apr 2012 09:31:00 +0000 (11:31 +0200)
committerriveros <riveros@ei-ed-345.(none)>
Wed, 18 Apr 2012 09:31:00 +0000 (11:31 +0200)
48 files changed:
ModuleCall/CMakeCache.txt [new file with mode: 0644]
ModuleCall/CreationTool.cxx
ModuleCall/CreationTool.h
ModuleCall/Makefile
ModuleCall/interoperating_Baby
ModuleCall/main.cpp
bbtk_Slicer_PKG/src/bbSlicerAddImages.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerAddImages.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerBSplinetodeformationfield.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerBSplinetodeformationfield.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerCommandLineModuleTest.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerCommandLineModuleTest.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerCreateaDICOMSeries.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerCreateaDICOMSeries.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerDicomtoNrrdConverter.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerDicomtoNrrdConverter.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerExtractSkeleton.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerExtractSkeleton.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerFastNonrigidBSplineregistration.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerFastNonrigidBSplineregistration.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerImageLabelCombine.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerImageLabelCombine.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerLabelMapSmoothing.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerLabelMapSmoothing.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMRIBiasFieldCorrection.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMRIBiasFieldCorrection.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMaskImage.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMaskImage.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMergeModels.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMergeModels.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMultiplyImages.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerMultiplyImages.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerOrientImages.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerOrientImages.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerPolyDataToLabelMap.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerPolyDataToLabelMap.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerRobustStatisticsSegmentation.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerRobustStatisticsSegmentation.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerSimpleIOTest.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerSimpleIOTest.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerSubtractImages.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerSubtractImages.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerTestGridTransformregistration.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerTestGridTransformregistration.h [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerThresholdImage.cxx [new file with mode: 0644]
bbtk_Slicer_PKG/src/bbSlicerThresholdImage.h [new file with mode: 0644]

diff --git a/ModuleCall/CMakeCache.txt b/ModuleCall/CMakeCache.txt
new file mode 100644 (file)
index 0000000..38ec050
--- /dev/null
@@ -0,0 +1,300 @@
+# This is the CMakeCache file.
+# For build in directory: /home/riveros/NetBeansProjects/ModuleCall
+# It was generated by CMake: /usr/local/bin/cmake
+# You can edit this file to change values found and used by cmake.
+# If you do not want to change any of the values, simply exit the editor.
+# If you do want to change a value, simply edit, save, and exit the editor.
+# The syntax for the file is as follows:
+# KEY:TYPE=VALUE
+# KEY is the name of a variable in the cache.
+# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
+# VALUE is the current value for the KEY.
+
+########################
+# EXTERNAL cache entries
+########################
+
+//Path to a program.
+CMAKE_AR:FILEPATH=/usr/bin/ar
+
+//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
+// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
+CMAKE_BUILD_TYPE:STRING=Debug
+
+//Enable/Disable color output during build.
+CMAKE_COLOR_MAKEFILE:BOOL=ON
+
+//CXX compiler.
+CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
+
+//Flags used by the compiler during all build types.
+CMAKE_CXX_FLAGS:STRING=
+
+//Flags used by the compiler during debug builds.
+CMAKE_CXX_FLAGS_DEBUG:STRING=-g
+
+//Flags used by the compiler during release minsize builds.
+CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
+
+//Flags used by the compiler during release builds (/MD /Ob1 /Oi
+// /Ot /Oy /Gs will produce slightly less optimized but smaller
+// files).
+CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
+
+//Flags used by the compiler during Release with Debug Info builds.
+CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g
+
+//C compiler.
+CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc
+
+//Flags used by the compiler during all build types.
+CMAKE_C_FLAGS:STRING=
+
+//Flags used by the compiler during debug builds.
+CMAKE_C_FLAGS_DEBUG:STRING=-g
+
+//Flags used by the compiler during release minsize builds.
+CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
+
+//Flags used by the compiler during release builds (/MD /Ob1 /Oi
+// /Ot /Oy /Gs will produce slightly less optimized but smaller
+// files).
+CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
+
+//Flags used by the compiler during Release with Debug Info builds.
+CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g
+
+//Flags used by the linker.
+CMAKE_EXE_LINKER_FLAGS:STRING=' '
+
+//Flags used by the linker during debug builds.
+CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during release minsize builds.
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during release builds.
+CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during Release with Debug Info builds.
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Enable/Disable output of compile commands during generation.
+CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
+
+//Install path prefix, prepended onto install directories.
+CMAKE_INSTALL_PREFIX:PATH=/usr/local
+
+//Path to a program.
+CMAKE_LINKER:FILEPATH=/usr/bin/ld
+
+//Path to a program.
+CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
+
+//Flags used by the linker during the creation of modules.
+CMAKE_MODULE_LINKER_FLAGS:STRING=' '
+
+//Flags used by the linker during debug builds.
+CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during release minsize builds.
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during release builds.
+CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during Release with Debug Info builds.
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//Path to a program.
+CMAKE_NM:FILEPATH=/usr/bin/nm
+
+//Path to a program.
+CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
+
+//Path to a program.
+CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
+
+//Value Computed by CMake
+CMAKE_PROJECT_NAME:STATIC=Inter
+
+//Path to a program.
+CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
+
+//Flags used by the linker during the creation of dll's.
+CMAKE_SHARED_LINKER_FLAGS:STRING=' '
+
+//Flags used by the linker during debug builds.
+CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
+
+//Flags used by the linker during release minsize builds.
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
+
+//Flags used by the linker during release builds.
+CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
+
+//Flags used by the linker during Release with Debug Info builds.
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
+
+//If set, runtime paths are not added when using shared libraries.
+CMAKE_SKIP_RPATH:BOOL=NO
+
+//Path to a program.
+CMAKE_STRIP:FILEPATH=/usr/bin/strip
+
+//If true, cmake will use relative paths in makefiles and projects.
+CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
+
+//If this value is on, makefiles will be generated without the
+// .SILENT directive, and all commands will be echoed to the console
+// during the make.  This is useful for debugging only. With Visual
+// Studio IDE projects all commands are done without /nologo.
+CMAKE_VERBOSE_MAKEFILE:BOOL=OFF
+
+//The directory containing a CMake configuration file for GenerateCLP.
+GenerateCLP_DIR:PATH=/home/riveros/.slicer/Slicer4-bin/SlicerExecutionModel-build/GenerateCLP
+
+//Value Computed by CMake
+Inter_BINARY_DIR:STATIC=/home/riveros/NetBeansProjects/ModuleCall
+
+//Value Computed by CMake
+Inter_SOURCE_DIR:STATIC=/home/riveros/NetBeansProjects/ModuleCall
+
+//The directory containing a CMake configuration file for ModuleDescriptionParser.
+ModuleDescriptionParser_DIR:PATH=/home/riveros/.slicer/Slicer4-bin/SlicerExecutionModel-build/ModuleDescriptionParser
+
+
+########################
+# INTERNAL cache entries
+########################
+
+//ADVANCED property for variable: CMAKE_AR
+CMAKE_AR-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_BUILD_TOOL
+CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1
+//What is the target build tool cmake is generating for.
+CMAKE_BUILD_TOOL:INTERNAL=/usr/bin/make
+//MODIFIED property for variable: CMAKE_BUILD_TYPE
+CMAKE_BUILD_TYPE-MODIFIED:INTERNAL=ON
+//This is the directory where this CMakeCache.txt was created
+CMAKE_CACHEFILE_DIR:INTERNAL=/home/riveros/NetBeansProjects/ModuleCall
+//Major version of cmake used to create the current loaded cache
+CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2
+//Minor version of cmake used to create the current loaded cache
+CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
+//Patch version of cmake used to create the current loaded cache
+CMAKE_CACHE_PATCH_VERSION:INTERNAL=7
+//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
+CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
+//Path to CMake executable.
+CMAKE_COMMAND:INTERNAL=/usr/local/bin/cmake
+//Path to cpack program executable.
+CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/bin/cpack
+//Path to ctest program executable.
+CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/bin/ctest
+//ADVANCED property for variable: CMAKE_CXX_COMPILER
+CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
+CMAKE_CXX_COMPILER_WORKS:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS
+CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
+CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
+CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
+CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
+CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_COMPILER
+CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
+CMAKE_C_COMPILER_WORKS:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS
+CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
+CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
+CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
+CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
+CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//Result of TRY_COMPILE
+CMAKE_DETERMINE_CXX_ABI_COMPILED:INTERNAL=TRUE
+//Result of TRY_COMPILE
+CMAKE_DETERMINE_C_ABI_COMPILED:INTERNAL=TRUE
+//Path to cache edit program executable.
+CMAKE_EDIT_COMMAND:INTERNAL=/usr/local/bin/ccmake
+//Executable file format
+CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
+CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
+CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
+CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
+CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
+CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
+//Name of generator.
+CMAKE_GENERATOR:INTERNAL=Unix Makefiles
+//Start directory with the top level CMakeLists.txt file for this
+// project
+CMAKE_HOME_DIRECTORY:INTERNAL=/home/riveros/NetBeansProjects/ModuleCall
+//Install .so files without execute permission.
+CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1
+//ADVANCED property for variable: CMAKE_LINKER
+CMAKE_LINKER-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
+CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
+CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
+CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
+CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
+CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_NM
+CMAKE_NM-ADVANCED:INTERNAL=1
+//number of local generators
+CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJCOPY
+CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_OBJDUMP
+CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_RANLIB
+CMAKE_RANLIB-ADVANCED:INTERNAL=1
+//Path to CMake installation.
+CMAKE_ROOT:INTERNAL=/usr/local/share/cmake-2.8
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
+CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
+CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
+CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
+CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
+CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_SKIP_RPATH
+CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_STRIP
+CMAKE_STRIP-ADVANCED:INTERNAL=1
+//uname command
+CMAKE_UNAME:INTERNAL=/bin/uname
+//ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS
+CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1
+//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
+CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
+//MODIFIED property for variable: CMAKE_VERBOSE_MAKEFILE
+CMAKE_VERBOSE_MAKEFILE-MODIFIED:INTERNAL=ON
+//MODIFIED property for variable: GenerateCLP_DIR
+GenerateCLP_DIR-MODIFIED:INTERNAL=ON
+//MODIFIED property for variable: ModuleDescriptionParser_DIR
+ModuleDescriptionParser_DIR-MODIFIED:INTERNAL=ON
+
index 8203b4dd64b788e9b150899288b4fa17931a2c9b..b3c7095aefde5de275e3c81a2ed125c7f8b8b97c 100644 (file)
 #include "CreationTool.h"
 
 std::string Mthd::Aux::toString ( float n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( double n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( long double n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( char n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( unsigned char n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( short n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( unsigned short n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( int n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( long int n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( unsigned int n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( unsigned long n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( unsigned long long n ) {
-    std::ostringstream oss;
-    oss << n;
-    return oss.str( );
+    std::ostringstream oss ;
+    oss << n ;
+    return oss.str( ) ;
 }
 
 std::string Mthd::Aux::toString ( std::string n ) {
-    return n;
+    return n ;
 }
 
 char* Mthd::Aux::toCharArrray ( float n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( double n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( long double n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( char n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( unsigned char n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( short n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( unsigned short n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( int n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( long int n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( unsigned int n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( long unsigned int n ) {
-    std::ostringstream oss;
-    oss << n;
-    return const_cast < char* > ( oss.str( ).data( ) );
+    std::ostringstream oss ;
+    oss << n ;
+    return const_cast < char* > ( oss.str( ).data( ) ) ;
 }
 
 char* Mthd::Aux::toCharArrray ( std::string n ) {
-    return const_cast < char* > ( n.data( ) );
+    return const_cast < char* > ( n.data( ) ) ;
 }
 
-std::string Mthd::Aux::replace_str ( std::string input, std::string old_str, std::string new_str ) {
-    size_t found = input.find( old_str );
+std::string Mthd::Aux::replace_str ( std::string input , std::string old_str , std::string new_str ) {
+    size_t found = input.find( old_str ) ;
     while ( found != std::string::npos ) {
-        input.replace( found, old_str.length( ), new_str );
-        found = input.find( old_str );
+        input.replace( found , old_str.length( ) , new_str ) ;
+        found = input.find( old_str ) ;
     }
-    return input;
+    return input ;
+}
+
+bool Mthd::Aux::str_ends_with ( std::string total_str , std::string sub_str ) {
+    size_t found = total_str.find( sub_str ) ;
+    if ( found != std::string::npos ) {
+        return true ;
+    }
+    return false ;
 }
 
index 1859178093bcd85398dd4cf34017e21cb1abb54d..27dcb8222bade35a5cfdae9151fca0470cbecc36 100644 (file)
@@ -51,7 +51,8 @@ namespace Mthd {
 
         static char* toCharArrray ( std::string n ) ;
 
-        static std::string replace_str ( std::string input , std::string old_str , std::string new_str ) ;
+        static bool str_ends_with ( std::string total_str , std::string sub_str ) ;
+        static std::string replace_str ( std::string input , std::string old_str , std::string new_str ) ;      
 
     } ;
 
index c4a8046e1d58cdb1318dbe06ce6b53067a351ab6..7c1a80f77611be3a0f50ebebb9fb5c04aa1bf62d 100644 (file)
@@ -16,9 +16,6 @@ SUFFIXES =
 
 .SUFFIXES: .hpux_make_needs_suffix_list
 
-# Produce verbose output by default.
-VERBOSE = 1
-
 # Suppress display of executed commands.
 $(VERBOSE).SILENT:
 
index 72882e86731fb5acfd82e01787413dcccef7bc0d..232b6113a3d152501608a6682828cbd269870691 100755 (executable)
Binary files a/ModuleCall/interoperating_Baby and b/ModuleCall/interoperating_Baby differ
index 9f7d71a1a6b9a9a2d463bd964f047728333bedd4..afb754449fac9786369d44ff34a22954addf4bb1 100644 (file)
  */
 
 #include <vector>
+
 #include <cstdlib>
-#include <dlfcn.h>
 #include <sstream>
 #include <iostream>
+#include <fstream>
 
+#include <stdio.h>
+#include <dlfcn.h>
+#include <string.h>
+#include <dirent.h>
 
 #include <ModuleDescriptionParser.h>
 #include <ModuleParameterGroup.h>
 #include <ModuleDescription.h>
 #include <ModuleParameter.h>
 
-#include <fstream>
 #include <ModuleDescriptionUtilities.h>
 
 #include "CreationTool.h"
 
 
+
 ///     STD LD_OPEN CALLS       ///
 
-char* getModuleDescription ( std::string lib ) {
-    void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+char* getModuleDescription ( const std::string lib ) {
+
+    void* handle = dlopen( lib.c_str( ) , RTLD_NOW | RTLD_LOCAL ) ;
     if ( ! handle ) {
-        std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
-        return NULL;
+        std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n' ;
+        return NULL ;
     }
-    typedef char* ( *method_t )( void );
+    typedef char* ( *method_t )( void ) ;
     // RESET ERRORS
-    dlerror( );
-    method_t myMethod = ( method_t ) dlsym( handle, "GetXMLModuleDescription" );
-    const char *dlsym_error = dlerror( );
+    dlerror( ) ;
+    method_t myMethod = ( method_t ) dlsym( handle , "GetXMLModuleDescription" ) ;
+    const char *dlsym_error = dlerror( ) ;
     if ( dlsym_error ) {
-        std::cerr << "CAN'T LOAD SYMBOL 'GetXMLModuleDescription: " << dlsym_error << '\n';
-        dlclose( handle );
-        return NULL;
+        std::cerr << "CAN'T LOAD SYMBOL 'GetXMLModuleDescription: " << dlsym_error << '\n' ;
+        dlclose( handle ) ;
+        return NULL ;
     }
     // CALLING METHOD
-    char* descrption = myMethod( );
+    char* descrption = myMethod( ) ;
     // CLOSING LIB
-    dlclose( handle );
-    return descrption;
+
+    //dlclose( handle ) ;
+
+    return descrption ;
 
 }
 
-void execute ( std::string lib, int _argc, char * _argv[] ) {
-    void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+void execute ( const std::string lib , int _argc , char * _argv[] ) {
+    void* handle = dlopen( lib.c_str( ) , RTLD_NOW | RTLD_LOCAL ) ;
     if ( ! handle ) {
-        std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
-        return;
+        std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n' ;
+        return ;
     }
-    typedef int (*method_t )( int argc, char * argv[] );
+    typedef int (*method_t )( int argc , char * argv[] ) ;
     // RESET ERRORS
-    dlerror( );
-    method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
-    const char *dlsym_error = dlerror( );
+    dlerror( ) ;
+    method_t myMethod = ( method_t ) dlsym( handle , "ModuleEntryPoint" ) ;
+    const char *dlsym_error = dlerror( ) ;
     if ( dlsym_error ) {
-        std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint' " << dlsym_error << '\n';
-        dlclose( handle );
-        return;
+        std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint' " << dlsym_error << '\n' ;
+        dlclose( handle ) ;
+        return ;
     }
     // CALLING METHOD
-    myMethod( _argc, _argv );
+    myMethod( _argc , _argv ) ;
     // CLOSING LIB
-    dlclose( handle );
+    dlclose( handle ) ;
 }
 
 ///     FILE RELATED     ///
 
-void saveFile ( std::string content, std::string file_name ) {
-    std::ofstream myfile;
-    myfile.open( file_name.c_str( ) );
-    myfile << content;
-    myfile.close( );
+void saveFile ( const std::string content , const std::string file_name ) {
+    std::ofstream myfile ;
+    myfile.open( file_name.c_str( ) ) ;
+    myfile << content ;
+    myfile.close( ) ;
 }
 
-std::string loadFile ( std::string filename ) {
-    std::string line = std::string( "" );
-    std::string content = std::string( "" );
+std::string loadFile ( const std::string filename ) {
+    std::string line = std::string( "" ) ;
+    std::string content = std::string( "" ) ;
 
-    std::ifstream infile;
-    infile.open( filename.c_str( ) );
+    std::ifstream infile ;
+    infile.open( filename.c_str( ) ) ;
     while ( ! infile.eof( ) ) {
-        getline( infile, line );
-        content += line + "\n";
-        line.clear( );
+        getline( infile , line ) ;
+        content += line + "\n" ;
+        line.clear( ) ;
     }
-    infile.close( );
-    return content;
+    infile.close( ) ;
+    return content ;
 
 }
 
 std::string loadDummyBody ( ) {
-    return loadFile( "bbSlicerDummy.dummy_cxx" );
+    return loadFile( "bbSlicerDummy.dummy_cxx" ) ;
 }
 
 std::string loadDummyHeader ( ) {
-    return loadFile( "bbSlicerDummy.dummy_h" );
+    return loadFile( "bbSlicerDummy.dummy_h" ) ;
 }
 
 ///     BBTK BOX CREATION       /// 
 
-std::string updateBoxDescription ( const ModuleDescription* module, std::string _header ) {
-    _header = Mthd::Aux::replace_str( _header, "_NNNNN_", Mthd::Aux::replace_str( module->GetTitle( ), " ", "" ) );
-    _header = Mthd::Aux::replace_str( _header, "_AAAAA_", module->GetContributor( ) );
-    _header = Mthd::Aux::replace_str( _header, "_DDDDD_", module->GetDescription( ) );
-    _header = Mthd::Aux::replace_str( _header, "_CCCCC_", module->GetCategory( ) );
-    return _header;
+std::string updateBoxDescription ( const ModuleDescription* module , std::string _header ) {
+    _header = Mthd::Aux::replace_str( _header , "_NNNNN_" , Mthd::Aux::replace_str( module->GetTitle( ) , " " , "" ) ) ;
+    _header = Mthd::Aux::replace_str( _header , "_AAAAA_" , module->GetContributor( ) ) ;
+    _header = Mthd::Aux::replace_str( _header , "_DDDDD_" , module->GetDescription( ) ) ;
+    _header = Mthd::Aux::replace_str( _header , "_CCCCC_" , module->GetCategory( ) ) ;
+    return _header ;
 }
 
-std::string updateBoxName ( const ModuleDescription* module, std::string content ) {
-    std::string _new_box_name = Mthd::Aux::replace_str( module->GetTitle( ), " ", "" );
-    content = Mthd::Aux::replace_str( content, "Dummy", _new_box_name );
-    return content;
+std::string updateBoxName ( const ModuleDescription* module , std::string content ) {
+    std::string _new_box_name = Mthd::Aux::replace_str( module->GetTitle( ) , " " , "" ) ;
+    content = Mthd::Aux::replace_str( content , "Dummy" , _new_box_name ) ;
+    return content ;
 }
 
 std::string getHeaderFileName ( const ModuleDescription* module ) {
-    std::string name = Mthd::Aux::replace_str( module->GetTitle( ), " ", "" );
-
-    return "bbSlicer" + name + ".h";
+    std::string name = Mthd::Aux::replace_str( module->GetTitle( ) , " " , "" ) ;
+    return "bbSlicer" + name + ".h" ;
 }
 
 std::string getBodyFileName ( const ModuleDescription* module ) {
-    std::string name = Mthd::Aux::replace_str( module->GetTitle( ), " ", "" );
+    std::string name = Mthd::Aux::replace_str( module->GetTitle( ) , " " , "" ) ;
 
-    return "bbSlicer" + name + ".cxx";
+    return "bbSlicer" + name + ".cxx" ;
 }
 
-std::string updateBoxInputs ( const ModuleDescription* module, std::string content ) {
+std::string updateBoxInputs ( const ModuleDescription* module , std::string content ) {
 
-    std::string _cxx_inputs = std::string( "\n" );
-    std::string _cxx_inputs_end = std::string( "\n" );
-    std::string _box_name = Mthd::Aux::replace_str( module->GetTitle( ), " ", "" );
+    std::string _cxx_inputs = std::string( "\n" ) ;
+    std::string _cxx_inputs_end = std::string( "\n" ) ;
+    std::string _box_name = Mthd::Aux::replace_str( module->GetTitle( ) , " " , "" ) ;
 
-    for ( unsigned long int i = 0; i < module->GetParameterGroups( ).size( ); i ++ ) {
-        ModuleParameterGroup pGroup = module->GetParameterGroups( ).at( i );
-        for ( unsigned long int j = 0; j < pGroup.GetParameters( ).size( ); j ++ ) {
-            ModuleParameter mPara = pGroup.GetParameters( ).at( j );
+    for ( unsigned long int i = 0 ; i < module->GetParameterGroups( ).size( ) ; i ++ ) {
+        ModuleParameterGroup pGroup = module->GetParameterGroups( ).at( i ) ;
+        for ( unsigned long int j = 0 ; j < pGroup.GetParameters( ).size( ) ; j ++ ) {
+            ModuleParameter mPara = pGroup.GetParameters( ).at( j ) ;
             _cxx_inputs +=
                     "BBTK_DECLARE_INPUT ( " +
                     mPara.GetName( ) + " , " +
-                    mPara.GetCPPType( ) + " );\n";
+                    mPara.GetCPPType( ) + " );\n" ;
 
             _cxx_inputs_end +=
                     "BBTK_INPUT(" +
                     _box_name + " , " +
                     mPara.GetName( ) + " , " +
                     "\"" + mPara.GetName( ) + "\"" + " , " +
-                    mPara.GetCPPType( ) + ", \"\");\n";
+                    mPara.GetCPPType( ) + ", \"\");\n" ;
         }
     }
-    content = Mthd::Aux::replace_str( content, "_11111_", _cxx_inputs );
-    content = Mthd::Aux::replace_str( content, "_22222_", _cxx_inputs_end );
+    content = Mthd::Aux::replace_str( content , "_11111_" , _cxx_inputs ) ;
+    content = Mthd::Aux::replace_str( content , "_22222_" , _cxx_inputs_end ) ;
 
-    return content;
+    return content ;
 }
 
 const int getNumberOfArguments ( const ModuleDescription* module ) {
-    int number = 0;
-    for ( unsigned long int i = 0; i < module->GetParameterGroups( ).size( ); i ++ ) {
-        ModuleParameterGroup pGroup = module->GetParameterGroups( ).at( i );
-        for ( unsigned long int j = 0; j < pGroup.GetParameters( ).size( ); j ++ ) {
+    int number = 0 ;
+    for ( unsigned long int i = 0 ; i < module->GetParameterGroups( ).size( ) ; i ++ ) {
+        ModuleParameterGroup pGroup = module->GetParameterGroups( ).at( i ) ;
+        for ( unsigned long int j = 0 ; j < pGroup.GetParameters( ).size( ) ; j ++ ) {
 
-            ModuleParameter mPara = pGroup.GetParameters( ).at( j );
-            number ++;
+            ModuleParameter mPara = pGroup.GetParameters( ).at( j ) ;
+            number ++ ;
         }
     }
-    return number;
+    return number ;
 }
 
-std::string updateProcessMethod ( const ModuleDescription* module, std::string content, std::string lib ) {
-    int number = 0;
-    std::string arg_list = std::string( "" );
-    for ( unsigned long int i = 0; i < module->GetParameterGroups( ).size( ); i ++ ) {
-        ModuleParameterGroup pGroup = module->GetParameterGroups( ).at( i );
-        for ( unsigned long int j = 0; j < pGroup.GetParameters( ).size( ); j ++ ) {
+std::string updateProcessMethod ( const ModuleDescription* module , std::string content , std::string lib ) {
+    int number = 0 ;
+    std::string arg_list = std::string( "" ) ;
+    for ( unsigned long int i = 0 ; i < module->GetParameterGroups( ).size( ) ; i ++ ) {
+        ModuleParameterGroup pGroup = module->GetParameterGroups( ).at( i ) ;
+        for ( unsigned long int j = 0 ; j < pGroup.GetParameters( ).size( ) ; j ++ ) {
 
-            ModuleParameter mPara = pGroup.GetParameters( ).at( j );
+            ModuleParameter mPara = pGroup.GetParameters( ).at( j ) ;
 
-            arg_list += "Mthd::Aux::toCharArrray( ";
+            arg_list += "Mthd::Aux::toCharArrray( " ;
             if ( mPara.GetFlag( ) != "" ) {
-                arg_list += "Mthd::Aux::toString( \"";
-                arg_list += "-" + mPara.GetFlag( ) + "\" ";
-                arg_list += " ) + ";
+                arg_list += "Mthd::Aux::toString( \"" ;
+                arg_list += "-" + mPara.GetFlag( ) + "\" " ;
+                arg_list += " ) + " ;
 
             } else if ( mPara.GetLongFlag( ) != "" ) {
-                arg_list += "Mthd::Aux::toString( \"";
-                arg_list += "--" + mPara.GetLongFlag( ) + "\" ";
-                arg_list += " ) + ";
+                arg_list += "Mthd::Aux::toString( \"" ;
+                arg_list += "--" + mPara.GetLongFlag( ) + "\" " ;
+                arg_list += " ) + " ;
             }
 
-            arg_list += "Mthd::Aux::toString( bbGetInput" + mPara.GetName( ) + "( ) )";
-            arg_list += " ),\n";
-            number ++;
+            arg_list += "Mthd::Aux::toString( bbGetInput" + mPara.GetName( ) + "( ) )" ;
+            arg_list += " ),\n" ;
+            number ++ ;
         }
 
     }
-    arg_list += "_EEENNNDDD_";
-    arg_list = Mthd::Aux::replace_str( arg_list, ",\n_EEENNNDDD_", "" );
-    std::string _argc = "\nint _argc =" + Mthd::Aux::toString( number ) + ";\n";
-    std::string _slib = "std::string lib = \"" + lib + "\";\n";
-    std::string _argv = "char * _argv[ ] = { " + arg_list + " };\n";
-    return Mthd::Aux::replace_str( content, "_33333_", _argc + _slib + _argv );
+    arg_list += "_EEENNNDDD_" ;
+    arg_list = Mthd::Aux::replace_str( arg_list , ",\n_EEENNNDDD_" , "" ) ;
+    std::string _argc = "\nint _argc =" + Mthd::Aux::toString( number ) + ";\n" ;
+    std::string _slib = "std::string lib = \"" + lib + "\";\n" ;
+    std::string _argv = "char * _argv[ ] = { " + arg_list + " };\n" ;
+    return Mthd::Aux::replace_str( content , "_33333_" , _argc + _slib + _argv ) ;
 }
 
-int main ( int argc, char* argv[] ) {
+std::vector < std::string > getFilesByExtention ( std::string dir , std::string ext ) {
+    std::vector < std::string > files ;
+    files.clear( ) ;
+    DIR *dp ;
+    struct dirent *dirp ;
+    if ( ( dp = opendir( dir.c_str( ) ) ) == NULL ) {
+        std::cout << "ERROR OPENING " << dir << std::endl ;
+        return files ;
+    }
+
+    while ( ( dirp = readdir( dp ) ) != NULL ) {
+        std::string file = std::string( dirp->d_name ) ;
+        if ( Mthd::Aux::str_ends_with( file , ext ) ) {
+            files.push_back( file ) ;
+        }
+    }
+    closedir( dp ) ;
+    return files ;
+}
 
-    int _argc = 3;
-    char * _argv[] = { "-s 20", "/home/riveros/Desktop/Experiments/RA1.mhd", "/home/riveros/Desktop/Experiments/RA1-OUT-MAIN.mhd" };
-    std::string gblib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libGaussianBlurImageFilterLib.so";
+int main ( int argc , char* argv[] ) {
 
-    execute( gblib, _argc, _argv );
+    //    int _argc = 3 ;
+    //    char * _argv[] = { "-s 20" , "/home/riveros/Desktop/Experiments/RA1.mhd" , "/home/riveros/Desktop/Experiments/RA1-OUT-MAIN.mhd" } ;
+    //    execute( gblib , _argc , _argv ) ;
 
-    ///     MODULE INFORMATION      ///
-    const std::string des = getModuleDescription( gblib );
+    const std::string dummy_body_str = loadDummyBody( ) ;
+    const std::string dummy_header_str = loadDummyHeader( ) ;
 
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //
-    //    std::cout << des << std::endl << std::endl;
+    const std::string directory = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/" ;
+    const std::vector < std::string > files = getFilesByExtention( directory , ".so" ) ;
 
-    ModuleDescription module;
-    ModuleDescriptionParser parser;
+    for ( unsigned int i = 0 ; i < files.size( ) ; i ++ ) {
 
-    parser.Parse( des, module );
+        std::string gblib = directory + files.at( i ) ;
+        std::cout << "/// " << files.at( i ) << " ///" << std::endl ;
 
-    ///     LOADING DUMMY FILES     ///
-    std::string _body = loadDummyBody( );
-    std::string _header = loadDummyHeader( );
+        ///     MODULE INFORMATION      ///
+        std::string des = getModuleDescription( gblib ) ;
+        std::cout << "  getModuleDescription( gblib )...OK" << std::endl ;
 
-    ///     SETTING HEADER FILE     ///
-    _header = updateBoxName( &module, _header );
-    _header = updateBoxDescription( &module, _header );
-    _header = updateBoxInputs( &module, _header );
-    saveFile( _header, getHeaderFileName( &module ) );
+        ModuleDescription module ;
+        ModuleDescriptionParser parser ;
 
-    ///     SETTING BODY FILE       ///
-    _body = updateBoxName( &module, _body );
-    _body = updateProcessMethod( &module, _body, gblib );
-    saveFile( _body, getBodyFileName( &module ) );
+        parser.Parse( des , module ) ;
+        std::cout << "  parser.Parse( des , module )...OK" << std::endl ;
 
+        ///     LOADING DUMMY FILES     ///
+        std::string _body = std::string( dummy_body_str ) ;
+        std::cout << "  loadDummyBody( )...OK" << std::endl ;
+        std::string _header = std::string( dummy_header_str ) ;
+        std::cout << "  loadDummyHeader( )...OK" << std::endl ;
 
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //
-    //    std::cout << _header << std::endl;
-    //
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //    std::cout << "====================================" << std::endl << std::endl;
-    //
-    //    std::cout << _body << std::endl;
+        ///     SETTING HEADER FILE     ///
+        _header = updateBoxName( &module , _header ) ;
+        std::cout << "  updateBoxName( &module , _header )...OK" << std::endl ;
+        _header = updateBoxDescription( &module , _header ) ;
+        std::cout << "  updateBoxDescription( &module , _header )...OK" << std::endl ;
+        _header = updateBoxInputs( &module , _header ) ;
+        std::cout << "  updateBoxInputs( &module , _header )...OK" << std::endl ;
+        saveFile( _header , getHeaderFileName( &module ) ) ;
 
-    return EXIT_SUCCESS;
+        ///     SETTING BODY FILE       ///
+        _body = updateBoxName( &module , _body ) ;
+        std::cout << "  updateBoxName( &module , _body )...OK" << std::endl ;
+        _body = updateProcessMethod( &module , _body , gblib ) ;
+        std::cout << "  updateProcessMethod( &module , _body , gblib )...OK" << std::endl ;
+        saveFile( _body , getBodyFileName( &module ) ) ;
+
+        std::cout << "/// EO " << files.at( i ) << " ///" << std::endl << std::endl ;
+
+        gblib.clear( ) ;
+        des.clear( ) ;
+        //while ( getchar( ) != '\n' ) ;
+
+    }
+    return EXIT_SUCCESS ;
 }
diff --git a/bbtk_Slicer_PKG/src/bbSlicerAddImages.cxx b/bbtk_Slicer_PKG/src/bbSlicerAddImages.cxx
new file mode 100644 (file)
index 0000000..d66e444
--- /dev/null
@@ -0,0 +1,58 @@
+#include "bbSlicerAddImages.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, AddImages )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( AddImages, bbtk::AtomicBlackBox );
+
+    void AddImages::Process ( ) {
+
+        // GENERATED
+
+int _argc =4;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libAddLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume1( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume2( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--order"  ) + Mthd::Aux::toString( bbGetInputorder( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void AddImages::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void AddImages::bbUserSetDefaultValues ( ) {
+    }
+
+    void AddImages::bbUserInitializeProcessing ( ) {
+    }
+
+    void AddImages::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerAddImages.h b/bbtk_Slicer_PKG/src/bbSlicerAddImages.h
new file mode 100644 (file)
index 0000000..6cd6801
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbSlicerAddImages_h_INCLUDED__
+#define __bbSlicerAddImages_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT AddImages
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( AddImages , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( inputVolume1 , std::string );
+BBTK_DECLARE_INPUT ( inputVolume2 , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+BBTK_DECLARE_INPUT ( order , int );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( AddImages , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "AddImages" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "Adds two images. Although all image types are supported on input, only signed types are produced. The two images do not have to have the same dimensions." ) ;
+    BBTK_CATEGORY ( "Filtering.Arithmetic" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(AddImages , inputVolume1 , "inputVolume1" , std::string, "");
+BBTK_INPUT(AddImages , inputVolume2 , "inputVolume2" , std::string, "");
+BBTK_INPUT(AddImages , outputVolume , "outputVolume" , std::string, "");
+BBTK_INPUT(AddImages , order , "order" , int, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( AddImages ) ;
+}
+
+#endif // __bbSlicerAddImages_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerBSplinetodeformationfield.cxx b/bbtk_Slicer_PKG/src/bbSlicerBSplinetodeformationfield.cxx
new file mode 100644 (file)
index 0000000..2633329
--- /dev/null
@@ -0,0 +1,57 @@
+#include "bbSlicerBSplinetodeformationfield.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, BSplinetodeformationfield )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( BSplinetodeformationfield, bbtk::AtomicBlackBox );
+
+    void BSplinetodeformationfield::Process ( ) {
+
+        // GENERATED
+
+int _argc =3;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libBSplineToDeformationFieldLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--tfm"  ) + Mthd::Aux::toString( bbGetInputinputTransformName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--refImage"  ) + Mthd::Aux::toString( bbGetInputreferenceImageName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--defImage"  ) + Mthd::Aux::toString( bbGetInputdeformationFieldName( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void BSplinetodeformationfield::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void BSplinetodeformationfield::bbUserSetDefaultValues ( ) {
+    }
+
+    void BSplinetodeformationfield::bbUserInitializeProcessing ( ) {
+    }
+
+    void BSplinetodeformationfield::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerBSplinetodeformationfield.h b/bbtk_Slicer_PKG/src/bbSlicerBSplinetodeformationfield.h
new file mode 100644 (file)
index 0000000..4815d58
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef __bbSlicerBSplinetodeformationfield_h_INCLUDED__
+#define __bbSlicerBSplinetodeformationfield_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT BSplinetodeformationfield
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( BSplinetodeformationfield , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( inputTransformName , std::string );
+BBTK_DECLARE_INPUT ( referenceImageName , std::string );
+BBTK_DECLARE_INPUT ( deformationFieldName , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( BSplinetodeformationfield , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "BSplinetodeformationfield" ) ;
+    BBTK_AUTHOR ( "Andrey Fedorov, BWH" ) ;
+    BBTK_DESCRIPTION ( "Create a dense deformation field from a bspline+bulk transform." ) ;
+    BBTK_CATEGORY ( "Legacy.Converters" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(BSplinetodeformationfield , inputTransformName , "inputTransformName" , std::string, "");
+BBTK_INPUT(BSplinetodeformationfield , referenceImageName , "referenceImageName" , std::string, "");
+BBTK_INPUT(BSplinetodeformationfield , deformationFieldName , "deformationFieldName" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( BSplinetodeformationfield ) ;
+}
+
+#endif // __bbSlicerBSplinetodeformationfield_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerCommandLineModuleTest.cxx b/bbtk_Slicer_PKG/src/bbSlicerCommandLineModuleTest.cxx
new file mode 100644 (file)
index 0000000..ba3a358
--- /dev/null
@@ -0,0 +1,58 @@
+#include "bbSlicerCommandLineModuleTest.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, CommandLineModuleTest )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( CommandLineModuleTest, bbtk::AtomicBlackBox );
+
+    void CommandLineModuleTest::Process ( ) {
+
+        // GENERATED
+
+int _argc =4;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libCLIModule4TestLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--inputvalue1"  ) + Mthd::Aux::toString( bbGetInputInputValue1( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--inputvalue2"  ) + Mthd::Aux::toString( bbGetInputInputValue2( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--operationtype"  ) + Mthd::Aux::toString( bbGetInputOperationType( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputOutputFile( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void CommandLineModuleTest::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void CommandLineModuleTest::bbUserSetDefaultValues ( ) {
+    }
+
+    void CommandLineModuleTest::bbUserInitializeProcessing ( ) {
+    }
+
+    void CommandLineModuleTest::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerCommandLineModuleTest.h b/bbtk_Slicer_PKG/src/bbSlicerCommandLineModuleTest.h
new file mode 100644 (file)
index 0000000..d8c2809
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbSlicerCommandLineModuleTest_h_INCLUDED__
+#define __bbSlicerCommandLineModuleTest_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT CommandLineModuleTest
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( CommandLineModuleTest , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( InputValue1 , int );
+BBTK_DECLARE_INPUT ( InputValue2 , int );
+BBTK_DECLARE_INPUT ( OperationType , std::string );
+BBTK_DECLARE_INPUT ( OutputFile , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( CommandLineModuleTest , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "CommandLineModuleTest" ) ;
+    BBTK_AUTHOR ( "Jean-Christophe Fillion-Robin" ) ;
+    BBTK_DESCRIPTION ( "Command line module used to test the automatic UI generator." ) ;
+    BBTK_CATEGORY ( "Testing" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(CommandLineModuleTest , InputValue1 , "InputValue1" , int, "");
+BBTK_INPUT(CommandLineModuleTest , InputValue2 , "InputValue2" , int, "");
+BBTK_INPUT(CommandLineModuleTest , OperationType , "OperationType" , std::string, "");
+BBTK_INPUT(CommandLineModuleTest , OutputFile , "OutputFile" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( CommandLineModuleTest ) ;
+}
+
+#endif // __bbSlicerCommandLineModuleTest_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerCreateaDICOMSeries.cxx b/bbtk_Slicer_PKG/src/bbSlicerCreateaDICOMSeries.cxx
new file mode 100644 (file)
index 0000000..1fe0e73
--- /dev/null
@@ -0,0 +1,74 @@
+#include "bbSlicerCreateaDICOMSeries.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, CreateaDICOMSeries )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( CreateaDICOMSeries, bbtk::AtomicBlackBox );
+
+    void CreateaDICOMSeries::Process ( ) {
+
+        // GENERATED
+
+int _argc =20;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libImageReadDicomWriteLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--patientName"  ) + Mthd::Aux::toString( bbGetInputpatientName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--patientID"  ) + Mthd::Aux::toString( bbGetInputpatientID( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--patientComments"  ) + Mthd::Aux::toString( bbGetInputpatientComments( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyID"  ) + Mthd::Aux::toString( bbGetInputstudyID( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyDate"  ) + Mthd::Aux::toString( bbGetInputstudyDate( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyComments"  ) + Mthd::Aux::toString( bbGetInputstudyComments( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyDescription"  ) + Mthd::Aux::toString( bbGetInputstudyDescription( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--modality"  ) + Mthd::Aux::toString( bbGetInputmodality( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--manufacturer"  ) + Mthd::Aux::toString( bbGetInputmanufacturer( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--model"  ) + Mthd::Aux::toString( bbGetInputmodel( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--seriesNumber"  ) + Mthd::Aux::toString( bbGetInputseriesNumber( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--seriesDescription"  ) + Mthd::Aux::toString( bbGetInputseriesDescription( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--rescaleIntercept"  ) + Mthd::Aux::toString( bbGetInputrescaleIntercept( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--rescaleSlope"  ) + Mthd::Aux::toString( bbGetInputrescaleSlope( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--dicomDirectory"  ) + Mthd::Aux::toString( bbGetInputdicomDirectory( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--dicomPrefix"  ) + Mthd::Aux::toString( bbGetInputdicomPrefix( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--dicomNumberFormat"  ) + Mthd::Aux::toString( bbGetInputdicomNumberFormat( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--reverseImages"  ) + Mthd::Aux::toString( bbGetInputreverseImages( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--useCompression"  ) + Mthd::Aux::toString( bbGetInputuseCompression( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void CreateaDICOMSeries::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void CreateaDICOMSeries::bbUserSetDefaultValues ( ) {
+    }
+
+    void CreateaDICOMSeries::bbUserInitializeProcessing ( ) {
+    }
+
+    void CreateaDICOMSeries::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerCreateaDICOMSeries.h b/bbtk_Slicer_PKG/src/bbSlicerCreateaDICOMSeries.h
new file mode 100644 (file)
index 0000000..a7f3d19
--- /dev/null
@@ -0,0 +1,96 @@
+#ifndef __bbSlicerCreateaDICOMSeries_h_INCLUDED__
+#define __bbSlicerCreateaDICOMSeries_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT CreateaDICOMSeries
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( CreateaDICOMSeries , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( patientName , std::string );
+BBTK_DECLARE_INPUT ( patientID , std::string );
+BBTK_DECLARE_INPUT ( patientComments , std::string );
+BBTK_DECLARE_INPUT ( studyID , std::string );
+BBTK_DECLARE_INPUT ( studyDate , std::string );
+BBTK_DECLARE_INPUT ( studyComments , std::string );
+BBTK_DECLARE_INPUT ( studyDescription , std::string );
+BBTK_DECLARE_INPUT ( modality , std::string );
+BBTK_DECLARE_INPUT ( manufacturer , std::string );
+BBTK_DECLARE_INPUT ( model , std::string );
+BBTK_DECLARE_INPUT ( seriesNumber , std::string );
+BBTK_DECLARE_INPUT ( seriesDescription , std::string );
+BBTK_DECLARE_INPUT ( rescaleIntercept , double );
+BBTK_DECLARE_INPUT ( rescaleSlope , double );
+BBTK_DECLARE_INPUT ( inputVolume , std::string );
+BBTK_DECLARE_INPUT ( dicomDirectory , std::string );
+BBTK_DECLARE_INPUT ( dicomPrefix , std::string );
+BBTK_DECLARE_INPUT ( dicomNumberFormat , std::string );
+BBTK_DECLARE_INPUT ( reverseImages , bool );
+BBTK_DECLARE_INPUT ( useCompression , bool );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( CreateaDICOMSeries , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "CreateaDICOMSeries" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "Create a DICOM Series from a Slicer volume. User can specify values for selected DICOM tags in the UI. Given the number of tags DICOM series have, it is impossible to expose all tags in UI. So only important tags can be set by the user." ) ;
+    BBTK_CATEGORY ( "Converters" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(CreateaDICOMSeries , patientName , "patientName" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , patientID , "patientID" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , patientComments , "patientComments" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , studyID , "studyID" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , studyDate , "studyDate" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , studyComments , "studyComments" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , studyDescription , "studyDescription" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , modality , "modality" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , manufacturer , "manufacturer" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , model , "model" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , seriesNumber , "seriesNumber" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , seriesDescription , "seriesDescription" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , rescaleIntercept , "rescaleIntercept" , double, "");
+BBTK_INPUT(CreateaDICOMSeries , rescaleSlope , "rescaleSlope" , double, "");
+BBTK_INPUT(CreateaDICOMSeries , inputVolume , "inputVolume" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , dicomDirectory , "dicomDirectory" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , dicomPrefix , "dicomPrefix" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , dicomNumberFormat , "dicomNumberFormat" , std::string, "");
+BBTK_INPUT(CreateaDICOMSeries , reverseImages , "reverseImages" , bool, "");
+BBTK_INPUT(CreateaDICOMSeries , useCompression , "useCompression" , bool, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( CreateaDICOMSeries ) ;
+}
+
+#endif // __bbSlicerCreateaDICOMSeries_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerDicomtoNrrdConverter.cxx b/bbtk_Slicer_PKG/src/bbSlicerDicomtoNrrdConverter.cxx
new file mode 100644 (file)
index 0000000..87e2029
--- /dev/null
@@ -0,0 +1,61 @@
+#include "bbSlicerDicomtoNrrdConverter.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, DicomtoNrrdConverter )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( DicomtoNrrdConverter, bbtk::AtomicBlackBox );
+
+    void DicomtoNrrdConverter::Process ( ) {
+
+        // GENERATED
+
+int _argc =7;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libDicomToNrrdConverterLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--inputDicomDirectory"  ) + Mthd::Aux::toString( bbGetInputinputDicomDirectory( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--outputDirectory"  ) + Mthd::Aux::toString( bbGetInputoutputDirectory( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--outputVolume"  ) + Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--smallGradientThreshold"  ) + Mthd::Aux::toString( bbGetInputsmallGradientThreshold( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--writeProtocolGradientsFile"  ) + Mthd::Aux::toString( bbGetInputwriteProtocolGradientsFile( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--useIdentityMeaseurementFrame"  ) + Mthd::Aux::toString( bbGetInputuseIdentityMeaseurementFrame( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--useBMatrixGradientDirections"  ) + Mthd::Aux::toString( bbGetInputuseBMatrixGradientDirections( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void DicomtoNrrdConverter::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void DicomtoNrrdConverter::bbUserSetDefaultValues ( ) {
+    }
+
+    void DicomtoNrrdConverter::bbUserInitializeProcessing ( ) {
+    }
+
+    void DicomtoNrrdConverter::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerDicomtoNrrdConverter.h b/bbtk_Slicer_PKG/src/bbSlicerDicomtoNrrdConverter.h
new file mode 100644 (file)
index 0000000..808c738
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef __bbSlicerDicomtoNrrdConverter_h_INCLUDED__
+#define __bbSlicerDicomtoNrrdConverter_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT DicomtoNrrdConverter
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( DicomtoNrrdConverter , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( inputDicomDirectory , std::string );
+BBTK_DECLARE_INPUT ( outputDirectory , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+BBTK_DECLARE_INPUT ( smallGradientThreshold , double );
+BBTK_DECLARE_INPUT ( writeProtocolGradientsFile , bool );
+BBTK_DECLARE_INPUT ( useIdentityMeaseurementFrame , bool );
+BBTK_DECLARE_INPUT ( useBMatrixGradientDirections , bool );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( DicomtoNrrdConverter , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "DicomtoNrrdConverter" ) ;
+    BBTK_AUTHOR ( "Xiaodong Tao" ) ;
+    BBTK_DESCRIPTION ( "Converts diffusion weighted MR images in dicom series into Nrrd format for analysis in Slicer. This program has been tested on only a limited subset of DTI dicom formats available from Siemens, GE, and Phillips scanners. Work in progress to support dicom multi-frame data. The program parses dicom header to extract necessary information about measurement frame, diffusion weighting directions, b-values, etc, and write out a nrrd image. For non-diffusion weighted dicom images, it loads in an entire dicom series and writes out a single dicom volume in a .nhdr/.raw pair." ) ;
+    BBTK_CATEGORY ( "Converters" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(DicomtoNrrdConverter , inputDicomDirectory , "inputDicomDirectory" , std::string, "");
+BBTK_INPUT(DicomtoNrrdConverter , outputDirectory , "outputDirectory" , std::string, "");
+BBTK_INPUT(DicomtoNrrdConverter , outputVolume , "outputVolume" , std::string, "");
+BBTK_INPUT(DicomtoNrrdConverter , smallGradientThreshold , "smallGradientThreshold" , double, "");
+BBTK_INPUT(DicomtoNrrdConverter , writeProtocolGradientsFile , "writeProtocolGradientsFile" , bool, "");
+BBTK_INPUT(DicomtoNrrdConverter , useIdentityMeaseurementFrame , "useIdentityMeaseurementFrame" , bool, "");
+BBTK_INPUT(DicomtoNrrdConverter , useBMatrixGradientDirections , "useBMatrixGradientDirections" , bool, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( DicomtoNrrdConverter ) ;
+}
+
+#endif // __bbSlicerDicomtoNrrdConverter_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerExtractSkeleton.cxx b/bbtk_Slicer_PKG/src/bbSlicerExtractSkeleton.cxx
new file mode 100644 (file)
index 0000000..5afd4d6
--- /dev/null
@@ -0,0 +1,60 @@
+#include "bbSlicerExtractSkeleton.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, ExtractSkeleton )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( ExtractSkeleton, bbtk::AtomicBlackBox );
+
+    void ExtractSkeleton::Process ( ) {
+
+        // GENERATED
+
+int _argc =6;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libExtractSkeletonLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputInputImageFileName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputOutputImageFileName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--type"  ) + Mthd::Aux::toString( bbGetInputSkeletonType( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--dontPrune"  ) + Mthd::Aux::toString( bbGetInputDontPruneBranches( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--numPoints"  ) + Mthd::Aux::toString( bbGetInputNumberOfPoints( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--pointsFile"  ) + Mthd::Aux::toString( bbGetInputOutputPointsFileName( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void ExtractSkeleton::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void ExtractSkeleton::bbUserSetDefaultValues ( ) {
+    }
+
+    void ExtractSkeleton::bbUserInitializeProcessing ( ) {
+    }
+
+    void ExtractSkeleton::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerExtractSkeleton.h b/bbtk_Slicer_PKG/src/bbSlicerExtractSkeleton.h
new file mode 100644 (file)
index 0000000..3b47fb2
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef __bbSlicerExtractSkeleton_h_INCLUDED__
+#define __bbSlicerExtractSkeleton_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT ExtractSkeleton
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( ExtractSkeleton , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( InputImageFileName , std::string );
+BBTK_DECLARE_INPUT ( OutputImageFileName , std::string );
+BBTK_DECLARE_INPUT ( SkeletonType , std::string );
+BBTK_DECLARE_INPUT ( DontPruneBranches , bool );
+BBTK_DECLARE_INPUT ( NumberOfPoints , int );
+BBTK_DECLARE_INPUT ( OutputPointsFileName , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( ExtractSkeleton , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "ExtractSkeleton" ) ;
+    BBTK_AUTHOR ( "Pierre Seroul, Martin Styner, Guido Gerig, and Stephen Aylward" ) ;
+    BBTK_DESCRIPTION ( "Extract the skeleton of a binary object.  The skeleton can be limited to being a 1D curve or allowed to be a full 2D manifold.  The branches of the skeleton can be pruned so that only the maximal center skeleton is returned." ) ;
+    BBTK_CATEGORY ( "Filtering" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(ExtractSkeleton , InputImageFileName , "InputImageFileName" , std::string, "");
+BBTK_INPUT(ExtractSkeleton , OutputImageFileName , "OutputImageFileName" , std::string, "");
+BBTK_INPUT(ExtractSkeleton , SkeletonType , "SkeletonType" , std::string, "");
+BBTK_INPUT(ExtractSkeleton , DontPruneBranches , "DontPruneBranches" , bool, "");
+BBTK_INPUT(ExtractSkeleton , NumberOfPoints , "NumberOfPoints" , int, "");
+BBTK_INPUT(ExtractSkeleton , OutputPointsFileName , "OutputPointsFileName" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( ExtractSkeleton ) ;
+}
+
+#endif // __bbSlicerExtractSkeleton_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerFastNonrigidBSplineregistration.cxx b/bbtk_Slicer_PKG/src/bbSlicerFastNonrigidBSplineregistration.cxx
new file mode 100644 (file)
index 0000000..a4f41cb
--- /dev/null
@@ -0,0 +1,67 @@
+#include "bbSlicerFastNonrigidBSplineregistration.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, FastNonrigidBSplineregistration )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( FastNonrigidBSplineregistration, bbtk::AtomicBlackBox );
+
+    void FastNonrigidBSplineregistration::Process ( ) {
+
+        // GENERATED
+
+int _argc =13;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libBSplineDeformableRegistrationLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-i"  ) + Mthd::Aux::toString( bbGetInputIterations( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-g"  ) + Mthd::Aux::toString( bbGetInputgridSize( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-b"  ) + Mthd::Aux::toString( bbGetInputHistogramBins( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-s"  ) + Mthd::Aux::toString( bbGetInputSpatialSamples( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--constrain"  ) + Mthd::Aux::toString( bbGetInputConstrainDeformation( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-m"  ) + Mthd::Aux::toString( bbGetInputMaximumDeformation( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-d"  ) + Mthd::Aux::toString( bbGetInputDefaultPixelValue( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--initialtransform"  ) + Mthd::Aux::toString( bbGetInputInitialTransform( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputFixedImageFileName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputMovingImageFileName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--outputtransform"  ) + Mthd::Aux::toString( bbGetInputOutputTransform( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--outputwarp"  ) + Mthd::Aux::toString( bbGetInputOutputWarp( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--resampledmovingfilename"  ) + Mthd::Aux::toString( bbGetInputResampledImageFileName( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void FastNonrigidBSplineregistration::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void FastNonrigidBSplineregistration::bbUserSetDefaultValues ( ) {
+    }
+
+    void FastNonrigidBSplineregistration::bbUserInitializeProcessing ( ) {
+    }
+
+    void FastNonrigidBSplineregistration::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerFastNonrigidBSplineregistration.h b/bbtk_Slicer_PKG/src/bbSlicerFastNonrigidBSplineregistration.h
new file mode 100644 (file)
index 0000000..dbb3cf3
--- /dev/null
@@ -0,0 +1,82 @@
+#ifndef __bbSlicerFastNonrigidBSplineregistration_h_INCLUDED__
+#define __bbSlicerFastNonrigidBSplineregistration_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT FastNonrigidBSplineregistration
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( FastNonrigidBSplineregistration , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( Iterations , int );
+BBTK_DECLARE_INPUT ( gridSize , int );
+BBTK_DECLARE_INPUT ( HistogramBins , int );
+BBTK_DECLARE_INPUT ( SpatialSamples , int );
+BBTK_DECLARE_INPUT ( ConstrainDeformation , bool );
+BBTK_DECLARE_INPUT ( MaximumDeformation , float );
+BBTK_DECLARE_INPUT ( DefaultPixelValue , int );
+BBTK_DECLARE_INPUT ( InitialTransform , std::string );
+BBTK_DECLARE_INPUT ( FixedImageFileName , std::string );
+BBTK_DECLARE_INPUT ( MovingImageFileName , std::string );
+BBTK_DECLARE_INPUT ( OutputTransform , std::string );
+BBTK_DECLARE_INPUT ( OutputWarp , std::string );
+BBTK_DECLARE_INPUT ( ResampledImageFileName , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( FastNonrigidBSplineregistration , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "FastNonrigidBSplineregistration" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "Registers two images together using BSpline transform and mutual information." ) ;
+    BBTK_CATEGORY ( "Legacy.Registration" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(FastNonrigidBSplineregistration , Iterations , "Iterations" , int, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , gridSize , "gridSize" , int, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , HistogramBins , "HistogramBins" , int, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , SpatialSamples , "SpatialSamples" , int, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , ConstrainDeformation , "ConstrainDeformation" , bool, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , MaximumDeformation , "MaximumDeformation" , float, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , DefaultPixelValue , "DefaultPixelValue" , int, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , InitialTransform , "InitialTransform" , std::string, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , FixedImageFileName , "FixedImageFileName" , std::string, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , MovingImageFileName , "MovingImageFileName" , std::string, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , OutputTransform , "OutputTransform" , std::string, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , OutputWarp , "OutputWarp" , std::string, "");
+BBTK_INPUT(FastNonrigidBSplineregistration , ResampledImageFileName , "ResampledImageFileName" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( FastNonrigidBSplineregistration ) ;
+}
+
+#endif // __bbSlicerFastNonrigidBSplineregistration_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerImageLabelCombine.cxx b/bbtk_Slicer_PKG/src/bbSlicerImageLabelCombine.cxx
new file mode 100644 (file)
index 0000000..cf71b1e
--- /dev/null
@@ -0,0 +1,58 @@
+#include "bbSlicerImageLabelCombine.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, ImageLabelCombine )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( ImageLabelCombine, bbtk::AtomicBlackBox );
+
+    void ImageLabelCombine::Process ( ) {
+
+        // GENERATED
+
+int _argc =4;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libImageLabelCombineLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputInputLabelMap_A( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputInputLabelMap_B( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputOutputLabelMap( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-f"  ) + Mthd::Aux::toString( bbGetInputFirstOverwrites( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void ImageLabelCombine::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void ImageLabelCombine::bbUserSetDefaultValues ( ) {
+    }
+
+    void ImageLabelCombine::bbUserInitializeProcessing ( ) {
+    }
+
+    void ImageLabelCombine::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerImageLabelCombine.h b/bbtk_Slicer_PKG/src/bbSlicerImageLabelCombine.h
new file mode 100644 (file)
index 0000000..6404950
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbSlicerImageLabelCombine_h_INCLUDED__
+#define __bbSlicerImageLabelCombine_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT ImageLabelCombine
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( ImageLabelCombine , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( InputLabelMap_A , std::string );
+BBTK_DECLARE_INPUT ( InputLabelMap_B , std::string );
+BBTK_DECLARE_INPUT ( OutputLabelMap , std::string );
+BBTK_DECLARE_INPUT ( FirstOverwrites , bool );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( ImageLabelCombine , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "ImageLabelCombine" ) ;
+    BBTK_AUTHOR ( "Alex Yarmarkovich" ) ;
+    BBTK_DESCRIPTION ( "Combine two label maps into one" ) ;
+    BBTK_CATEGORY ( "Filtering" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(ImageLabelCombine , InputLabelMap_A , "InputLabelMap_A" , std::string, "");
+BBTK_INPUT(ImageLabelCombine , InputLabelMap_B , "InputLabelMap_B" , std::string, "");
+BBTK_INPUT(ImageLabelCombine , OutputLabelMap , "OutputLabelMap" , std::string, "");
+BBTK_INPUT(ImageLabelCombine , FirstOverwrites , "FirstOverwrites" , bool, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( ImageLabelCombine ) ;
+}
+
+#endif // __bbSlicerImageLabelCombine_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerLabelMapSmoothing.cxx b/bbtk_Slicer_PKG/src/bbSlicerLabelMapSmoothing.cxx
new file mode 100644 (file)
index 0000000..8d6febc
--- /dev/null
@@ -0,0 +1,60 @@
+#include "bbSlicerLabelMapSmoothing.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, LabelMapSmoothing )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( LabelMapSmoothing, bbtk::AtomicBlackBox );
+
+    void LabelMapSmoothing::Process ( ) {
+
+        // GENERATED
+
+int _argc =6;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libLabelMapSmoothingLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--labelToSmooth"  ) + Mthd::Aux::toString( bbGetInputlabelToSmooth( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--numberOfIterations"  ) + Mthd::Aux::toString( bbGetInputnumberOfIterations( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--maxRMSError"  ) + Mthd::Aux::toString( bbGetInputmaxRMSError( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--gaussianSigma"  ) + Mthd::Aux::toString( bbGetInputgaussianSigma( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void LabelMapSmoothing::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void LabelMapSmoothing::bbUserSetDefaultValues ( ) {
+    }
+
+    void LabelMapSmoothing::bbUserInitializeProcessing ( ) {
+    }
+
+    void LabelMapSmoothing::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerLabelMapSmoothing.h b/bbtk_Slicer_PKG/src/bbSlicerLabelMapSmoothing.h
new file mode 100644 (file)
index 0000000..38f5675
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef __bbSlicerLabelMapSmoothing_h_INCLUDED__
+#define __bbSlicerLabelMapSmoothing_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT LabelMapSmoothing
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( LabelMapSmoothing , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( labelToSmooth , int );
+BBTK_DECLARE_INPUT ( numberOfIterations , int );
+BBTK_DECLARE_INPUT ( maxRMSError , float );
+BBTK_DECLARE_INPUT ( gaussianSigma , float );
+BBTK_DECLARE_INPUT ( inputVolume , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( LabelMapSmoothing , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "LabelMapSmoothing" ) ;
+    BBTK_AUTHOR ( "Dirk Padfield, Josh Cates, Ross Whitaker" ) ;
+    BBTK_DESCRIPTION ( "This filter smoothes a binary label map.  With a label map as input, this filter runs an anti-alising algorithm followed by a Gaussian smoothing algorithm.  The output is a smoothed label map." ) ;
+    BBTK_CATEGORY ( "Surface Models" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(LabelMapSmoothing , labelToSmooth , "labelToSmooth" , int, "");
+BBTK_INPUT(LabelMapSmoothing , numberOfIterations , "numberOfIterations" , int, "");
+BBTK_INPUT(LabelMapSmoothing , maxRMSError , "maxRMSError" , float, "");
+BBTK_INPUT(LabelMapSmoothing , gaussianSigma , "gaussianSigma" , float, "");
+BBTK_INPUT(LabelMapSmoothing , inputVolume , "inputVolume" , std::string, "");
+BBTK_INPUT(LabelMapSmoothing , outputVolume , "outputVolume" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( LabelMapSmoothing ) ;
+}
+
+#endif // __bbSlicerLabelMapSmoothing_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMRIBiasFieldCorrection.cxx b/bbtk_Slicer_PKG/src/bbSlicerMRIBiasFieldCorrection.cxx
new file mode 100644 (file)
index 0000000..946408f
--- /dev/null
@@ -0,0 +1,64 @@
+#include "bbSlicerMRIBiasFieldCorrection.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, MRIBiasFieldCorrection )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( MRIBiasFieldCorrection, bbtk::AtomicBlackBox );
+
+    void MRIBiasFieldCorrection::Process ( ) {
+
+        // GENERATED
+
+int _argc =10;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libMRIBiasFieldCorrectionLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--inputImage"  ) + Mthd::Aux::toString( bbGetInputInputImage( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--inputMask"  ) + Mthd::Aux::toString( bbGetInputInputMask( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--outputImage"  ) + Mthd::Aux::toString( bbGetInputOutputImage( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--algorithmType"  ) + Mthd::Aux::toString( bbGetInputAlgorithmType( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--shrinkFactor"  ) + Mthd::Aux::toString( bbGetInputShrinkFactor( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--maximumNumberOfIterations"  ) + Mthd::Aux::toString( bbGetInputMaximumNumberOfIterations( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--numberOfFittingLevels"  ) + Mthd::Aux::toString( bbGetInputNumberOfFittingLevels( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--wienerFilterNoise"  ) + Mthd::Aux::toString( bbGetInputWienerFilterNoise( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--fullWidthAtHalfMaximum"  ) + Mthd::Aux::toString( bbGetInputFullWidthAtHalfMaximum( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--convergenceThreshold"  ) + Mthd::Aux::toString( bbGetInputConvergenceThreshold( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void MRIBiasFieldCorrection::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void MRIBiasFieldCorrection::bbUserSetDefaultValues ( ) {
+    }
+
+    void MRIBiasFieldCorrection::bbUserInitializeProcessing ( ) {
+    }
+
+    void MRIBiasFieldCorrection::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMRIBiasFieldCorrection.h b/bbtk_Slicer_PKG/src/bbSlicerMRIBiasFieldCorrection.h
new file mode 100644 (file)
index 0000000..7b491ff
--- /dev/null
@@ -0,0 +1,76 @@
+#ifndef __bbSlicerMRIBiasFieldCorrection_h_INCLUDED__
+#define __bbSlicerMRIBiasFieldCorrection_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT MRIBiasFieldCorrection
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( MRIBiasFieldCorrection , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( InputImage , std::string );
+BBTK_DECLARE_INPUT ( InputMask , std::string );
+BBTK_DECLARE_INPUT ( OutputImage , std::string );
+BBTK_DECLARE_INPUT ( AlgorithmType , std::string );
+BBTK_DECLARE_INPUT ( ShrinkFactor , int );
+BBTK_DECLARE_INPUT ( MaximumNumberOfIterations , int );
+BBTK_DECLARE_INPUT ( NumberOfFittingLevels , int );
+BBTK_DECLARE_INPUT ( WienerFilterNoise , double );
+BBTK_DECLARE_INPUT ( FullWidthAtHalfMaximum , double );
+BBTK_DECLARE_INPUT ( ConvergenceThreshold , double );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( MRIBiasFieldCorrection , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "MRIBiasFieldCorrection" ) ;
+    BBTK_AUTHOR ( "Sylvain Jaume (MIT)" ) ;
+    BBTK_DESCRIPTION ( "Corrects 3D MRI images corrupted by MRI gain field effect.  This module removes the slow-varying intensity variation from a 3D image.  The output image has a higher contrast locally and the visualization and reading of the image are improved.  This is an important pre-processinbg step for image operations requiring intensity perfect images, such as the Expectation Maximization segmentation (see EMSegment module). The N3 and N4 methods are described in N4ITK: Nick's N3 ITK Implementation For MRI Bias Field Correction, Tustison N., Gee J., Insight Journal, 2009. http://hdl.handle.net/10380/3053 The Slicer code was contributed by Sylvain Jaume (MIT) for NA-MIC (http://na-mic.org)." ) ;
+    BBTK_CATEGORY ( "Legacy.Filtering" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(MRIBiasFieldCorrection , InputImage , "InputImage" , std::string, "");
+BBTK_INPUT(MRIBiasFieldCorrection , InputMask , "InputMask" , std::string, "");
+BBTK_INPUT(MRIBiasFieldCorrection , OutputImage , "OutputImage" , std::string, "");
+BBTK_INPUT(MRIBiasFieldCorrection , AlgorithmType , "AlgorithmType" , std::string, "");
+BBTK_INPUT(MRIBiasFieldCorrection , ShrinkFactor , "ShrinkFactor" , int, "");
+BBTK_INPUT(MRIBiasFieldCorrection , MaximumNumberOfIterations , "MaximumNumberOfIterations" , int, "");
+BBTK_INPUT(MRIBiasFieldCorrection , NumberOfFittingLevels , "NumberOfFittingLevels" , int, "");
+BBTK_INPUT(MRIBiasFieldCorrection , WienerFilterNoise , "WienerFilterNoise" , double, "");
+BBTK_INPUT(MRIBiasFieldCorrection , FullWidthAtHalfMaximum , "FullWidthAtHalfMaximum" , double, "");
+BBTK_INPUT(MRIBiasFieldCorrection , ConvergenceThreshold , "ConvergenceThreshold" , double, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( MRIBiasFieldCorrection ) ;
+}
+
+#endif // __bbSlicerMRIBiasFieldCorrection_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMaskImage.cxx b/bbtk_Slicer_PKG/src/bbSlicerMaskImage.cxx
new file mode 100644 (file)
index 0000000..e657ec1
--- /dev/null
@@ -0,0 +1,59 @@
+#include "bbSlicerMaskImage.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, MaskImage )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( MaskImage, bbtk::AtomicBlackBox );
+
+    void MaskImage::Process ( ) {
+
+        // GENERATED
+
+int _argc =5;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libMaskLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputInputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputMaskVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputOutputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-l"  ) + Mthd::Aux::toString( bbGetInputLabel( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-r"  ) + Mthd::Aux::toString( bbGetInputReplace( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void MaskImage::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void MaskImage::bbUserSetDefaultValues ( ) {
+    }
+
+    void MaskImage::bbUserInitializeProcessing ( ) {
+    }
+
+    void MaskImage::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMaskImage.h b/bbtk_Slicer_PKG/src/bbSlicerMaskImage.h
new file mode 100644 (file)
index 0000000..1dbe285
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef __bbSlicerMaskImage_h_INCLUDED__
+#define __bbSlicerMaskImage_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT MaskImage
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( MaskImage , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( InputVolume , std::string );
+BBTK_DECLARE_INPUT ( MaskVolume , std::string );
+BBTK_DECLARE_INPUT ( OutputVolume , std::string );
+BBTK_DECLARE_INPUT ( Label , int );
+BBTK_DECLARE_INPUT ( Replace , int );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( MaskImage , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "MaskImage" ) ;
+    BBTK_AUTHOR ( "Nicole Aucoin, BWH (Ron Kikinis, BWH)" ) ;
+    BBTK_DESCRIPTION ( "Masks two images. The output image is set to 0 everywhere except where the chosen label from the mask volume is present, at which point it will retain it's original values. Although all image types are supported on input, only signed types are produced. The two images do not have to have the same dimensions." ) ;
+    BBTK_CATEGORY ( "Filtering.Arithmetic" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(MaskImage , InputVolume , "InputVolume" , std::string, "");
+BBTK_INPUT(MaskImage , MaskVolume , "MaskVolume" , std::string, "");
+BBTK_INPUT(MaskImage , OutputVolume , "OutputVolume" , std::string, "");
+BBTK_INPUT(MaskImage , Label , "Label" , int, "");
+BBTK_INPUT(MaskImage , Replace , "Replace" , int, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( MaskImage ) ;
+}
+
+#endif // __bbSlicerMaskImage_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMergeModels.cxx b/bbtk_Slicer_PKG/src/bbSlicerMergeModels.cxx
new file mode 100644 (file)
index 0000000..fec4de3
--- /dev/null
@@ -0,0 +1,57 @@
+#include "bbSlicerMergeModels.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, MergeModels )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( MergeModels, bbtk::AtomicBlackBox );
+
+    void MergeModels::Process ( ) {
+
+        // GENERATED
+
+int _argc =3;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libMergeModelsLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputModel1( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputModel2( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputModelOutput( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void MergeModels::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void MergeModels::bbUserSetDefaultValues ( ) {
+    }
+
+    void MergeModels::bbUserInitializeProcessing ( ) {
+    }
+
+    void MergeModels::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMergeModels.h b/bbtk_Slicer_PKG/src/bbSlicerMergeModels.h
new file mode 100644 (file)
index 0000000..2ff5f2d
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef __bbSlicerMergeModels_h_INCLUDED__
+#define __bbSlicerMergeModels_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT MergeModels
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( MergeModels , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( Model1 , std::string );
+BBTK_DECLARE_INPUT ( Model2 , std::string );
+BBTK_DECLARE_INPUT ( ModelOutput , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( MergeModels , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "MergeModels" ) ;
+    BBTK_AUTHOR ( "Nicole Aucoin BWH (Ron Kikinis, BWH), Daniel Haehn" ) ;
+    BBTK_DESCRIPTION ( "Merge the polydata from two input models and output a new model with the added polydata. Uses the vtkAppendPolyData filter. Works on .vtp and .vtk surface files." ) ;
+    BBTK_CATEGORY ( "Surface Models" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(MergeModels , Model1 , "Model1" , std::string, "");
+BBTK_INPUT(MergeModels , Model2 , "Model2" , std::string, "");
+BBTK_INPUT(MergeModels , ModelOutput , "ModelOutput" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( MergeModels ) ;
+}
+
+#endif // __bbSlicerMergeModels_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMultiplyImages.cxx b/bbtk_Slicer_PKG/src/bbSlicerMultiplyImages.cxx
new file mode 100644 (file)
index 0000000..d7afe4c
--- /dev/null
@@ -0,0 +1,58 @@
+#include "bbSlicerMultiplyImages.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, MultiplyImages )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( MultiplyImages, bbtk::AtomicBlackBox );
+
+    void MultiplyImages::Process ( ) {
+
+        // GENERATED
+
+int _argc =4;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libMultiplyLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume1( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume2( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--order"  ) + Mthd::Aux::toString( bbGetInputorder( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void MultiplyImages::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void MultiplyImages::bbUserSetDefaultValues ( ) {
+    }
+
+    void MultiplyImages::bbUserInitializeProcessing ( ) {
+    }
+
+    void MultiplyImages::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerMultiplyImages.h b/bbtk_Slicer_PKG/src/bbSlicerMultiplyImages.h
new file mode 100644 (file)
index 0000000..4b41b7e
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbSlicerMultiplyImages_h_INCLUDED__
+#define __bbSlicerMultiplyImages_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT MultiplyImages
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( MultiplyImages , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( inputVolume1 , std::string );
+BBTK_DECLARE_INPUT ( inputVolume2 , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+BBTK_DECLARE_INPUT ( order , int );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( MultiplyImages , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "MultiplyImages" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "Multiplies two images. Although all image types are supported on input, only signed types are produced. The two images do not have to have the same dimensions." ) ;
+    BBTK_CATEGORY ( "Filtering.Arithmetic" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(MultiplyImages , inputVolume1 , "inputVolume1" , std::string, "");
+BBTK_INPUT(MultiplyImages , inputVolume2 , "inputVolume2" , std::string, "");
+BBTK_INPUT(MultiplyImages , outputVolume , "outputVolume" , std::string, "");
+BBTK_INPUT(MultiplyImages , order , "order" , int, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( MultiplyImages ) ;
+}
+
+#endif // __bbSlicerMultiplyImages_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerOrientImages.cxx b/bbtk_Slicer_PKG/src/bbSlicerOrientImages.cxx
new file mode 100644 (file)
index 0000000..ad000d5
--- /dev/null
@@ -0,0 +1,57 @@
+#include "bbSlicerOrientImages.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, OrientImages )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( OrientImages, bbtk::AtomicBlackBox );
+
+    void OrientImages::Process ( ) {
+
+        // GENERATED
+
+int _argc =3;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libOrientImageLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume1( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-o"  ) + Mthd::Aux::toString( bbGetInputorientation( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void OrientImages::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void OrientImages::bbUserSetDefaultValues ( ) {
+    }
+
+    void OrientImages::bbUserInitializeProcessing ( ) {
+    }
+
+    void OrientImages::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerOrientImages.h b/bbtk_Slicer_PKG/src/bbSlicerOrientImages.h
new file mode 100644 (file)
index 0000000..aa56ba3
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef __bbSlicerOrientImages_h_INCLUDED__
+#define __bbSlicerOrientImages_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT OrientImages
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( OrientImages , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( inputVolume1 , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+BBTK_DECLARE_INPUT ( orientation , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( OrientImages , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "OrientImages" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "Orients an output volume. Rearranges the slices in a volume according to the selected orientation. The slices are not interpolated. They are just reordered and/or permuted. The resulting volume will cover the original volume. NOTE: since Slicer takes into account the orientation of a volume, the re-oriented volume will not show any difference from the original volume, To see the difference, save the volume and display it with a system that either ignores the orientation of the image (e.g. Paraview) or displays individual images." ) ;
+    BBTK_CATEGORY ( "Converters" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(OrientImages , inputVolume1 , "inputVolume1" , std::string, "");
+BBTK_INPUT(OrientImages , outputVolume , "outputVolume" , std::string, "");
+BBTK_INPUT(OrientImages , orientation , "orientation" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( OrientImages ) ;
+}
+
+#endif // __bbSlicerOrientImages_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.cxx b/bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.cxx
new file mode 100644 (file)
index 0000000..7b0ad99
--- /dev/null
@@ -0,0 +1,60 @@
+#include "bbSlicerOtsuThresholdSegmentation.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, OtsuThresholdSegmentation )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( OtsuThresholdSegmentation, bbtk::AtomicBlackBox );
+
+    void OtsuThresholdSegmentation::Process ( ) {
+
+        // GENERATED
+
+int _argc =6;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libOtsuThresholdSegmentationLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--brightObjects"  ) + Mthd::Aux::toString( bbGetInputbrightObjects( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--numberOfBins"  ) + Mthd::Aux::toString( bbGetInputnumberOfBins( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--faceConnected"  ) + Mthd::Aux::toString( bbGetInputfaceConnected( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--minimumObjectSize"  ) + Mthd::Aux::toString( bbGetInputminimumObjectSize( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void OtsuThresholdSegmentation::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void OtsuThresholdSegmentation::bbUserSetDefaultValues ( ) {
+    }
+
+    void OtsuThresholdSegmentation::bbUserInitializeProcessing ( ) {
+    }
+
+    void OtsuThresholdSegmentation::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.h b/bbtk_Slicer_PKG/src/bbSlicerOtsuThresholdSegmentation.h
new file mode 100644 (file)
index 0000000..f05b8f9
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__
+#define __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT OtsuThresholdSegmentation
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( OtsuThresholdSegmentation , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( brightObjects , bool );
+BBTK_DECLARE_INPUT ( numberOfBins , int );
+BBTK_DECLARE_INPUT ( faceConnected , bool );
+BBTK_DECLARE_INPUT ( minimumObjectSize , int );
+BBTK_DECLARE_INPUT ( inputVolume , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( OtsuThresholdSegmentation , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "OtsuThresholdSegmentation" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "This filter creates a labeled image from a grayscale image. First, it calculates an optimal threshold that separates the image into foreground and background. This threshold separates those two classes so that their intra-class variance is minimal (see http://en.wikipedia.org/wiki/Otsu%27s_method). Then the filter runs a connected component algorithm to generate unique labels for each connected region of the foreground. Finally, the resulting image is relabeled to provide consecutive numbering." ) ;
+    BBTK_CATEGORY ( "Legacy.Segmentation" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(OtsuThresholdSegmentation , brightObjects , "brightObjects" , bool, "");
+BBTK_INPUT(OtsuThresholdSegmentation , numberOfBins , "numberOfBins" , int, "");
+BBTK_INPUT(OtsuThresholdSegmentation , faceConnected , "faceConnected" , bool, "");
+BBTK_INPUT(OtsuThresholdSegmentation , minimumObjectSize , "minimumObjectSize" , int, "");
+BBTK_INPUT(OtsuThresholdSegmentation , inputVolume , "inputVolume" , std::string, "");
+BBTK_INPUT(OtsuThresholdSegmentation , outputVolume , "outputVolume" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( OtsuThresholdSegmentation ) ;
+}
+
+#endif // __bbSlicerOtsuThresholdSegmentation_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerPolyDataToLabelMap.cxx b/bbtk_Slicer_PKG/src/bbSlicerPolyDataToLabelMap.cxx
new file mode 100644 (file)
index 0000000..c5d57d7
--- /dev/null
@@ -0,0 +1,58 @@
+#include "bbSlicerPolyDataToLabelMap.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, PolyDataToLabelMap )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( PolyDataToLabelMap, bbtk::AtomicBlackBox );
+
+    void PolyDataToLabelMap::Process ( ) {
+
+        // GENERATED
+
+int _argc =4;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libPolyDataToLabelmapLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--distance"  ) + Mthd::Aux::toString( bbGetInputsampleDistance( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputInputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputsurface( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputOutputVolume( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void PolyDataToLabelMap::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void PolyDataToLabelMap::bbUserSetDefaultValues ( ) {
+    }
+
+    void PolyDataToLabelMap::bbUserInitializeProcessing ( ) {
+    }
+
+    void PolyDataToLabelMap::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerPolyDataToLabelMap.h b/bbtk_Slicer_PKG/src/bbSlicerPolyDataToLabelMap.h
new file mode 100644 (file)
index 0000000..b35d201
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbSlicerPolyDataToLabelMap_h_INCLUDED__
+#define __bbSlicerPolyDataToLabelMap_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT PolyDataToLabelMap
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( PolyDataToLabelMap , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( sampleDistance , float );
+BBTK_DECLARE_INPUT ( InputVolume , std::string );
+BBTK_DECLARE_INPUT ( surface , std::string );
+BBTK_DECLARE_INPUT ( OutputVolume , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( PolyDataToLabelMap , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "PolyDataToLabelMap" ) ;
+    BBTK_AUTHOR ( "Nicole Aucoin BWH, Xiaodong Tao, GE" ) ;
+    BBTK_DESCRIPTION ( "Intersects an input model with an reference volume and produces an output label map." ) ;
+    BBTK_CATEGORY ( "Surface Models" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(PolyDataToLabelMap , sampleDistance , "sampleDistance" , float, "");
+BBTK_INPUT(PolyDataToLabelMap , InputVolume , "InputVolume" , std::string, "");
+BBTK_INPUT(PolyDataToLabelMap , surface , "surface" , std::string, "");
+BBTK_INPUT(PolyDataToLabelMap , OutputVolume , "OutputVolume" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( PolyDataToLabelMap ) ;
+}
+
+#endif // __bbSlicerPolyDataToLabelMap_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerRobustStatisticsSegmentation.cxx b/bbtk_Slicer_PKG/src/bbSlicerRobustStatisticsSegmentation.cxx
new file mode 100644 (file)
index 0000000..9c4da33
--- /dev/null
@@ -0,0 +1,62 @@
+#include "bbSlicerRobustStatisticsSegmentation.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, RobustStatisticsSegmentation )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( RobustStatisticsSegmentation, bbtk::AtomicBlackBox );
+
+    void RobustStatisticsSegmentation::Process ( ) {
+
+        // GENERATED
+
+int _argc =8;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libRobustStatSegmenterLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-v"  ) + Mthd::Aux::toString( bbGetInputexpectedVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--intensityHomogeneity"  ) + Mthd::Aux::toString( bbGetInputintensityHomogeneity( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-c"  ) + Mthd::Aux::toString( bbGetInputcurvatureWeight( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--labelValue"  ) + Mthd::Aux::toString( bbGetInputlabelValue( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--maxRunningTime"  ) + Mthd::Aux::toString( bbGetInputmaxRunningTime( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoriginalImageFileName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputlabelImageFileName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputsegmentedImageFileName( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void RobustStatisticsSegmentation::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void RobustStatisticsSegmentation::bbUserSetDefaultValues ( ) {
+    }
+
+    void RobustStatisticsSegmentation::bbUserInitializeProcessing ( ) {
+    }
+
+    void RobustStatisticsSegmentation::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerRobustStatisticsSegmentation.h b/bbtk_Slicer_PKG/src/bbSlicerRobustStatisticsSegmentation.h
new file mode 100644 (file)
index 0000000..404a527
--- /dev/null
@@ -0,0 +1,72 @@
+#ifndef __bbSlicerRobustStatisticsSegmentation_h_INCLUDED__
+#define __bbSlicerRobustStatisticsSegmentation_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT RobustStatisticsSegmentation
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( RobustStatisticsSegmentation , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( expectedVolume , double );
+BBTK_DECLARE_INPUT ( intensityHomogeneity , double );
+BBTK_DECLARE_INPUT ( curvatureWeight , double );
+BBTK_DECLARE_INPUT ( labelValue , int );
+BBTK_DECLARE_INPUT ( maxRunningTime , double );
+BBTK_DECLARE_INPUT ( originalImageFileName , std::string );
+BBTK_DECLARE_INPUT ( labelImageFileName , std::string );
+BBTK_DECLARE_INPUT ( segmentedImageFileName , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( RobustStatisticsSegmentation , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "RobustStatisticsSegmentation" ) ;
+    BBTK_AUTHOR ( "Yi Gao, Allen Tannenbaum, Ron Kikinis" ) ;
+    BBTK_DESCRIPTION ( "Active contour segmentation using robust statistic." ) ;
+    BBTK_CATEGORY ( "Segmentation.Specialized" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(RobustStatisticsSegmentation , expectedVolume , "expectedVolume" , double, "");
+BBTK_INPUT(RobustStatisticsSegmentation , intensityHomogeneity , "intensityHomogeneity" , double, "");
+BBTK_INPUT(RobustStatisticsSegmentation , curvatureWeight , "curvatureWeight" , double, "");
+BBTK_INPUT(RobustStatisticsSegmentation , labelValue , "labelValue" , int, "");
+BBTK_INPUT(RobustStatisticsSegmentation , maxRunningTime , "maxRunningTime" , double, "");
+BBTK_INPUT(RobustStatisticsSegmentation , originalImageFileName , "originalImageFileName" , std::string, "");
+BBTK_INPUT(RobustStatisticsSegmentation , labelImageFileName , "labelImageFileName" , std::string, "");
+BBTK_INPUT(RobustStatisticsSegmentation , segmentedImageFileName , "segmentedImageFileName" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( RobustStatisticsSegmentation ) ;
+}
+
+#endif // __bbSlicerRobustStatisticsSegmentation_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerSimpleIOTest.cxx b/bbtk_Slicer_PKG/src/bbSlicerSimpleIOTest.cxx
new file mode 100644 (file)
index 0000000..11b5ec4
--- /dev/null
@@ -0,0 +1,56 @@
+#include "bbSlicerSimpleIOTest.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, SimpleIOTest )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( SimpleIOTest, bbtk::AtomicBlackBox );
+
+    void SimpleIOTest::Process ( ) {
+
+        // GENERATED
+
+int _argc =2;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libDiffusionTensorTestLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void SimpleIOTest::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void SimpleIOTest::bbUserSetDefaultValues ( ) {
+    }
+
+    void SimpleIOTest::bbUserInitializeProcessing ( ) {
+    }
+
+    void SimpleIOTest::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerSimpleIOTest.h b/bbtk_Slicer_PKG/src/bbSlicerSimpleIOTest.h
new file mode 100644 (file)
index 0000000..d0d353a
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef __bbSlicerSimpleIOTest_h_INCLUDED__
+#define __bbSlicerSimpleIOTest_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT SimpleIOTest
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( SimpleIOTest , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( inputVolume , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( SimpleIOTest , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "SimpleIOTest" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "Simple test of tensor IO" ) ;
+    BBTK_CATEGORY ( "Legacy.Work in Progress.Diffusion Tensor.Test" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(SimpleIOTest , inputVolume , "inputVolume" , std::string, "");
+BBTK_INPUT(SimpleIOTest , outputVolume , "outputVolume" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( SimpleIOTest ) ;
+}
+
+#endif // __bbSlicerSimpleIOTest_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerSubtractImages.cxx b/bbtk_Slicer_PKG/src/bbSlicerSubtractImages.cxx
new file mode 100644 (file)
index 0000000..61efd45
--- /dev/null
@@ -0,0 +1,58 @@
+#include "bbSlicerSubtractImages.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, SubtractImages )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( SubtractImages, bbtk::AtomicBlackBox );
+
+    void SubtractImages::Process ( ) {
+
+        // GENERATED
+
+int _argc =4;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libSubtractLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume1( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputinputVolume2( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputoutputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--order"  ) + Mthd::Aux::toString( bbGetInputorder( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void SubtractImages::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void SubtractImages::bbUserSetDefaultValues ( ) {
+    }
+
+    void SubtractImages::bbUserInitializeProcessing ( ) {
+    }
+
+    void SubtractImages::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerSubtractImages.h b/bbtk_Slicer_PKG/src/bbSlicerSubtractImages.h
new file mode 100644 (file)
index 0000000..2a53b19
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbSlicerSubtractImages_h_INCLUDED__
+#define __bbSlicerSubtractImages_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT SubtractImages
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( SubtractImages , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( inputVolume1 , std::string );
+BBTK_DECLARE_INPUT ( inputVolume2 , std::string );
+BBTK_DECLARE_INPUT ( outputVolume , std::string );
+BBTK_DECLARE_INPUT ( order , int );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( SubtractImages , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "SubtractImages" ) ;
+    BBTK_AUTHOR ( "Bill Lorensen" ) ;
+    BBTK_DESCRIPTION ( "Subtracts two images. Although all image types are supported on input, only sugned types are produced. The two images do not have to have the same dimensions." ) ;
+    BBTK_CATEGORY ( "Filtering.Arithmetic" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(SubtractImages , inputVolume1 , "inputVolume1" , std::string, "");
+BBTK_INPUT(SubtractImages , inputVolume2 , "inputVolume2" , std::string, "");
+BBTK_INPUT(SubtractImages , outputVolume , "outputVolume" , std::string, "");
+BBTK_INPUT(SubtractImages , order , "order" , int, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( SubtractImages ) ;
+}
+
+#endif // __bbSlicerSubtractImages_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerTestGridTransformregistration.cxx b/bbtk_Slicer_PKG/src/bbSlicerTestGridTransformregistration.cxx
new file mode 100644 (file)
index 0000000..b9a81fe
--- /dev/null
@@ -0,0 +1,58 @@
+#include "bbSlicerTestGridTransformregistration.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, TestGridTransformregistration )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( TestGridTransformregistration, bbtk::AtomicBlackBox );
+
+    void TestGridTransformregistration::Process ( ) {
+
+        // GENERATED
+
+int _argc =4;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libTestGridTransformRegistrationLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-g"  ) + Mthd::Aux::toString( bbGetInputgridSize( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--outputtransform"  ) + Mthd::Aux::toString( bbGetInputOutputTransform( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputFixedImageFileName( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputMovingImageFileName( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void TestGridTransformregistration::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void TestGridTransformregistration::bbUserSetDefaultValues ( ) {
+    }
+
+    void TestGridTransformregistration::bbUserInitializeProcessing ( ) {
+    }
+
+    void TestGridTransformregistration::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerTestGridTransformregistration.h b/bbtk_Slicer_PKG/src/bbSlicerTestGridTransformregistration.h
new file mode 100644 (file)
index 0000000..e7e7d54
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __bbSlicerTestGridTransformregistration_h_INCLUDED__
+#define __bbSlicerTestGridTransformregistration_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT TestGridTransformregistration
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( TestGridTransformregistration , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( gridSize , int );
+BBTK_DECLARE_INPUT ( OutputTransform , std::string );
+BBTK_DECLARE_INPUT ( FixedImageFileName , std::string );
+BBTK_DECLARE_INPUT ( MovingImageFileName , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( TestGridTransformregistration , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "TestGridTransformregistration" ) ;
+    BBTK_AUTHOR ( "Yinglin Lee" ) ;
+    BBTK_DESCRIPTION ( "Generates a GridTransform to test the communication facilities" ) ;
+    BBTK_CATEGORY ( "Legacy.Registration" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(TestGridTransformregistration , gridSize , "gridSize" , int, "");
+BBTK_INPUT(TestGridTransformregistration , OutputTransform , "OutputTransform" , std::string, "");
+BBTK_INPUT(TestGridTransformregistration , FixedImageFileName , "FixedImageFileName" , std::string, "");
+BBTK_INPUT(TestGridTransformregistration , MovingImageFileName , "MovingImageFileName" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( TestGridTransformregistration ) ;
+}
+
+#endif // __bbSlicerTestGridTransformregistration_h_INCLUDED__
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerThresholdImage.cxx b/bbtk_Slicer_PKG/src/bbSlicerThresholdImage.cxx
new file mode 100644 (file)
index 0000000..611ce07
--- /dev/null
@@ -0,0 +1,61 @@
+#include "bbSlicerThresholdImage.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+    BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, ThresholdImage )
+    BBTK_BLACK_BOX_IMPLEMENTATION ( ThresholdImage, bbtk::AtomicBlackBox );
+
+    void ThresholdImage::Process ( ) {
+
+        // GENERATED
+
+int _argc =7;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libThresholdLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputInputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( bbGetInputOutputVolume( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-t"  ) + Mthd::Aux::toString( bbGetInputThresholdValue( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-l"  ) + Mthd::Aux::toString( bbGetInputLower( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-u"  ) + Mthd::Aux::toString( bbGetInputUpper( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "-v"  ) + Mthd::Aux::toString( bbGetInputOutsideValue( ) ) ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--thresholdtype"  ) + Mthd::Aux::toString( bbGetInputThresholdType( ) ) ) };
+
+        // EO GENERATED
+        this->execute( lib, _argc, _argv );
+
+    }
+
+    void ThresholdImage::execute ( std::string lib, int _argc, char * _argv[] ) {
+        void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+        if ( ! handle ) {
+            std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+            return;
+        }
+        typedef int (*method_t )( int argc, char * argv[] );
+        // RESET ERROR
+        dlerror( );
+        // PROTOTYPE
+        method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+        const char *dlsym_error = dlerror( );
+        if ( dlsym_error ) {
+            std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+            dlclose( handle );
+            return;
+        }
+        // METHOD CALL
+        myMethod( _argc, _argv );
+        // CLOSING LIB
+        dlclose( handle );
+    }
+
+    void ThresholdImage::bbUserSetDefaultValues ( ) {
+    }
+
+    void ThresholdImage::bbUserInitializeProcessing ( ) {
+    }
+
+    void ThresholdImage::bbUserFinalizeProcessing ( ) {
+    }
+}
+// EO namespace bbSlicer
+
+
diff --git a/bbtk_Slicer_PKG/src/bbSlicerThresholdImage.h b/bbtk_Slicer_PKG/src/bbSlicerThresholdImage.h
new file mode 100644 (file)
index 0000000..622007f
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef __bbSlicerThresholdImage_h_INCLUDED__
+#define __bbSlicerThresholdImage_h_INCLUDED__
+
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+#include <vector>
+#include <cstdlib>
+#include <dlfcn.h>
+#include <sstream>
+#include <fstream>
+#include <iostream>
+
+#include <ModuleDescriptionUtilities.h>
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT ThresholdImage
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( ThresholdImage , bbtk::AtomicBlackBox ) ;
+
+        // GENERATED ARGS        
+        
+BBTK_DECLARE_INPUT ( InputVolume , std::string );
+BBTK_DECLARE_INPUT ( OutputVolume , std::string );
+BBTK_DECLARE_INPUT ( ThresholdValue , int );
+BBTK_DECLARE_INPUT ( Lower , int );
+BBTK_DECLARE_INPUT ( Upper , int );
+BBTK_DECLARE_INPUT ( OutsideValue , int );
+BBTK_DECLARE_INPUT ( ThresholdType , std::string );
+
+        // EO GENERATED ARGS
+
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+    private:
+        void execute ( std::string lib , int _argc , char * _argv[] ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( ThresholdImage , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "ThresholdImage" ) ;
+    BBTK_AUTHOR ( "Nicole Aucoin, BWH (Ron Kikinis, BWH)" ) ;
+    BBTK_DESCRIPTION ( "<p>Threshold an image.</p><p>Set image values to a user-specified outside value if they are below, above, or between simple threshold values.</p><p>ThresholdAbove: The values greater than or equal to the threshold value are set to OutsideValue.</p><p>ThresholdBelow: The values less than or equal to the threshold value are set to OutsideValue.</p><p>ThresholdOutside: The values outside the range Lower-Upper are set to OutsideValue.</p><p>Although all image types are supported on input, only signed types are produced.</p><p>" ) ;
+    BBTK_CATEGORY ( "Filtering" ) ;
+
+    // GENERATED DESCRPTION
+    
+BBTK_INPUT(ThresholdImage , InputVolume , "InputVolume" , std::string, "");
+BBTK_INPUT(ThresholdImage , OutputVolume , "OutputVolume" , std::string, "");
+BBTK_INPUT(ThresholdImage , ThresholdValue , "ThresholdValue" , int, "");
+BBTK_INPUT(ThresholdImage , Lower , "Lower" , int, "");
+BBTK_INPUT(ThresholdImage , Upper , "Upper" , int, "");
+BBTK_INPUT(ThresholdImage , OutsideValue , "OutsideValue" , int, "");
+BBTK_INPUT(ThresholdImage , ThresholdType , "ThresholdType" , std::string, "");
+
+    // EO GENERATED DESCRIPTION
+
+    BBTK_END_DESCRIBE_BLACK_BOX ( ThresholdImage ) ;
+}
+
+#endif // __bbSlicerThresholdImage_h_INCLUDED__
+
+