]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Tue, 8 Apr 2008 06:59:28 +0000 (06:59 +0000)
committerguigues <guigues>
Tue, 8 Apr 2008 06:59:28 +0000 (06:59 +0000)
75 files changed:
kernel/appli/bbfy/bbfy.cpp
kernel/src/bbtkAtomicBlackBox.cxx
kernel/src/bbtkAtomicBlackBox.h
kernel/src/bbtkAtomicBlackBoxDescriptor.h
kernel/src/bbtkAtomicBlackBoxInputDescriptor.cxx
kernel/src/bbtkAtomicBlackBoxInputDescriptor.h
kernel/src/bbtkAtomicBlackBoxMacros.h
kernel/src/bbtkAtomicBlackBoxOutputDescriptor.cxx
kernel/src/bbtkAtomicBlackBoxOutputDescriptor.h
kernel/src/bbtkBlackBox.cxx
kernel/src/bbtkBlackBox.h
kernel/src/bbtkBlackBoxDescriptor.h
kernel/src/bbtkBlackBoxInputDescriptor.h
kernel/src/bbtkBlackBoxInputOutputDescriptor.h
kernel/src/bbtkBlackBoxOutputDescriptor.h
kernel/src/bbtkComplexBlackBox.cxx
kernel/src/bbtkComplexBlackBoxDescriptor.cxx
kernel/src/bbtkComplexBlackBoxDescriptor.h
kernel/src/bbtkComplexBlackBoxInputDescriptor.cxx
kernel/src/bbtkComplexBlackBoxInputDescriptor.h
kernel/src/bbtkComplexBlackBoxOutputDescriptor.cxx
kernel/src/bbtkComplexBlackBoxOutputDescriptor.h
kernel/src/bbtkConnection.cxx
kernel/src/bbtkConnection.h
kernel/src/bbtkData.h
kernel/src/bbtkExecuter.cxx
kernel/src/bbtkExecuter.h
kernel/src/bbtkFactory.cxx
kernel/src/bbtkFactory.h
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkInterpreter.h
kernel/src/bbtkPackage.cxx
kernel/src/bbtkPackage.h
kernel/src/bbtkTranscriptor.cxx
kernel/src/bbtkTranscriptor.h
kernel/src/bbtkVirtualExec.h
kernel/src/bbtkWxBlackBox.cxx
kernel/src/bbtkWxBlackBox.h
kernel/src/bbtkWxGUIPackageBrowser2.cxx
packages/itk/src/bbitkBinaryThresholdImageFilter.h
packages/itk/src/bbitkExtractImageFilter.h
packages/itk/src/bbitkImageProperties.h
packages/itk/src/bbitkImageReader.h
packages/itk/src/bbitkImageRegion.h
packages/itk/src/bbitkImageSeriesReader.h
packages/itk/src/bbitkImageWriter.h
packages/itk/src/bbitkResampleImageFilter.h
packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.h
packages/itkvtk/src/bbitkvtkvtkImageData2itkImage.h
packages/std/src/bbstdASCII.h
packages/std/src/bbstdConcatStrings.h
packages/std/src/bbstdConfiguration.h
packages/std/src/bbstdExecBbiCommand.h
packages/std/src/bbstdExecSystemCommand.h
packages/std/src/bbstdMagicBox.h
packages/std/src/bbstdMakeFileName.h
packages/std/src/bbstdStringSelect.h
packages/vtk/src/bbvtkImagePlanes.h
packages/vtk/src/bbvtkIsoSurfaceExtractor.h
packages/vtk/src/bbvtkMIPCreator.h
packages/vtk/src/bbvtkMarchingCubes.h
packages/vtk/src/bbvtkMetaImageReader.xml
packages/wx/src/bbwxColourSelector.h
packages/wx/src/bbwxColourSelectorButton.h
packages/wx/src/bbwxCommandButton.h
packages/wx/src/bbwxDirectorySelector.h
packages/wx/src/bbwxFileSelector.h
packages/wx/src/bbwxInputText.h
packages/wx/src/bbwxLayoutLine.h
packages/wx/src/bbwxLayoutSplit.h
packages/wx/src/bbwxLayoutTab.h
packages/wx/src/bbwxRadioButton.h
packages/wx/src/bbwxSlider.h
packages/wxvtk/src/bbwxvtkViewer2D.h
packages/wxvtk/src/bbwxvtkViewer3D.h

index 0d78040..a7b8533 100644 (file)
@@ -87,6 +87,7 @@ private:
   {
     std::string name;
     std::string type;
+    std::string nature;
     std::string descr;
     std::string special;
     std::string generic_type;
@@ -361,6 +362,11 @@ void bbfy::ParseXML()
          io.special =  n.getAttribute("special");  
        }
 
+      if (n.isAttributeSet("nature")) 
+       {
+         io.nature =  n.getAttribute("nature");  
+       }
+
       if (n.isAttributeSet("generic_type")) 
        {
          io.generic_type =  n.getAttribute("generic_type");  
@@ -395,6 +401,11 @@ void bbfy::ParseXML()
          io.special =  n.getAttribute("special");  
        }
 
+      if (n.isAttributeSet("nature")) 
+       {
+         io.nature =  n.getAttribute("nature");  
+       }
+
       if (n.isAttributeSet("generic_type")) 
        {
          io.generic_type =  n.getAttribute("generic_type");  
@@ -755,7 +766,8 @@ void bbfy::CreateHeader()
          mFile << "BBTK_INPUT(";
        } 
       mFile << mName << "," << ioi->name << ",\""
-           << ioi->descr << "\"," <<  ioi->type <<");\n";
+           << ioi->descr << "\"," <<  ioi->type << ",\"" 
+           << ioi->nature<<"\");\n";
     }
   
   // Outputs
@@ -770,7 +782,8 @@ void bbfy::CreateHeader()
          mFile << "BBTK_OUTPUT(";
        } 
       mFile << mName << "," << ioi->name << ",\""
-           << ioi->descr << "\"," <<  ioi->type <<");\n";
+           << ioi->descr << "\"," <<  ioi->type << ",\"" 
+           << ioi->nature<<"\");\n";
     }
   
   // EO black box description
index 3f46046..981b16c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/20 15:27:56 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -70,9 +70,17 @@ namespace bbtk
   IOStatus AtomicBlackBox::bbBackwardUpdate( Connection* caller )
   {
     bbtkDebugMessageInc("Process",1,
-            "=> AtomicBlackBox::bbBackwardUpdate() ["
-            <<bbGetFullName()<<"]"<<std::endl);
+                       "=> AtomicBlackBox::bbBackwardUpdate("
+                       <<(caller?caller->GetFullName():"0")<<") ["
+                       <<bbGetFullName()<<"]"<<std::endl);
     
+    if (bbGetExecuting()) 
+      {
+       bbtkWarning(bbGetFullName()<<" : Cyclic execution stopped");
+       return UPTODATE;
+      }
+    bbSetExecuting(true);
+
     bbtkDebugMessage("Process",5,"Initial Status  = "<<bbGetStatus()
                     <<std::endl);
     bbtkDebugMessage("Process",5,"BoxProcessMode  = "
@@ -134,6 +142,8 @@ namespace bbtk
             <<bbGetFullName()<<"]"<<std::endl);
     bbtkDebugDecTab("Process",1);
 
+    bbSetExecuting(false);
+
     return bbGetStatus();
 
   }
index 4422063..02cb9a5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/20 16:05:38 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -85,7 +85,7 @@ namespace bbtk
     /// - updates its inputs by calling bbUpdateInputs (which recursively calls bbBackwardUpdate on upstream boxes)
     /// - calls bbProcess which here simply calls the user callback bbUserProcess which does the actual processing. 
     ///    bbProcess is overloaded in WxBlackBox to handle widget creation and show
-    IOStatus bbBackwardUpdate(Connection* caller);
+    virtual IOStatus bbBackwardUpdate(Connection* caller);
     //==================================================================
 
     //==================================================================
index d732b90..80201c6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 11:06:37 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -47,7 +47,8 @@ namespace bbtk
         bbtk::AtomicBlackBoxInputDescriptor
         (typeid(AtomicBlackBoxDescriptor),
          "BoxProcessMode",
-         "Sets the processing mode of the box (Pipeline | Always | Reactive)", 
+         "Sets the processing mode of the box (Pipeline | Always | Reactive)",
+         "",
          new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbGetInputBoxProcessMode), 
          new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbSetInputBoxProcessMode) ) );
       // Creates the input 'BoxExecute'
@@ -56,7 +57,8 @@ namespace bbtk
         bbtk::AtomicBlackBoxInputDescriptor
         (typeid(AtomicBlackBoxDescriptor),
          "BoxExecute",
-         "Any signal received by this input executes the box", 
+         "Any signal received by this input executes the box",
+         "",
          new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetInputBoxExecute), 
          new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetInputBoxExecute) ) );
       // Creates the output 'BoxChange'      
@@ -66,6 +68,7 @@ namespace bbtk
         (typeid(AtomicBlackBoxDescriptor),
          "BoxChange",
          "Signal modifications of the box", 
+         "",
          new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetOutputBoxChange), 
          new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetOutputBoxChange) ) );
       //
index b0c6e8c..2cc605e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxInputDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 11:06:37 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -28,21 +28,26 @@ namespace bbtk
   
   AtomicBlackBoxInputDescriptor::
   AtomicBlackBoxInputDescriptor( TypeInfo creator_type_info,
-                              const std::string& name,
-                              const std::string& description,
-                              AtomicBlackBoxGetFunctor* getfunctor,
-                              AtomicBlackBoxSetFunctor* setfunctor,
-                              bool copy_construct) 
+                                const std::string& name,
+                                const std::string& description,
+                                const std::string& nature,
+                                AtomicBlackBoxGetFunctor* getfunctor,
+                                AtomicBlackBoxSetFunctor* setfunctor,
+                                bool copy_construct) 
     : 
     BlackBoxInputDescriptor(creator_type_info,
-                           name,description,MANDATORY,copy_construct),
+                           name,description,
+                           nature,
+                           copy_construct,
+                           MANDATORY),
     mGetFunctor(getfunctor),
     mSetFunctor(setfunctor)
   {  
     bbtkDebugMessage("Kernel",9,
                     "AtomicBlackBoxInputDescriptor::"
                     <<"AtomicBlackBoxInputDescriptor(\""
-                    <<name<<"\",\""<<description<<"\","
+                    <<name<<"\",\""<<description<<"\",\""
+                    <<nature<<"\","
                     <<getfunctor<<","<<setfunctor<<","
                     <<copy_construct<<")"<<std::endl);
   }
index a44c420..1b02c51 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxInputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 11:06:37 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -47,12 +47,13 @@ namespace bbtk
 
       
     AtomicBlackBoxInputDescriptor( TypeInfo creator_type_info,
-                                const std::string& name,
-                                const std::string& description,
-                                AtomicBlackBoxGetFunctor* getfunctor,
-                                AtomicBlackBoxSetFunctor* setfunctor,
-                                bool copy_construct = true);
-
+                                  const std::string& name,
+                                  const std::string& description,
+                                  const std::string& nature,
+                                  AtomicBlackBoxGetFunctor* getfunctor,
+                                  AtomicBlackBoxSetFunctor* setfunctor,
+                                  bool copy_construct = true);
+    
     ~AtomicBlackBoxInputDescriptor();  
     /// Returns the type of the input
     TypeInfo GetTypeInfo() const { return mGetFunctor->GetTypeInfo(); }
@@ -71,7 +72,7 @@ namespace bbtk
   private:
     /// Default ctor is private 
     AtomicBlackBoxInputDescriptor() : 
-      BlackBoxInputDescriptor(typeid(void),"","") {}
+      BlackBoxInputDescriptor(typeid(void),"","","") {}
     /// The functor on the Get method
     AtomicBlackBoxGetFunctor* mGetFunctor;
     /// The functor on the Set method
index 46a6b95..605c10d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxMacros.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 14:15:52 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
   AddToCategory("adaptor")
 //============================================================================
 
+
 //============================================================================
 /// Describes a AtomicBlackBox input (to be put inside the UBB description block)
-#define BBTK_INPUT(CLASS,NAME,DESCR,TYPE)                              \
+#define BBTK_INPUT(CLASS,NAME,DESCR,TYPE,NATURE)                               \
   AddInputDescriptor(new bbtk::AtomicBlackBoxInputDescriptor           \
                     (typeid(CLASS ## Descriptor),                      \
-                     #NAME,DESCR,                                      \
+                     #NAME,DESCR,NATURE,                               \
                      new bbtk::AtomicBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
                      (&CLASS::bbGetInput##NAME),                       \
                      new bbtk::AtomicBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
 
 //============================================================================
 /// Describes a AtomicBlackBox output (to be put inside the UBB description block)
-#define BBTK_OUTPUT(CLASS,NAME,DESCR,TYPE)                             \
+#define BBTK_OUTPUT(CLASS,NAME,DESCR,TYPE,NATURE)                      \
   AddOutputDescriptor(new bbtk::AtomicBlackBoxOutputDescriptor         \
-                     (typeid(CLASS ## Descriptor),#NAME,DESCR,                         \
+                     (typeid(CLASS ## Descriptor),#NAME,DESCR,NATURE,  \
                       new bbtk::AtomicBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
                       (&CLASS::bbGetOutput##NAME),                     \
                       new bbtk::AtomicBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
                       (&CLASS::bbSetOutput##NAME) ) )
 //============================================================================
 
+
 //============================================================================
 /// Describes a AtomicBlackBox input (to be put inside the UBB description block)
-#define BBTK_INPUT_NOCOPY(CLASS,NAME,DESCR,TYPE)                       \
+#define BBTK_INPUT_NOCOPY(CLASS,NAME,DESCR,TYPE,NATURE)                        \
   AddInputDescriptor(new bbtk::AtomicBlackBoxInputDescriptor           \
-                    (typeid(CLASS ## Descriptor),#NAME,DESCR,                                  \
+                    (typeid(CLASS ## Descriptor),#NAME,DESCR,NATURE,   \
                      new bbtk::AtomicBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
                      (&CLASS::bbGetInput##NAME),                       \
                      new bbtk::AtomicBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
 
 //============================================================================
 /// Describes a AtomicBlackBox output (to be put inside the UBB description block)
-#define BBTK_OUTPUT_NOCOPY(CLASS,NAME,DESCR,TYPE)                      \
+#define BBTK_OUTPUT_NOCOPY(CLASS,NAME,DESCR,TYPE,NATURE)               \
   AddOutputDescriptor(new bbtk::AtomicBlackBoxOutputDescriptor         \
-                     (typeid(CLASS ## Descriptor),#NAME,DESCR,                         \
+                     (typeid(CLASS ## Descriptor),#NAME,DESCR,NATURE,  \
                       new bbtk::AtomicBlackBoxTGetFunctor<CLASS,TYPE,TYPE > \
                       (&CLASS::bbGetOutput##NAME),                     \
                       new bbtk::AtomicBlackBoxTSetFunctor<CLASS,TYPE,TYPE > \
 /// Describes a template AtomicBlackBox input (to be put inside the template UBB description block)
 #define BBTK_TEMPLATE_INPUT(CLASS,NAME,DESCR,TYPE)                     \
   AddInputDescriptor(new bbtk::AtomicBlackBoxInputDescriptor           \
-                    (typeid(CLASS ## Descriptor),#NAME,DESCR,                                  \
+                    (typeid(CLASS ## Descriptor),#NAME,DESCR,"",       \
                      new bbtk::AtomicBlackBoxTGetFunctor<CLASS<T>,TYPE,TYPE > \
                      (&CLASS<T>::bbGetInput##NAME),                    \
                      new bbtk::AtomicBlackBoxTSetFunctor<CLASS<T>,TYPE,TYPE > \
 /// Describes a template AtomicBlackBox output (to be put inside the template UBB description block)
 #define BBTK_TEMPLATE_OUTPUT(CLASS,NAME,DESCR,TYPE)                    \
   AddOutputDescriptor(new bbtk::AtomicBlackBoxOutputDescriptor         \
-                     (typeid(CLASS ## Descriptor),#NAME,DESCR,                         \
+                     (typeid(CLASS ## Descriptor),#NAME,DESCR,"",      \
                       new bbtk::AtomicBlackBoxTGetFunctor<CLASS<T>,TYPE,TYPE > \
                       (&CLASS<T>::bbGetOutput##NAME),                  \
                       new bbtk::AtomicBlackBoxTSetFunctor<CLASS<T>,TYPE,TYPE > \
 /// Describes a 2 template params AtomicBlackBox input (to be put inside the UBB description block)
 #define BBTK_TEMPLATE2_INPUT(CLASS,NAME,DESCR,TYPE)                    \
   AddInputDescriptor(new bbtk::AtomicBlackBoxInputDescriptor           \
-                    (typeid(CLASS ## Descriptor),#NAME,DESCR,                                  \
+                    (typeid(CLASS ## Descriptor),#NAME,DESCR,"",       \
                      new bbtk::AtomicBlackBoxTGetFunctor<CLASS<T1,T2>,TYPE,TYPE >      \
                      (&CLASS<T1,T2>::bbGetInput##NAME),                \
                      new bbtk::AtomicBlackBoxTSetFunctor<CLASS<T1,T2>,TYPE,TYPE >      \
 /// Describes a 2 template params AtomicBlackBox output (to be put inside the UBB description block)
 #define BBTK_TEMPLATE2_OUTPUT(CLASS,NAME,DESCR,TYPE)                   \
   AddOutputDescriptor(new bbtk::AtomicBlackBoxOutputDescriptor         \
-                     (typeid(CLASS ## Descriptor),#NAME,DESCR,                         \
+                     (typeid(CLASS ## Descriptor),#NAME,DESCR,"",      \
                       new bbtk::AtomicBlackBoxTGetFunctor<CLASS<T1,T2>,TYPE,TYPE > \
                       (&CLASS<T1,T2>::bbGetOutput##NAME),              \
                       new bbtk::AtomicBlackBoxTSetFunctor<CLASS<T1,T2>,TYPE,TYPE > \
index db79f8f..ae0aa69 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxOutputDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 11:06:37 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -29,14 +29,16 @@ namespace bbtk
 
   AtomicBlackBoxOutputDescriptor::
   AtomicBlackBoxOutputDescriptor( TypeInfo creator_type_info,
-                               const std::string& name,
-                               const std::string& description,
-                               AtomicBlackBoxGetFunctor* getfunctor,
-                               AtomicBlackBoxSetFunctor* setfunctor,
-                               bool copy_construct ) 
+                                 const std::string& name,
+                                 const std::string& description,
+                                 const std::string& nature,
+                                 AtomicBlackBoxGetFunctor* getfunctor,
+                                 AtomicBlackBoxSetFunctor* setfunctor,
+                                 bool copy_construct ) 
     : 
     BlackBoxOutputDescriptor(creator_type_info,
-                            name,description,copy_construct),
+                            name,description,nature,
+                            copy_construct),
     mGetFunctor(getfunctor),
     mSetFunctor(setfunctor)
   {    
@@ -44,7 +46,8 @@ namespace bbtk
     bbtkDebugMessage("Kernel",9,
                     "AtomicBlackBoxOutputDescriptor::AtomicBlackBoxOutputDescriptor(\""
                     <<name<<"\",\""<<description
-                    <<"\""<<getfunctor<<","<<setfunctor
+                    <<"\",\""<<nature<<"\","
+                    <<getfunctor<<","<<setfunctor
                     <<","<<copy_construct<<")"<<std::endl);
   }
   
index 56db3be..d2f705b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBoxOutputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 11:06:37 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -42,11 +42,12 @@ namespace bbtk
   public:
       
     AtomicBlackBoxOutputDescriptor( TypeInfo creator_type_info,
-                                 const std::string& name,
-                                 const std::string& description,
-                                 AtomicBlackBoxGetFunctor* getfunctor,
-                                 AtomicBlackBoxSetFunctor* setfunctor,
-                                 bool copy_construct = true);
+                                   const std::string& name,
+                                   const std::string& description,
+                                   const std::string& nature,
+                                   AtomicBlackBoxGetFunctor* getfunctor,
+                                   AtomicBlackBoxSetFunctor* setfunctor,
+                                   bool copy_construct = true);
     ~AtomicBlackBoxOutputDescriptor();
     
     /// Returns the type of the input
@@ -65,7 +66,7 @@ namespace bbtk
   private:
     /// Default ctor is private 
     AtomicBlackBoxOutputDescriptor() : 
-      BlackBoxOutputDescriptor(typeid(void),"","") {}
+      BlackBoxOutputDescriptor(typeid(void),"","","") {}
     /// The functor on the Get method
     AtomicBlackBoxGetFunctor* mGetFunctor;
     /// The functor on the Set method
index bb409a1..cd26c11 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/03/11 18:46:47 $
-Version:   $Revision: 1.7 $
+Date:      $Date: 2008/04/08 06:59:29 $
+Version:   $Revision: 1.8 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See doc/license.txt or
@@ -44,8 +44,11 @@ namespace bbtk
 
   //=========================================================================
   BlackBox::BlackBox(const std::string &name) 
-    : bbmName(name), bbmStatus(MODIFIED), 
-      bbmBoxProcessMode("Pipeline"),bbmParent(NULL)
+    : bbmName(name), 
+      bbmStatus(MODIFIED), 
+      bbmBoxProcessMode("Pipeline"),
+      bbmParent(NULL),
+      bbmExecuting(false)
   {
     bbtkDebugMessage("Kernel",7,"BlackBox::BlackBox(\""
                     <<name<<"\")"<<std::endl);
@@ -57,7 +60,9 @@ namespace bbtk
   BlackBox::BlackBox(BlackBox& from, const std::string &name) 
     : bbmName(name), 
       bbmStatus(from.bbmStatus), 
-      bbmBoxProcessMode(from.bbmBoxProcessMode),bbmParent(NULL)
+      bbmBoxProcessMode(from.bbmBoxProcessMode),
+      bbmParent(NULL),
+      bbmExecuting(false)
   {
     bbtkDebugMessage("Kernel",7,"BlackBox::BlackBox("
                     <<from.bbGetFullName()<<",\""
@@ -95,7 +100,7 @@ namespace bbtk
     bbtkDebugMessageInc("Process",1,
                        "=> BlackBox::bbExecute() ["
                        <<bbGetFullName()<<"]"<<std::endl);
-
+ 
     Wx::BeginBusyCursor();
 
     // If execution frozen : return
index a9c2566..4fb82fa 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/11 18:46:47 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -364,6 +364,9 @@ bool reaction = true);
     virtual void bbCopyIOValues(BlackBox& from);
     //==================================================================
 
+    bool bbGetExecuting() const { return bbmExecuting; }
+    void bbSetExecuting(bool b) { bbmExecuting = b; }
+
   private:
     
  
@@ -387,6 +390,11 @@ bool reaction = true);
     BlackBox::Pointer bbmParent;
     //==================================================================
 
+    //==================================================================
+    // Am I executing (to test pipeline cycles) ?
+    bool bbmExecuting;
+    //==================================================================
+
    //==================================================================
     // ATTRIBUTES
     ///  Map that contains the output connectors of the black box
@@ -395,11 +403,7 @@ bool reaction = true);
     InputConnectorMapType mInputConnectorMap;
     //==================================================================
 
-/*EED    
-    static bool bbmgSomeBoxExecuting;
-    static bool bbmgFreezeExecution;
-    static std::set<BlackBox*> bbmgExecutionList;
-*/
+
  };
   // Class BlackBox
 
index 6443d50..0b70d94 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/07 08:40:14 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,9 +54,11 @@ namespace bbtk
     /// The kinds of black box
     typedef enum
     {
-      STANDARD,
-      ADAPTOR,
-      DEFAULT_ADAPTOR
+      STANDARD=0,
+      ADAPTOR=1,
+      DEFAULT_ADAPTOR=2,
+      WIDGET_ADAPTOR=3,
+      DEFAULT_WIDGET_ADAPTOR=4
     }
     Kind;
 
index 9481722..c67c2e4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxInputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/04 08:04:05 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -46,10 +46,13 @@ namespace bbtk
     BlackBoxInputDescriptor(TypeInfo creator_type_info,
                            const std::string& name,
                            const std::string& description,
-                           OptionType option = MANDATORY,
-                           bool copy_construct = true)
+                           const std::string& nature,
+                           bool copy_construct = true,
+                           OptionType option = MANDATORY
+                           )
       : BlackBoxInputOutputDescriptor(creator_type_info,name,
-                                     description,copy_construct),
+                                     description,nature,
+                                     copy_construct),
        mOption(option)
     {}
     /// Returns the option of the input
index 4560950..fc2f97e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxInputOutputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/04 08:04:05 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 
 /**
  *  \file 
- *  \brief Class bbtk::BlackBoxInputOutputDescriptor : abstract descriptor of an input or an output of a black box (has a name, a description and type)
+ *  \brief Class bbtk::BlackBoxInputOutputDescriptor : abstract descriptor of an input or an output of a black box (has a name, description, type and nature)
  */
 /**
  * \class bbtk::BlackBoxInputOutputDescriptor
- * \brief Abstract descriptor of an input or an output of a black box (has a name, a description and type)
+ * \brief Abstract descriptor of an input or an output of a black box (has a name, description, type and nature)
  */
 
 #ifndef __bbtkBlackBoxInputOutputDescriptor_h__
@@ -42,23 +42,31 @@ namespace bbtk
     BlackBoxInputOutputDescriptor(TypeInfo creator_type_info,
                                  const std::string& name,
                                  const std::string& description,
-                                 bool copy_construct = true)
+                                 const std::string& nature,
+                                 bool copy_construct = true
+                                 )
       : mCreatorTypeInfo(creator_type_info),
        mName(name), 
        mDescription(description),
+       mNature(nature),
        mCopyConstruct(copy_construct)
     {}
     
     /// Returns the TypeInfo of the BlackBoxDescriptor which created this descriptor
-    TypeInfo GetCreatorTypeInfo() { return mCreatorTypeInfo; }
+    TypeInfo GetCreatorTypeInfo() const { return mCreatorTypeInfo; }
     /// Returns the name of the in/output
     const std::string& GetName() const { return mName; }
     /// Returns the description of the in/output
     const std::string& GetDescription() const { return mDescription; }
+    /// Returns the nature of the in/output
+    const std::string& GetNature() const { return mNature; }
     /// Returns the type of the in/output
     virtual TypeInfo GetTypeInfo() const = 0;
     /// Returns the name of the type of the in/output
     virtual std::string GetTypeName() const = 0;
+    /// Returns the DataInfo of the input (Type+Nature)
+    virtual DataInfo GetDataInfo() const 
+    { return DataInfo(this->GetTypeInfo(),mNature); }
     /// Returns the name of the type of the in/output
     virtual std::string GetHumanTypeName() const = 0;
     /// Returns true iff the type is a pointer to class 
@@ -71,6 +79,7 @@ namespace bbtk
     /// Default ctor is reserved to children
     BlackBoxInputOutputDescriptor() : mCreatorTypeInfo(typeid(void)),
                                      mName(""), mDescription(""),
+                                     mNature(""),
                                      mCopyConstruct(true)
                                {}
   private:
@@ -81,6 +90,8 @@ namespace bbtk
     std::string mName;
     /// The description of the input/output
     std::string mDescription;
+    /// The nature of the input/output
+    std::string mNature;
     /// Does the in/output has to be copied by copy constructor 
     /// default = true. Must be set to false if it is 
     /// initialized by the user in bbUserCopyConstructor 
index cba3a63..8c79979 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxOutputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/04 08:04:05 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:29 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -41,9 +41,11 @@ namespace bbtk
     BlackBoxOutputDescriptor( TypeInfo creator_type_info,
                              const std::string& name,
                              const std::string& description,
+                             const std::string& nature,
                              bool copy_construct = true)
       : BlackBoxInputOutputDescriptor(creator_type_info,name,
                                      description,
+                                     nature,
                                      copy_construct)
     {}
  
index 8c54bc9..012a03f 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkComplexBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/03/07 10:21:30 $
-Version:   $Revision: 1.7 $
+Date:      $Date: 2008/04/08 06:59:29 $
+Version:   $Revision: 1.8 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See Doc/License.txt or
@@ -231,6 +231,7 @@ namespace bbtk
                        "ComplexBlackBox::bbExecute() ["
                        <<bbGetFullName()<<"]"<<std::endl);
 
+
     Wx::BeginBusyCursor();
     
     if (mExecutionList.size() != 0) 
@@ -256,6 +257,7 @@ namespace bbtk
 
     Wx::EndBusyCursor();
     
+
     bbtkDebugDecTab("Process",1);
     
   }
@@ -295,9 +297,22 @@ namespace bbtk
   IOStatus ComplexBlackBox::bbBackwardUpdate(Connection* caller)
   {
     bbtkDebugMessageInc("Process",1,
-                       "ComplexBlackBox::bbBackwardUpdate("<<caller->GetFullName()<<") ["
+                       "ComplexBlackBox::bbBackwardUpdate("
+                       <<(caller?caller->GetFullName():"0")<<") ["
                        <<bbGetFullName()<<"]"<<std::endl);
 
+    if (caller==0)
+      {
+       bbtkInternalError("ComplexBlackBox::bbBackwardUpdate called with caller=0");
+      }
+
+    if (bbGetExecuting()) 
+      {
+       bbtkWarning(bbGetFullName()<<" : Cyclic execution stopped");
+       return UPTODATE;
+      }
+    bbSetExecuting(true);
+
     IOStatus s = UPTODATE;
     const BlackBoxDescriptor::OutputDescriptorMapType& omap 
       = bbGetDescriptor()->GetOutputDescriptorMap(); 
@@ -312,7 +327,22 @@ namespace bbtk
        BlackBox* b = bbUnsafeGetBlackBox ( d->GetTarget() );
        // Calls BackwardUpdate on it
        bbtkDebugMessageInc("Process",2,"Internal box connected to output : "<<d->GetTarget()<<std::endl);
-       IOStatus s1 = b->bbBackwardUpdate(caller);
+       // Because internal box can also be a complex box we have to 
+       // temporarily change the connection BlackBoxFromOutput to the 
+       // mapped one
+       
+       //      std::string oldout = caller->GetBlackBoxFromOutput();
+       //      std::cout << "oldout = "<<oldout<<std::endl;
+       //      std::cout << "tmpout = "<<d->GetOutput()<<std::endl;
+       //      caller->SetBlackBoxFromOutput(d->GetOutput());
+       //
+       Connection newcaller(*caller);
+       newcaller.SetBlackBoxFromOutput(d->GetOutput());
+       IOStatus s1 = b->bbBackwardUpdate(&newcaller);
+       newcaller.Clear();
+       // restore old output
+       //      caller->SetBlackBoxFromOutput(oldout);
+
        // ??? STATUS OF CBBs ???
        // ??? Here it is only the final status of the boxes connected to the output 
        if (s1==MODIFIED) s=MODIFIED;
@@ -323,41 +353,12 @@ namespace bbtk
        bbtkError("Connection '"<<caller->GetFullName()<<"' does not point to a valid output of the complex box !");
       }
     bbtkDebugDecTab("Process",1);
-    return s;
-  }
-  //==================================================================
-  
-  /*
-  //==================================================================
-  void ComplexBlackBox::bbForwardUpdate(Connection* caller)
-  { 
-    bbtkDebugMessageInc("Process",1,
-                       "ComplexBlackBox::bbForwardUpdate("<<caller->GetFullName()<<") ["
-                       <<bbGetFullName()<<"]"<<std::endl);
 
-    const BlackBoxDescriptor::InputDescriptorMapType& imap 
-      = bbGetDescriptor()->GetInputDescriptorMap(); 
-    BlackBoxDescriptor::InputDescriptorMapType::const_iterator i 
-      = imap.find(caller->GetBlackBoxToInput());
-    if (i!=imap.end())
-      {        
-       // Cast the BBOutputDescriptor into a ComplexBBOutputDescriptor
-       ComplexBlackBoxInputDescriptor* d = 
-         (ComplexBlackBoxInputDescriptor*)i->second;
-       // Get the internal box 
-       BlackBox* b = bbUnsafeGetBlackBox ( d->GetTarget() );
-       // Calls ForwardUpdate on it
-       bbtkDebugMessage("Process",2,"-> Internal box connected to input : "<<d->GetTarget()<<std::endl);
-       b->bbForwardUpdate(caller);
-      }
-    else 
-      {
-       bbtkError("Connection '"<<caller->GetFullName()<<"' does not point to a valid input of the complex box !");
-      }
-    bbtkDebugDecTab("Process",1);
+    bbSetExecuting(false);
+
+    return s;
   }
   //==================================================================
-  */
 
 
   //==================================================================
@@ -955,10 +956,12 @@ namespace bbtk
     } // if parentblackbox
   }
   //=========================================================================
+  
 
-  /*
 
 
+  /*
+
   //=======================================================================
   /// Generates the list of the packages of which its depends 
   /// (cause an internal box belongs to it)
index d9e8da1..e421055 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/07 10:21:30 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -195,13 +195,16 @@ namespace bbtk
                  <<input<<"\"");
       }
     
+    const BlackBoxInputDescriptor* d = 
+      bb->bbGetDescriptor()->GetInputDescriptor(input);
     AddInputDescriptor ( new ComplexBlackBoxInputDescriptor 
                         ( typeid(ComplexBlackBoxDescriptor),
                           name,
                           help,
+                          d->GetNature(),
                           box,
                           input,
-                          bb->bbGetInputType(input)));
+                          d->GetTypeInfo()));
     
     
     bbtkDebugDecTab("Kernel",5);
@@ -234,13 +237,16 @@ namespace bbtk
                  <<output<<"\"");
       }
     
+    const BlackBoxOutputDescriptor* d = 
+      bb->bbGetDescriptor()->GetOutputDescriptor(output);
     AddOutputDescriptor ( new ComplexBlackBoxOutputDescriptor 
                          ( typeid(ComplexBlackBoxDescriptor),
                            name,
                            help,
+                           d->GetNature(),
                            box,
                            output,
-                           bb->bbGetOutputType(output)));
+                           d->GetTypeInfo()));
     
     
     bbtkDebugDecTab("Kernel",5);
@@ -538,4 +544,5 @@ namespace bbtk
 
 
 
+
 }
index 27dcd4d..4b76df5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/07 10:21:30 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -43,7 +43,7 @@ namespace bbtk
   class BBTK_EXPORT ComplexBlackBoxDescriptor : public bbtk::BlackBoxDescriptor
   {
   public:
-
+    friend class ComplexBlackBox;
     /// Default ctor with name 
     ComplexBlackBoxDescriptor(const std::string& name); 
     /// Default dtor
@@ -82,6 +82,7 @@ namespace bbtk
                       const std::string& output,
                       const std::string& help);
  
+ 
     /// Sets the name of the script file from which it is defined
     void SetScriptFileName(const std::string& n) { mScriptFileName = n; }
     /// Gets the name of the script file from which it is defined
index f32344f..11220aa 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxInputDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/06 14:14:22 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -31,11 +31,12 @@ namespace bbtk
   ComplexBlackBoxInputDescriptor( TypeInfo creator_type_info,
                                  const std::string& name,
                                  const std::string& description,
+                                 const std::string& nature,
                                  const std::string& target,
                                  const std::string& input,
                                  TypeInfo type)                        
     : 
-    BlackBoxInputDescriptor(creator_type_info,name,description),
+    BlackBoxInputDescriptor(creator_type_info,name,description,nature),
     mTarget(target),
     mInput(input),
     mType(type)
index 99d029c..80f409a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxInputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/06 14:14:22 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -43,6 +43,7 @@ namespace bbtk
     ComplexBlackBoxInputDescriptor( TypeInfo creator_type_info,
                                    const std::string& name,
                                    const std::string& description,
+                                   const std::string& nature,
                                    const std::string& target,
                                    const std::string& input,
                                    TypeInfo type);
@@ -66,7 +67,7 @@ namespace bbtk
   private:
     /// Default ctor is private 
     ComplexBlackBoxInputDescriptor() : 
-      BlackBoxInputDescriptor(typeid(void),"",""),
+      BlackBoxInputDescriptor(typeid(void),"","",""),
       mType(typeid(void)) {}
     std::string mTarget;
     std::string mInput;
index 504199a..743fbee 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxOutputDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/06 14:14:22 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -31,11 +31,12 @@ namespace bbtk
   ComplexBlackBoxOutputDescriptor( TypeInfo creator_type_info,
                                   const std::string& name,
                                   const std::string& description,
+                                  const std::string& nature,
                                   const std::string& target,
                                   const std::string& output,
                                   TypeInfo type)                       
     : 
-    BlackBoxOutputDescriptor(creator_type_info,name,description),
+    BlackBoxOutputDescriptor(creator_type_info,name,description,nature),
     mTarget(target),
     mOutput(output),
     mType(type)
index 62f2a9d..0403a54 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxOutputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/06 14:14:22 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -44,6 +44,7 @@ namespace bbtk
     ComplexBlackBoxOutputDescriptor( TypeInfo creator_type_info,
                                     const std::string& name,
                                     const std::string& description,
+                                    const std::string& nature,
                                     const std::string& target,
                                     const std::string& output,
                                     TypeInfo type);
@@ -68,7 +69,7 @@ namespace bbtk
   private:
     /// Default ctor is private 
     ComplexBlackBoxOutputDescriptor() : 
-      BlackBoxOutputDescriptor(typeid(void),"",""), 
+      BlackBoxOutputDescriptor(typeid(void),"","",""), 
       mType(typeid(void))  {}
     std::string mTarget;
     std::string mOutput;
index 8d60b38..2c99b6e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConnection.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/18 12:51:26 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -122,7 +122,13 @@ namespace bbtk
 
   //==================================================================
   
-  
+  void Connection::Clear()
+  {
+    mFrom = 0;
+    mTo = 0;
+    mAdaptor = 0;
+  }
+
   //==================================================================
   /// Dtor 
   Connection::~Connection()
@@ -131,8 +137,8 @@ namespace bbtk
                        "Connection::~Connection() ["
                        <<GetFullName()<<"]"<<std::endl);
 
-    mFrom->bbDisconnectOutput(mOutput,this);
-    mTo->bbDisconnectInput(mInput,this);
+    if (mFrom) mFrom->bbDisconnectOutput(mOutput,this);
+    if (mTo) mTo->bbDisconnectInput(mInput,this);
     if (mAdaptor) mAdaptor->bbDelete();
 
     bbtkDebugDecTab("Kernel",7);
index b75cb20..47c8e92 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConnection.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/07 10:21:30 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -56,10 +56,12 @@ namespace bbtk
     /// Ctor 
     Connection(BlackBox* from, const std::string& output,
               BlackBox* to, const std::string& input,
-              const Factory* f );
+              const Factory* f);
     /// Dtor
     ~Connection();
 
+    void Clear();
+    
     /// Amont direction pipeline processing
     /// 1) call bbBackwardUpdate(this) on the upstream box
     /// 2) copies the upstream box output to the downstream box input adapting it if needed
@@ -82,6 +84,8 @@ namespace bbtk
     /// Returns the input of the final black box of the connection
     const std::string& GetBlackBoxToInput() const { return mInput; }
 
+    /// Sets the output of the initial black box of the connection
+    void SetBlackBoxFromOutput(const std::string& o) { mOutput = o; }
   protected:
     /// Black box origin of the connection
     BlackBox* mFrom;
index f473a02..9b93b57 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkData.h,v $
   Language:  C++
-  Date:      $Date: 2008/01/22 15:02:00 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
 =========================================================================*/
 /**
  *\file
- *\brief  Defines Data and TypeInfo 
+ *\brief  Defines Data and DataInfo 
  * 
  * Data is bbtk general type exchanged between black boxes (adapted from boost::any).
- * TypeInfo is the bbtk type of object storing informations on a data type (typedef on std::type_info). 
+ * DataInfo is the bbtk type of object storing informations on a data type : includes C++ type info (std::type_info) and a string describing the "nature" of the data (what is the content of the structure). 
  */
 
 #ifndef __bbtkData_h__
 #define __bbtkData_h__
 
-//#include "bbtkSystem.h"
-//#include "bbtkMessageManager.h"
-//#include <string>
-//#include <typeinfo>
-
-//#include "bbtkany.h"
-
-//#include "bbtkReferenceCountedObject.h"
 
 #include "bbtkAny.h"
+#include "bbtkRTTI.h"
 
 namespace bbtk
 {
   
+  /// The generic type of "data" exchanged between black boxes
   typedef any<thing> Data;
 
-  /*
-
-  /// Can transport any kind of data (adaptation of boost::any)
-    class Data
-    {
-    public: // structors
-
-        Data()
-          : content(0)
-        {
-        }
-
-        template<typename ValueType>
-        Data(const ValueType & value)
-          : content(new holder<ValueType>(value))
-        {
-        }
-
-        Data(const Data & other)
-          : content(other.content ? other.content->clone() : 0)
-        {
-        }
-
-        ~Data()
-        {
-            delete content;
-        }
-
-    public: // modifiers
-
-        Data & swap(Data & rhs)
-        {
-            std::swap(content, rhs.content);
-            return *this;
-        }
-
-        template<typename ValueType>
-        Data & operator=(const ValueType & rhs)
-        {
-            Data(rhs).swap(*this);
-            return *this;
-        }
-
-        Data & operator=(const Data & rhs)
-        {
-            Data(rhs).swap(*this);
-            return *this;
-        }
-
-    public: // queries
-
-        bool empty() const
-        {
-            return !content;
-        }
-
-        const std::type_info & type() const
-        {
-            return content ? content->type() : typeid(void);
-        }
-
-#ifndef BBTK_NO_MEMBER_TEMPLATE_FRIENDS
-    private: // types
-#else
-    public: // types (public so Data_cast can be non-friend)
-#endif
-
-        class placeholder
-        {
-        public: // structors
-
-            virtual ~placeholder()
-            {
-            }
-
-        public: // queries
-
-            virtual const std::type_info & type() const = 0;
-
-            virtual placeholder * clone() const = 0;
-
-        };
-
-        template<typename ValueType>
-        class holder : public placeholder
-        {
-        public: // structors
-
-            holder(const ValueType & value)
-              : held(value)
-            {
-            }
-
-        public: // queries
+  /// Object storing informations on a data type : includes C++ type info (std::type_info) and a string describing the "nature" of the data (what is the content of the structure)
+  class DataInfo
+  {
+  public:
+    DataInfo( TypeInfo type, const std::string& nature="") 
+      : mType(type), mNature(nature)
+    {}
 
-            virtual const std::type_info & type() const
-            {
-                return typeid(ValueType);
-            }
+    ~DataInfo() {}
 
-            virtual placeholder * clone() const
-            {
-                return new holder(held);
-            }
+    TypeInfo GetType() const { return mType; }
+    const std::string& GetNature() const { return mNature; }
 
-        public: // representation
-
-            ValueType held;
-
-        };
-
-#ifndef BBTK_NO_MEMBER_TEMPLATE_FRIENDS
-
-    private: // representation
-
-      //       template<typename ValueType>
-      //       friend ValueType * Data_cast(Data *);
-
-        template<typename ValueType>
-        friend ValueType * unsafe_Data_cast(Data *);
  
-        template<typename ValueType>
-        friend ValueType  unsafe_Data_cast(Data &);
-
-#else
-
-    public: // representation (public so Data_cast can be non-friend)
-
-#endif
-
-        placeholder * content;
-
-    };
+    /// Equality
+    bool operator== ( const DataInfo& k ) const
+      {
+       return ( (mType == k.mType)  &&
+                (mNature == k.mNature) );
+      }
+    /// Comparison
+    bool operator< ( const DataInfo& k ) const
+      {
+       return ( ( mType.before(k.mType) ) ||
+                ( ( mType == k.mType ) &&
+                  ( mNature.compare(k.mNature) < 0 ) ) );
+      }
+
+
+  private:
+    DataInfo() : mType(typeid(void)), mNature("") {}
+    TypeInfo mType;
+    std::string mNature;
+
+  };
 
-    class bad_Data_cast : public std::bad_cast
-    {
-    public:
-        virtual const char * what() const throw()
-        {
-            return "bbtk::bad_Data_cast: "
-                   "failed conversion using bbtk::Data_cast";
-        }
-    };
-  */
-  /*
-    template<typename ValueType>
-    ValueType * Data_cast(Data * operand)
-    {
-        return operand && operand->type() == typeid(ValueType)
-                    ? &static_cast<Data::holder<ValueType> *>(operand->content)->held
-                    : 0;
-    }
-
-    template<typename ValueType>
-    const ValueType * Data_cast(const Data * operand)
-    {
-        return Data_cast<ValueType>(const_cast<Data *>(operand));
-    }
-
-// Removed Data_cast
-    template<typename ValueType>
-    ValueType Data_cast(const Data & operand)
-    {
-        typedef BBTK_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
-
-#ifdef BBTK_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        // If 'nonref' is still reference type, it means the user has not
-        // specialized 'remove_reference'.
-
-        // Please use BBTK_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro
-        // to generate specialization of remove_reference for your class
-        // See type traits library documentation for details
-        BBTK_STATIC_ASSERT(!is_reference<nonref>::value);
-#endif
-
-        const nonref * result = Data_cast<nonref>(&operand);
-        if(!result)
-            bbtk::throw_exception(bad_Data_cast());
-        return *result;
-    }
-
-    template<typename ValueType>
-    ValueType Data_cast(Data & operand)
-    {
-        typedef BBTK_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
-
-#ifdef BBTK_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        // The comment in the above version of 'Data_cast' explains when this
-        // assert is fired and what to do.
-        BBTK_STATIC_ASSERT(!is_reference<nonref>::value);
-#endif
-
-        nonref * result = Data_cast<nonref>(&operand);
-        if(!result)
-            bbtk::throw_exception(bad_Data_cast());
-        return *result;
-    }
-  */
-    // Note: The "unsafe" versions of Data_cast are not part of the
-    // public interface and may be removed at Data time. They are
-    // required where we know what type is stored in the Data and can't
-    // use typeid() comparison, e.g., when our types may travel across
-    // different shared libraries.
-    // LG : This is precisely our case !
-  /*
-    template<typename ValueType>
-    inline ValueType * unsafe_Data_cast(Data * operand)
-    {
-        return &static_cast<Data::holder<ValueType> *>(operand->content)->held;
-    }
-
-    template<typename ValueType>
-    inline const ValueType * unsafe_Data_cast(const Data * operand)
-    {
-        return unsafe_Data_cast<ValueType>(const_cast<Data *>(operand));
-    }
+  
+  /// dump in a stream
+  inline std::ostream& operator<<(std::ostream& s, const DataInfo& d) 
+  {
+    s << "<" << TypeName(d.GetType()) << "("<< d.GetNature()<<")>";
+    return s;
+  }
 
-    template<typename ValueType>
-    inline ValueType  unsafe_Data_cast(Data & operand)
-    {
-        return static_cast<Data::holder<ValueType> *>(operand.content)->held;
-    }
 
-    template<typename ValueType>
-    inline ValueType unsafe_Data_cast(const Data & operand)
-    {
-        return *unsafe_Data_cast<ValueType>(const_cast<Data *>(&operand));
-    }
-  */
 
 }// namespace bbtk
 
index 9be94bf..3c7b04c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 08:27:19 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.16 $
 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -232,6 +232,38 @@ namespace bbtk
   }
   //======================================================================= 
 
+  //=======================================================================  
+  void Executer::Kind(const std::string& kind)
+  {
+    if (kind=="ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::ADAPTOR);
+      }
+    else if (kind=="DEFAULT_ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::DEFAULT_ADAPTOR);
+      }
+    if (kind=="WIDGET_ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::WIDGET_ADAPTOR);
+      }
+    else if (kind=="DEFAULT_WIDGET_ADAPTOR")
+      {
+       Current()->AddToCategory("adaptor");
+       Current()->SetKind(bbtk::BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR);
+      }
+    else
+      {
+       bbtkError("Unknown box kind : '"<<kind<<"'. "
+                 <<"Valid kinds are 'ADAPTOR','DEFAULT_ADAPTOR',"
+                 <<"'WIDGET_ADAPTOR','DEFAULT_WIDGET_ADAPTOR'");
+      }
+  }
+  //=======================================================================
+
   //=======================================================================
   void Executer::Create ( const std::string& nodeType, 
                           const std::string& nodeName)
index 69647a6..5f8b8a4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 08:27:19 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -98,6 +98,9 @@ namespace bbtk
     /// End the definition of a ComplexBlackBox
     void EndDefine ();
 
+    /// Sets the kind of the currently defined ComplexBlackBox
+    void Kind(const std::string& kind);
+
     /// Creates a new black box in current complex box
     void Create ( const std::string& boxType, const std::string& boxName);
 
index 6b40793..036231f 100644 (file)
@@ -4,8 +4,8 @@ Program:   bbtk
 Module:    $RCSfile: bbtkFactory.cxx,v $
 Language:  C++
 
-Date:      $Date: 2008/03/11 12:27:21 $
-Version:   $Revision: 1.30 $
+Date:      $Date: 2008/04/08 06:59:30 $
+Version:   $Revision: 1.31 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -80,14 +80,6 @@ namespace bbtk
   //===================================================================
   void Factory::Reset()
   {
-    /*
-printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
-printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
-printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
-printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
-printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
-printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
-    */
     bbtkDebugMessageInc("Kernel",7,"Factory::Reset()"<<std::endl);
     CloseAllPackages();
     bbtkDebugDecTab("Kernel",7);
@@ -689,13 +681,13 @@ printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
 
   //===================================================================
   /// Creates an instance of a black box of type <type> with name <name>
-  BlackBox* Factory::NewAdaptor(TypeInfo typein,
-                     TypeInfo typeout,
-                     const std::string& name) const
+  BlackBox* Factory::NewAdaptor(const DataInfo& typein,
+                               const DataInfo& typeout,
+                               const std::string& name) const
   {
-    bbtkDebugMessageInc("Kernel",8,"Factory::NewAdaptor(<"
-                        <<TypeName(typein)<<">,<"
-                        <<TypeName(typeout)<<">,\""
+    bbtkDebugMessageInc("Kernel",8,"Factory::NewAdaptor("
+                        <<typein<<","
+                        <<typeout<<",\""
                         <<name<<"\")"<<bbtkendl);
 
 
@@ -708,12 +700,107 @@ printf("EED kkkkkkkkkkkkkkkkkkkkkkkk  Factory::Reset() \n");
       }
     if (!b) 
       {
-      bbtkError("no <"
-          <<TypeName(typein)<<"> to <"
-          <<TypeName(typeout)
-          <<"> adaptor available");
+       bbtkError("no "<<typein<<" to "<<typeout
+                 <<" adaptor available");
+      } 
+    
+    bbtkDebugDecTab("Kernel",7);
+    return b; 
+  }
+  //===================================================================
+
+
+  //===================================================================
+  /// Creates an instance of a black box of type <type> with name <name>
+  BlackBox* Factory::NewWidgetAdaptor(const DataInfo& typein,
+                                     const DataInfo& typeout,
+                                     const std::string& name) const
+  {
+    bbtkDebugMessageInc("Kernel",8,"Factory::NewWidgetAdaptor(<"
+                        <<typein<<">,<"
+                        <<typeout<<">,\""
+                        <<name<<"\")"<<bbtkendl);
+
+
+    BlackBox* b = 0; 
+    PackageMapType::const_iterator i;
+    for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
+      {
+       b = i->second.mPackage->NewWidgetAdaptor(typein,
+                                                typeout,
+                                                name);
+      if (b) break; 
+      }
+    if (!b) 
+      {
+       bbtkError("no "<<typein<<" to "<<typeout
+                 <<"> widget adaptor available");
+      } 
+    
+    bbtkDebugDecTab("Kernel",7);
+    return b; 
+  }
+  //===================================================================
+
+  //===================================================================
+  /// Creates an instance of a black box of type <type> with name <name>
+  bool Factory::FindAdaptor(const DataInfo& typein,
+                                 const DataInfo& typeout,
+                                 std::string& adaptor) const
+  {
+    bbtkDebugMessageInc("Kernel",8,"Factory::FindWidgetAdaptor(<"
+                        <<typein<<">,<"
+                        <<typeout<<">)"<<bbtkendl);
+    
+    bool b = false;
+    PackageMapType::const_iterator i;
+    for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
+      {
+       b = i->second.mPackage->FindAdaptor(typein,
+                                           typeout,
+                                           adaptor);
+       if (b) break; 
+      }
+    /*
+    if (!b) 
+      {
+       bbtkError("no "<<typein<<" to "<<typeout
+                 <<"> widget adaptor available");
       } 
+    */
+
+    bbtkDebugDecTab("Kernel",7);
+    return b; 
+  }
+  //===================================================================
+
+  //===================================================================
+  /// Creates an instance of a black box of type <type> with name <name>
+  bool Factory::FindWidgetAdaptor(const DataInfo& typein,
+                                 const DataInfo& typeout,
+                                 std::string& adaptor) const
+  {
+    bbtkDebugMessageInc("Kernel",8,"Factory::FindWidgetAdaptor(<"
+                        <<typein<<">,<"
+                        <<typeout<<">)"<<bbtkendl);
     
+    bool b = false;
+    PackageMapType::const_iterator i;
+    for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
+      {
+       b = i->second.mPackage->FindWidgetAdaptor(typein,
+                                                 typeout,
+                                                 adaptor);
+       if (b) break; 
+      }
+    /*
+    if (!b) 
+      {
+       bbtkError("no "<<typein<<" to "<<typeout
+                 <<"> widget adaptor available");
+      } 
+    */
+
     bbtkDebugDecTab("Kernel",7);
     return b; 
   }
index 3150e6e..34e435d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkFactory.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/28 13:42:17 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.12 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -46,6 +46,7 @@ namespace bbtk
     Factory();
     ~Factory();
     
+    void GetPackagesList(std::vector<std::string>&);
     void LoadPackage( const std::string& name );
     void UnLoadPackage( const std::string& name );
     void PrintPackages(bool details = true, bool adaptors = false) const;
@@ -62,9 +63,21 @@ namespace bbtk
     BlackBox* NewBlackBox(const std::string& type, 
                           const std::string& name) const;
     
-    BlackBox* NewAdaptor(TypeInfo typein,
-                         TypeInfo typeout,
+    BlackBox* NewAdaptor(const DataInfo& typein,
+                        const DataInfo& typeout,
                          const std::string& name) const;
+
+    BlackBox* NewWidgetAdaptor(const DataInfo& typein,
+                              const DataInfo& typeout,
+                              const std::string& name) const;
+
+    bool FindAdaptor(const DataInfo& typein,
+                    const DataInfo& typeout,
+                    std::string& adaptor) const;
+
+    bool FindWidgetAdaptor(const DataInfo& typein,
+                          const DataInfo& typeout,
+                          std::string& adaptor) const;
     
     Connection* NewConnection(BlackBox* from,
                               const std::string& output,
index d112dba..c925050 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 14:47:36 $
-  Version:   $Revision: 1.57 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.58 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -26,6 +26,7 @@
 #include "bbtkMessageManager.h"
 #include "bbtkConfigurationFile.h"
 #include "bbtkUtilities.h"
+#include "bbtkWxBlackBox.h"
 #include <sys/stat.h>
 #include <algorithm>
 #ifdef CMAKE_HAVE_TERMIOS_H
@@ -73,215 +74,231 @@ bufferNb =0;
     // Builds the commands dict
     CommandInfoType info;
    
-    info.category = "new";
+    info.keyword = "new";
     info.argmin = 2;
     info.argmax = 2;
     info.code = cNew;
     info.syntax = "new <type> <name>";
     info.help = "Creates a new black box of type <type> with name <name>";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
     
-    info.category = "delete";
+    info.keyword = "delete";
     info.argmin = 1;
     info.argmax = 1;
     info.code = cDelete;
     info.syntax = "delete <box>";
     info.help = "Deletes the black box of name <box>";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "connect";
+    info.keyword = "newgui";
+    info.argmin = 2;
+    info.argmax = 2;
+    info.code = cNewGUI;
+    info.syntax = "newgui <box> <name>";
+    info.help = "Automatically creates a graphical user interface with name <name> for the black box <box> and connects it to the box inputs";
+    mCommandDict[info.keyword] = info;
+
+    info.keyword = "connect";
     info.argmin = 2;
     info.argmax = 2;
     info.code = cConnect;
     info.syntax = "connect <box1.output> <box2.input>";
     info.help = "Connects the ouput <output> of black box <box1> to the input <input> of black box <box2>";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "print";
+    info.keyword = "print";
     info.argmin = 1;
     info.argmax = 1;
     info.code = cPrint;
     info.syntax = "print <string>";
     info.help = "Prints the string. Substitutes any token of the form '$box.output$' by the string adaptation of the output of the box (requires the right adaptor). No carriage return is issued at the end, use '\\n' to add carriage returns. The level of 'Echo' messages must be greater than 1 (see the command 'message').";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "exec";
+    info.keyword = "exec";
     info.argmin = 1;
     info.argmax = 2;
     info.code = cExec;
     info.syntax = "exec <box | 'freeze' | 'unfreeze' >";
-    info.help = "Executes the black box of name <box> (and connected boxes if needed). If the special category 'freeze' is given then freezes any further execution command. 'unfreeze' reverts to normal execution mode.";
-    mCommandDict[info.category] = info;
+    info.help = "Executes the black box of name <box> (and connected boxes if needed). If the special keyword 'freeze' is given then freezes any further execution command. 'unfreeze' reverts to normal execution mode.";
+    mCommandDict[info.keyword] = info;
 
-    info.category = "package";
+    info.keyword = "package";
     info.argmin = 1;
     info.argmax = 1;
     info.code = cPackage;
     info.syntax = "package <name>";
     info.help = "Begins the definition of a package.";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
     
-    info.category = "endpackage";
+    info.keyword = "endpackage";
     info.argmin = 0;
     info.argmax = 0;
     info.code = cEndPackage;
     info.syntax = "endpackage";
     info.help = "Ends the definition of a package.";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "define";
+    info.keyword = "define";
     info.argmin = 1;
     info.argmax = 2;
     info.code = cDefine;
     info.syntax = "define <type> [<package>]";
     info.help = "Begins the definition of a new type of complex black box called <type>. If <package> if provided will create it in the given package.";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
     
-    info.category = "endefine";
+    info.keyword = "endefine";
     info.argmin = 0;
     info.argmax = 0;
     info.code = cEndDefine;
     info.syntax = "endefine";
     info.help = "Ends the definition of a new type of complex black box";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "input";
+    info.keyword = "kind";
+    info.argmin = 1;
+    info.argmax = 1;
+    info.code = cKind;
+    info.syntax = "kind <ADAPTOR|DEFAULT_ADAPTOR|WIDGET_ADAPTOR|DEFAULT_WIDGET_ADAPTOR>";
+    info.help = "Sets the kind of the currently defined complex black box";
+    mCommandDict[info.keyword] = info;
+
+    info.keyword = "input";
     info.argmin = 3;
     info.argmax = 3;
     info.code = cInput;
     info.syntax = "input <name> <box.input> <help>";
     info.help = "Defines the input <name> of the current working black box as being an alias for the input <input> of the black box <box>. <help> defines the help string for the newly created input";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "output";
+    info.keyword = "output";
     info.argmin = 3;
     info.argmax = 3;
     info.code = cOutput;
     info.syntax = "output <name> <box.output> <help>";
     info.help = "Defines the output <name> of the current working black box as being an alias for the output <output> of the black box <box>. <help> defines the help string for the newly created output";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "set";
+    info.keyword = "set";
     info.argmin = 2;
     info.argmax = 2;
     info.code = cSet;
     info.syntax = "set <box.input> <value>";
     info.help = "Sets the value of the input <input> of the black box <box> to <value>. There must exist a string to the value type adaptor";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
    
-    info.category = "config";  // JPR
+    info.keyword = "config";  // JPR
     info.argmin = 0;
     info.argmax = 0;
     info.code = cConfig;
     info.syntax = "config";
     info.help = "Prints the value of all configuration parameters";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "index";  // LG
+    info.keyword = "index";  // LG
     info.argmin = 0;
     info.argmax = 2;
     info.code = cIndex;
 
     info.syntax = "index [<filename> ['Initials'(default)|'Packages'|'Categories'|'Adaptors']]";
     info.help = "Creates an html index of known boxes. If filename is provided then save it to the file 'filename'. The default index entries are the initial letters of the names of the boxes. If 'Packages' or 'Categories' is provided then the entries are either the packages names or the categories. If 'Adaptors' is provided then an alphabetical index of all adaptors is created.";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "reset";  
+    info.keyword = "reset";  
     info.argmin = 0;
     info.argmax = 0;
     info.code = cReset;
     info.syntax = "reset";
     info.help = "Deletes all boxes and unloads all packages (bbi is reset to its start state)";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "author";
+    info.keyword = "author";
     info.argmin = 1;
     info.argmax = 1;
     info.code = cAuthor;
     info.syntax = "author <string>";
     info.help = "Adds the string <string> to the author information of the black box being defined";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
     
-    info.category = "category"; //JP
+    info.keyword = "category"; //JP
     info.argmin = 1;
     info.argmax = 1;
     info.code = cCategory;
     info.syntax = "category <list of items, separated by ;>";
     info.help = "Adds the string <string> to the category information of the black box being defined";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "description";
+    info.keyword = "description";
     info.argmin = 1;
     info.argmax = 1;
     info.code = cDescription;
     info.syntax = "description <string>";
     info.help = "Adds the string <string> to the descriptive information of the black box being defined";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "help";
+    info.keyword = "help";
     info.argmin = 0;
     info.argmax = 2;
     info.code = cHelp;
     info.syntax = "help";
     info.syntax = "\n         (1) help \n         (2) help <command name> \n         (3) help packages [all]\n         (4) help <package name> [all]\n         (5) help <black box type> \n         (6) help <black box name>";
     info.help = "Effect :\n         (1) Lists all available commands;\n         (2) Prints help on a particular command; \n         (3) Lists the packages loaded and their black boxes.\n             Add 'all' to list adaptors; \n         (4) Prints short help on the black boxes of a package.\n             Add 'all' to include adaptors; \n         (5) Prints full help on a black box type; \n         (6) Prints information on the inputs, outputs and connections of a black box instance.";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "message";
+    info.keyword = "message";
     info.argmin = 0;
     info.argmax = 2;
     info.code = cMessage;
     info.syntax = "message <kind> <level>";
-    info.help = "Sets the level of the kind of messages <kind> to <level>.\n  If kind='All' then sets the level for all kinds. If no kind nor level is passed then prints info on available kinds of messages and their current level.";  mCommandDict[info.category] = info;
+    info.help = "Sets the level of the kind of messages <kind> to <level>.\n  If kind='All' then sets the level for all kinds. If no kind nor level is passed then prints info on available kinds of messages and their current level.";  mCommandDict[info.keyword] = info;
 
-    info.category = "include";
+    info.keyword = "include";
     info.argmin = 1;
     info.argmax = 2;
     info.code = cInclude;
     info.syntax = "include <filename> [source]";
     info.help = "Includes the file <filename>.\n  'source' : If the keyword 'source' is provided then informs bbi that the included file is the source of the current box definition (Advanced; used to get the right 'Include' field in html doc of packages 'appli' scripts).";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "quit";
+    info.keyword = "quit";
     info.argmin = 0;
     info.argmax = 0;
     info.code = cQuit;
     info.syntax = "quit";
     info.help = "Quits the program (during script execution it stops the complete execution)";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "load";
+    info.keyword = "load";
     info.argmin = 1;
     info.argmax = 1;
     info.code = cLoad;
     info.syntax = "load <packagename>";
     info.help = "Loads the black box package <packagename>";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "unload";
+    info.keyword = "unload";
     info.argmin = 1;
     info.argmax = 1;
     info.code = cUnload;
     info.syntax = "unload <packagename>";
     info.help = "Unloads the black box package <packagename>";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
-    info.category = "graph";
+    info.keyword = "graph";
     info.argmin = 0;
     info.argmax = 6;
     info.code = cGraph;
     info.syntax = "graph [ BlackBoxName [ Detail 0..1 [ Level 0..99999 [ Output html file [ Custom header [ Custom title ]]]]]] \n         graph [ BlackBoxNameType [ Detail 0..1 [ Level 0..99999 [ Output html file [ Custom header [ Custom title ]]]]]]";
     info.help = "Shows a graphical view of a bbtk pipeline.\n- BlackBoxName : name of the box to view. Default '.' : current box.\n- BlackBoxNameType : name of the type of box to view, ex : 'workspace')";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
 
     /*
-    info.category = "workspace";
+    info.keyword = "workspace";
     info.argmin = 1;
     info.argmax = 2;
     info.code = cWorkspace;
     info.syntax = "workspace < ( freeze | unfreeze ) | ( rename <newname> ) >";
     info.help = "Configures the workspace.\n        'freeze' allow to block execution commands while keeping definition commands active. 'unfreeze' turns back the worspace in 'normal' mode.\n      'rename' allow to set a new name to the workspace.";
-    mCommandDict[info.category] = info;
+    mCommandDict[info.keyword] = info;
     */
 
     bbtkDebugDecTab("Interpreter",9);
@@ -652,7 +669,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
     InterpretCommand(words,command);
 
     bbtkDebugMessage("Interpreter",9,
-                     "Command='"<<command.category
+                     "Command='"<<command.keyword
                       <<"' code="<<command.code<<std::endl); 
     int level=0;
     std::string left,right,left2,right2;
@@ -700,6 +717,10 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         mExecuter->EndDefine();
         break;
 
+      case cKind :
+        mExecuter->Kind(words[1]);
+        break;
+
       case cPrint :
         mExecuter->Print(words[1]);
         break;
@@ -732,6 +753,10 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         mExecuter->Author(words[1]);
         break;
 
+      case cNewGUI :
+        NewGUI(words[1],words[2]);
+        break;
+
       case cCategory :
         mExecuter->Category(words[1]);
         break;
@@ -1328,7 +1353,7 @@ void Interpreter::SwitchToStream( std::stringstream* stream )
   {
     bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretCommand(...)"<<std::endl);
 
-    // searches the command category
+    // searches the command keyword
     CommandDictType::iterator c;
     c = mCommandDict.find(words[0]);
     if ( c == mCommandDict.end() ) {
@@ -1850,6 +1875,127 @@ void  Interpreter::Index(const std::string& filename,
 }
 //=======================================================================
 
+
+//=======================================================================
+void  Interpreter::NewGUI(const std::string& boxname,
+                            const std::string& instanceName)
+{
+  std::string typeName = instanceName+"Type";
+  std::stringstream* s = new std::stringstream;
+  // create the complex box
+  (*s) << "define "<<typeName<<std::endl;
+  //  (*s) << "  description 'Automatically generated user interface for the box "
+  //       << boxname << "'" <<std::endl;
+  // create the Layout box
+  (*s) << "  load wx"<<std::endl;
+  (*s) << "  new LayoutLine layout"<<std::endl;
+  // create the output 'Widget'
+  (*s) << "  output Widget layout.Widget Widget"<<std::endl;
+  // the box change output 
+  (*s) << "  new MultipleInputs change"<<std::endl;
+  (*s) << "  output BoxChange change.Out BoxChange"<<std::endl;
+
+  // Browse the inputs of the box in order to find which ones are not 
+  // connected and can be adapted from a widget adaptor
+  // vector which stores the list of inputs of the box which must be connected
+  std::vector<std::string> in;
+  Factory* F = mExecuter->GetFactory();
+  if (F==0)
+    {
+      delete s;
+      bbtkError("Interpreter::CreateGUI : could not access the executer factory");
+    }
+  Package* user = F->GetPackage("user");
+  ComplexBlackBoxDescriptor* workspace 
+    = (ComplexBlackBoxDescriptor*)user->GetBlackBoxMap().find("workspace")->second;
+  
+  BlackBox* box = workspace->GetPrototype()->bbGetBlackBox(boxname);
+  //  BlackBox::InputConnectorMapType incm = box->bbGetInputConnectorMap();
+  int nb = 0;
+  BlackBox::InputConnectorMapType::iterator i;
+  for (i=box->bbGetInputConnectorMap().begin();
+       i!=box->bbGetInputConnectorMap().end();
+       ++i)
+    {
+      // If the input is connected : continue
+      if (i->second->IsConnected()) continue;
+      // Get the input descriptor 
+      const BlackBoxInputDescriptor* d = box->bbGetDescriptor()->GetInputDescriptor(i->first);
+      // If it is a "system" input : skip it
+      if ( ( d->GetCreatorTypeInfo() == typeid(AtomicBlackBoxDescriptor)) ||
+          ( d->GetCreatorTypeInfo() == typeid(WxBlackBoxDescriptor)) )
+       continue;
+      // try to find a widget adaptor
+      std::string adaptor;
+      if (F->FindWidgetAdaptor(DataInfo(typeid(Void),""),
+                              d->GetDataInfo(),
+                              adaptor))
+       {
+         // store the input name
+         in.push_back(i->first);
+         // command to create the adaptor
+         (*s) << "  new "<<adaptor<<" "<<i->first<<std::endl;
+         // command to create the output
+         (*s) << "  output "<<i->first<<" "
+              <<i->first<<".Out "<<i->first<<std::endl;
+           //         <<" Output of the widget which allows to set "
+           //<i->first<<"'"<<std::endl;
+         // Sets the label of the widget adaptor to the name of the input
+         (*s) << "  set "<<i->first<<".Label "<<i->first<<std::endl;
+         (*s) << "  connect "<<i->first<<".Widget layout.Widget"<<in.size()<<std::endl;
+         (*s) << "  connect "<<i->first<<".BoxChange change.In"<<in.size()<<std::endl;
+       }
+      // try to find an adaptor from string 
+      // If found then can create a text input which 
+      // will be automatically adapted 
+      else if (F->FindAdaptor(DataInfo(typeid(std::string),""),
+                              d->GetDataInfo(),
+                              adaptor))
+       {
+         // store the input name
+         in.push_back(i->first);
+         // command to create the adaptor
+         (*s) << "  new InputText "<<i->first<<std::endl;
+         // command to create the output
+         (*s) << "  output "<<i->first<<" "
+              <<i->first<<".Out "<<i->first<<std::endl;
+           //         <<" Output of the widget which allows to set "
+           //<i->first<<"'"<<std::endl;
+         // Sets the label of the widget adaptor to the name of the input
+         (*s) << "  set "<<i->first<<".Title "<<i->first<<std::endl;
+         (*s) << "  connect "<<i->first<<".Widget layout.Widget"<<in.size()<<std::endl;
+         (*s) << "  connect "<<i->first<<".BoxChange change.In"<<in.size()<<std::endl;
+       }
+
+    }   
+  // Inputs for window properties
+  (*s) << "  input WinTitle layout.WinTitle Title"<<std::endl;
+  (*s) << "  input WinWidth layout.WinWidth Width"<<std::endl;
+  (*s) << "  input WinHeight layout.WinHeight Height"<<std::endl;
+  (*s) << "  input WinDialog layout.WinDialog Dialog"<<std::endl;
+  (*s) << "  input WinHide layout.WinHide Hide"<<std::endl;
+
+  
+  
+  // Execute the box executes the layout
+  (*s) << "  exec layout" << std::endl;
+  (*s) << "endefine" << std::endl;
+  // (*s) << "help "<< typeName<< std::endl;
+  // instanciate the box and connect it
+  (*s) << "new "<<typeName<<" "<<instanceName<<std::endl;
+  // connections
+  std::vector<std::string>::iterator j;
+  for (j=in.begin();j!=in.end();++j)
+    {
+      // connect
+      (*s) << "connect "<<instanceName<<"."<<*j<<" "
+          << boxname<<"."<<*j<<std::endl;
+    }
+  // That's all folks ! now execute the commands :
+  SwitchToStream(s);
+}
+//=======================================================================
+
 }//namespace
 
 
index d7f8731..bf40302 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 14:47:36 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.24 $
 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -111,13 +111,15 @@ namespace bbtk
       cGraph,
       cPrint,
       cIndex,
+      cKind, // LG
+      cNewGUI, // LG
       cWorkspace // LG
     } CommandCodeType;
 
     /// The structure storing the informations on a command 
     typedef struct 
     {
-      std::string category;
+      std::string keyword;
       int argmin, argmax;
       CommandCodeType code;
       std::string syntax;
@@ -245,7 +247,13 @@ namespace bbtk
                                 int n,
                                 std::vector<std::string>& commands );
 
-
+    /// Creates and connects the piece of pipeline which defines a GUI 
+    /// for the box box. 
+    /// Define it as a complex box type with name instanceName+"Type"
+    /// The instance is called instanceName
+    /// and connected to the existing pipeline
+    void NewGUI(const std::string& box, 
+               const std::string& instanceName);
 
   private:
 
index cdc1920..c50abbd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkPackage.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/07 08:40:14 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -121,17 +121,18 @@ namespace bbtk
   //==========================================================================
   /// Creates an instance of an adaptor of input type <typein> and 
   /// output type <typeout>  with name <name>
-  BlackBox* Package::NewAdaptor(TypeInfo typein,
-                                  TypeInfo typeout,
-                                  const std::string& name) const
+  BlackBox* Package::NewAdaptor(const DataInfo& typein,
+                               const DataInfo& typeout,
+                               const std::string& name) const
   {
     bbtkDebugMessageInc("Kernel",8,"Package<"<<GetName()<<
-                       ">::NewAdaptor(<"
-                       <<TypeName(typein)<<">,<"
-                       <<TypeName(typeout)<<">,\""
+                       ">::NewAdaptor("
+                       <<typein<<","
+                       <<typeout<<",\""
                        <<name<<"\")"<<bbtkendl);
 
-    AdaptorKey key(typein,typeout);
+    AdaptorKey key(typein,typeout,
+                  BlackBoxDescriptor::DEFAULT_ADAPTOR);
     AdaptorMapType::const_iterator i = mAdaptorMap.find(key);
     if (i == mAdaptorMap.end())  
       {
@@ -145,7 +146,93 @@ namespace bbtk
   }
   //==========================================================================
 
+  //==========================================================================
+  /// Creates an instance of an adaptor of input type <typein> and 
+  /// output type <typeout>  with name <name>
+  BlackBox* Package::NewWidgetAdaptor(const DataInfo& typein,
+                                     const DataInfo& typeout,
+                                     const std::string& name) const
+  {
+    bbtkDebugMessageInc("Kernel",8,"Package<"<<GetName()<<
+                       ">::NewWidgetAdaptor("
+                       <<typein<<","
+                       <<typeout<<",\""
+                       <<name<<"\")"<<bbtkendl);
 
+    AdaptorKey key(typein,typeout,
+                  BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR);
+    AdaptorMapType::const_iterator i = mAdaptorMap.find(key);
+    if (i == mAdaptorMap.end())  
+      {
+       bbtkDebugDecTab("Kernel",8);
+       return 0;
+      }
+    BlackBox* bb =i->second->CreateInstance(name);
+    bbtkDebugDecTab("Kernel",8);
+    return bb;   
+
+  }
+  //==========================================================================
+
+  //==========================================================================
+  /// Returns true is the package contains 
+  /// an adaptor of input type <typein> and 
+  /// output type <typeout>
+  /// If successfull then adaptor contains the black box type name
+  bool Package::FindWidgetAdaptor(const DataInfo& typein,
+                                 const DataInfo& typeout,
+                                 std::string& adaptor) const
+  {
+    bbtkDebugMessageInc("Kernel",8,"Package<"<<GetName()<<
+                       ">::FindWidgetAdaptor("
+                       <<typein<<","
+                       <<typeout<<")"<<bbtkendl);
+    
+    AdaptorKey key(typein,typeout,
+                  BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR);
+    AdaptorMapType::const_iterator i = mAdaptorMap.find(key);
+    if (i == mAdaptorMap.end())  
+      {
+       bbtkDebugDecTab("Kernel",8);
+       return false;
+      }
+    adaptor = i->second->GetTypeName();
+    bbtkDebugDecTab("Kernel",8);
+    return true;   
+
+  }
+  //==========================================================================
+
+
+
+  //==========================================================================
+  /// Returns true is the package contains 
+  /// an adaptor of input type <typein> and 
+  /// output type <typeout>
+  /// If successfull then adaptor contains the black box type name
+  bool Package::FindAdaptor(const DataInfo& typein,
+                           const DataInfo& typeout,
+                           std::string& adaptor) const
+  {
+    bbtkDebugMessageInc("Kernel",8,"Package<"<<GetName()<<
+                       ">::FindAdaptor("
+                       <<typein<<","
+                       <<typeout<<")"<<bbtkendl);
+    
+    AdaptorKey key(typein,typeout,
+                  BlackBoxDescriptor::DEFAULT_ADAPTOR);
+    AdaptorMapType::const_iterator i = mAdaptorMap.find(key);
+    if (i == mAdaptorMap.end())  
+      {
+       bbtkDebugDecTab("Kernel",8);
+       return false;
+      }
+    adaptor = i->second->GetTypeName();
+    bbtkDebugDecTab("Kernel",8);
+    return true;   
+
+  }
+  //==========================================================================
 
 
   //==========================================================================
@@ -158,15 +245,22 @@ namespace bbtk
     d->SetPackage(this);
     
     // If it is a default adaptor, also register it in the adaptors map
-    if ( d->GetKind() == BlackBoxDescriptor::DEFAULT_ADAPTOR) 
+    if ( (d->GetKind() == BlackBoxDescriptor::DEFAULT_ADAPTOR) ||
+        (d->GetKind() == BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR) )
       {
+       bbtkDebugMessage("Kernel",8,"Package<"<<GetName()<<">::RegisterBlackBox(\""<<d->GetTypeName()<<"\") : The box is an adaptor, inserting it in adaptors map ..."<<std::endl);   
        TypeInfo typein = d->GetInputDescriptor("In")->GetTypeInfo();
        TypeInfo typeout = d->GetOutputDescriptor("Out")->GetTypeInfo();
-       AdaptorKey key(typein,typeout);
+       DataInfo infoin(typein,d->GetInputDescriptor("In")->GetNature());
+       DataInfo infoout(typeout,d->GetOutputDescriptor("Out")->GetNature());
+       bbtkDebugMessage("Kernel",8,"LG Adaptor "<<infoin<<" to "<<infoout 
+                        <<" - kind="<<d->GetKind()<<std::endl);  
+
+       AdaptorKey key(infoin,infoout,d->GetKind());
+
        AdaptorMapType::const_iterator i = mAdaptorMap.find(key);
        if (i == mAdaptorMap.end())  
          {
-           bbtkDebugMessage("Kernel",8,"The box is an adaptor, inserting it in adaptors map ..."<<std::endl);   
            mAdaptorMap[key] = d;
          }
        // If already an adaptor registered : error
index 1dfc854..f869bcc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkPackage.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/07 08:40:14 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -65,9 +65,19 @@ namespace bbtk
     BlackBox* NewBlackBox(const std::string& type,
                             const std::string& name) const;
   
-    BlackBox* NewAdaptor(TypeInfo typein,
-                           TypeInfo typeout,
-                           const std::string& name) const;
+    BlackBox* NewAdaptor(const DataInfo& typein,
+                        const DataInfo& typeout,
+                        const std::string& name) const;
+    
+   BlackBox* NewWidgetAdaptor(const DataInfo& typein,
+                             const DataInfo& typeout,
+                             const std::string& name) const;
+    bool FindAdaptor(const DataInfo& typein,
+                          const DataInfo& typeout,
+                          std::string& adaptor) const;
+    bool FindWidgetAdaptor(const DataInfo& typein,
+                          const DataInfo& typeout,
+                          std::string& adaptor) const;
 
     bool RegisterBlackBox(BlackBoxDescriptor*); 
     void UnRegisterBlackBox(const std::string& name); 
@@ -144,24 +154,23 @@ namespace bbtk
     class AdaptorKey 
     {
     public:
-      AdaptorKey( TypeInfo typein, TypeInfo typeout) 
-       : mTypeIn(typein.name()), mTypeOut(typeout.name()) {}
+      AdaptorKey( const DataInfo& typein, const DataInfo& typeout, 
+                 BlackBoxDescriptor::Kind kind ) 
+       : mTypeIn(typein), mTypeOut(typeout), mKind(kind) {}
       
       bool operator< ( const AdaptorKey& k ) const
       {
-       //      return ( ( mTypeIn.before(k.mTypeIn) ) ||
-       //               ( ( mTypeIn == k.mTypeIn ) && 
-       //                 ( mTypeOut.before(k.mTypeOut) ) ) );
-       return ( ( mTypeIn < k.mTypeIn ) ||
-                ( ( mTypeIn == k.mTypeIn ) && 
-                  ( mTypeOut < k.mTypeOut ) ) );
+       return ( ( mKind < k.mKind ) ||
+                ( ( mKind == k.mKind ) &&
+                  ( ( mTypeIn < k.mTypeIn ) ||
+                    ( ( mTypeIn == k.mTypeIn ) && 
+                      ( mTypeOut < k.mTypeOut ) ) ) ) );
       }
       
     private:
-      //      TypeInfo mTypeIn;
-      //      TypeInfo mTypeOut;
-      std::string mTypeIn;
-      std::string mTypeOut;
+      DataInfo mTypeIn;
+      DataInfo mTypeOut; 
+      BlackBoxDescriptor::Kind mKind;
     };
     
     /// The type of map of adaptor descriptors
index e5e83b5..cc666b7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkTranscriptor.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 14:47:36 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -155,6 +155,11 @@ namespace bbtk
      m_Fp << "  e->EndDefine( );" << std::endl;
   }
 
+  void Transcriptor::Kind(const std::string& kind)
+  {
+    m_Fp << "  e->Kind( \""<<kind<<"\" );" << std::endl;
+  }
+
 
   void Transcriptor::Create ( const std::string& nodeType, 
                               const std::string& nodeName)
index 7388505..c95bdbf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkTranscriptor.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 14:47:36 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -91,6 +91,9 @@ namespace bbtk
     /// End the definition of a ComplexBlackBox
     void EndDefine ();
 
+    /// Sets the kind of the currently defined ComplexBlackBox
+    void Kind(const std::string& kind);
+
     /// Creates a new black box in current complex box
     void Create ( const std::string& boxType, const std::string& boxName);
 
index 928a867..e736f9e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkVirtualExec.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/26 14:47:36 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -104,6 +104,9 @@ namespace bbtk
     /// End the definition of a ComplexBlackBox
     virtual void EndDefine () = 0;
 
+    /// Sets the kind of the currently defined ComplexBlackBox
+    virtual void Kind(const std::string& kind) = 0;
+
     /// Creates a new black box in current complex box
     virtual void Create ( const std::string& boxType, const std::string&
     boxName) = 0;
index 5b8e52f..6a452f3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/10 12:28:43 $
-  Version:   $Revision: 1.10 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.11 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -531,6 +531,58 @@ namespace bbtk
   //=========================================================================
 
 
+  //=========================================================================
+  /// Main processing method of the box.
+  IOStatus WxBlackBox::bbBackwardUpdate( Connection* caller )
+  {
+    bbtkDebugMessageInc("Process",1,
+                       "=> WxBlackBox::bbBackwardUpdate("
+                       <<(caller?caller->GetFullName():"0")<<") ["
+                       <<bbGetFullName()<<"]"<<std::endl);
+
+    if (bbGetExecuting()) 
+      {
+       bbtkWarning(bbGetFullName()<<" : Cyclic execution stopped");
+       return UPTODATE;
+      }
+    bbSetExecuting(true);
+
+    // If the caller is not the connection to the output widget
+    // and the output 'Widget' is connected then 
+    // we must execute the parent box
+    bool done = false;
+    if ( (caller==0) ||
+        ((caller!=0)&&(caller->GetBlackBoxFromOutput()!="Widget"))
+        )
+      {
+       BlackBox::OutputConnectorMapType::const_iterator i 
+         = bbGetOutputConnectorMap().find("Widget") ;
+       if ( 
+           i->second->GetConnectionVector().size() != 0 ) 
+         {
+           bbtkDebugMessage("Process",2,
+                            "-> Output 'Widget' connected : transfering execution to parent"
+                            <<std::endl);
+           
+           i->second->GetConnectionVector().front()
+             ->GetBlackBoxTo()->bbExecute(false);
+           done = true;
+         }
+      }
+    // call 'standard' BlackBox execution method
+    if (!done) 
+      { 
+       bbSetExecuting(false);
+       AtomicBlackBox::bbBackwardUpdate(caller);
+      }
+    
+    bbtkDebugMessageDec("Process",1,
+                       "<= WxBlackBox::bbBackwardUpdate() ["
+                       <<bbGetFullName()<<"]"<<std::endl);
+    
+    bbSetExecuting(false);
+  }
+
   //=========================================================================
   void WxBlackBox::bbProcess()
   { 
index 700fa3e..d259a87 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/10 12:28:43 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -129,8 +129,10 @@ namespace bbtk
 
     
 
-
-
+    //==================================================================
+    /// Main processing method of the box.
+    virtual IOStatus bbBackwardUpdate( Connection* caller );
+    //==================================================================
 
 
 
@@ -209,16 +211,16 @@ namespace bbtk
   BBTK_CATEGORY("widget");
   BBTK_INPUT(WxBlackBox,WinTitle,
             "Title of the window (*)",
-            std::string);
+            std::string,"");
   BBTK_INPUT(WxBlackBox,WinWidth,
-            "Width of the window (* : only used if the widget is not inserted in another widget)",int);
+            "Width of the window (* : only used if the widget is not inserted in another widget)",int,"");
   BBTK_INPUT(WxBlackBox,WinHeight,
-            "Height of the window (*)",int);
+            "Height of the window (*)",int,"");
   BBTK_INPUT(WxBlackBox,WinDialog,
-            "Set to 'true' to create a dialog window, i.e. which blocks the pipeline until it is closed (modal) (*)",bool);
+            "Set to 'true' to create a dialog window, i.e. which blocks the pipeline until it is closed (modal) (*)",bool,"");
   BBTK_INPUT(WxBlackBox,WinHide,
-            "Any signal received hides the window (*)",Void);
-  BBTK_OUTPUT(WxBlackBox,Widget,"Output widget",wxWindow*);
+            "Any signal received hides the window (*)",Void,"");
+  BBTK_OUTPUT(WxBlackBox,Widget,"Output widget",wxWindow*,"");
   BBTK_END_DESCRIBE_BLACK_BOX(WxBlackBox);
   //=================================================================
 
index acae354..d00e4de 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkWxGUIPackageBrowser2.cxx,v $
 Language:  C++
-Date:      $Date: 2008/04/04 09:45:04 $
-Version:   $Revision: 1.2 $
+Date:      $Date: 2008/04/08 06:59:30 $
+Version:   $Revision: 1.3 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See Doc/License.txt or
@@ -617,7 +617,9 @@ namespace bbtk
                               wxLIST_FORMAT_LEFT, 80  ); 
     mInputList->InsertColumn( 1, _("Type"), 
                               wxLIST_FORMAT_LEFT, 100 ); 
-    mInputList->InsertColumn( 2, _("Description"), 
+    mInputList->InsertColumn( 2, _("Nature"), 
+                              wxLIST_FORMAT_LEFT, 100  ); 
+    mInputList->InsertColumn( 3, _("Description"), 
                               wxLIST_FORMAT_LEFT, 500  ); 
 
     mOutputList->ClearAll();
@@ -625,7 +627,9 @@ namespace bbtk
                               wxLIST_FORMAT_LEFT, 80  ); 
     mOutputList->InsertColumn( 1, _("Type"), 
                               wxLIST_FORMAT_LEFT, 100 ); 
-    mOutputList->InsertColumn( 2, _("Description"), 
+    mOutputList->InsertColumn( 2, _("Nature"), 
+                              wxLIST_FORMAT_LEFT, 100  ); 
+    mOutputList->InsertColumn( 3, _("Description"), 
                               wxLIST_FORMAT_LEFT, 500  ); 
     
 
@@ -725,7 +729,8 @@ namespace bbtk
     l->InsertItem(kNewItem);
     l->SetItem(nID, 0, std2wx(d->GetName()) );
     l->SetItem(nID, 1, std2wx(d->GetTypeName()) );
-    l->SetItem(nID, 2, std2wx(d->GetDescription()) );
+    l->SetItem(nID, 2, std2wx(d->GetNature()) );
+    l->SetItem(nID, 3, std2wx(d->GetDescription()) );
   }
   //================================================================
 
index 0ea322d..d734f86 100644 (file)
@@ -80,18 +80,18 @@ namespace bbitk
   BBTK_CATEGORY("filter;image");
   BBTK_DESCRIPTION("Binarizes an image by thresholding (generic bbification of itk::BinaryThresholdImageFilter)");
   BBTK_INPUT(BinaryThresholdImageFilterGeneric,In,
-            "Input image. Can be any itk::Image<T,D>*",anyImagePointer);
+            "Input image. Can be any itk::Image<T,D>*",anyImagePointer,"");
   BBTK_INPUT(BinaryThresholdImageFilterGeneric,LowerThreshold,
-            "Lower threshold",double);
+            "Lower threshold",double,"");
   BBTK_INPUT(BinaryThresholdImageFilterGeneric,UpperThreshold,
-            "Upper threshold",double);
+            "Upper threshold",double,"");
   BBTK_INPUT(BinaryThresholdImageFilterGeneric,InsideValue,
-            "Output value for pixels inside thresholds",double);
+            "Output value for pixels inside thresholds",double,"");
   BBTK_INPUT(BinaryThresholdImageFilterGeneric,OutsideValue,
-            "Output value for pixels outside thresholds",double);
+            "Output value for pixels outside thresholds",double,"");
   BBTK_OUTPUT(BinaryThresholdImageFilterGeneric,Out,
              "Output image. Of the same type and dimension than the input image",
-             anyImagePointer);
+             anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(BinaryThresholdImageFilterGeneric);
 
 
index e659761..b6de2d1 100644 (file)
@@ -59,9 +59,9 @@ namespace bbitk
   BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
   BBTK_CATEGORY("image;filter");
   BBTK_DESCRIPTION("Decrease the image size by cropping the image to the selected region bounds (bbification of itk::ExtractImageFilter)");
-  BBTK_INPUT(ExtractImageFilterGeneric,In,"Input image",anyImagePointer);
-  BBTK_INPUT(ExtractImageFilterGeneric,Region,"Extraction region",anyImageRegion);
-  BBTK_OUTPUT(ExtractImageFilterGeneric,Out,"Output image",anyImagePointer);
+  BBTK_INPUT(ExtractImageFilterGeneric,In,"Input image",anyImagePointer,"");
+  BBTK_INPUT(ExtractImageFilterGeneric,Region,"Extraction region",anyImageRegion,"");
+  BBTK_OUTPUT(ExtractImageFilterGeneric,Out,"Output image",anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ExtractImageFilterGeneric);
   void ExtractImageFilterGeneric::ProcessSwitch()
   {
index 786fa53..e298799 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkImageProperties.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 07:58:54 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -67,13 +67,13 @@ namespace bbitk
   BBTK_AUTHOR("laurent.guigues at creatis.insa-lyon.fr");
   BBTK_CATEGORY("image");
   BBTK_DESCRIPTION("Outputs different properties of an image (type, dimension, size, spacing, ...)");
-  BBTK_INPUT(ImageProperties,In,"Input image",anyImagePointer);
-  BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string);
-  BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int);
-  BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion);
-  BBTK_OUTPUT(ImageProperties,Index,"Origin of the image",std::vector<int>);
-  BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector<int>);
-  BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<float>);
+  BBTK_INPUT(ImageProperties,In,"Input image",anyImagePointer,"");
+  BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string,"pixel type");
+  BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int,"image dimension");
+  BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion,"");
+  BBTK_OUTPUT(ImageProperties,Index,"Origin of the image",std::vector<int>,"image index");
+  BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector<int>,"image size");
+  BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<float>,"voxel size");
   BBTK_END_DESCRIBE_BLACK_BOX(ImageProperties);
   //=================================================================
   
index 2ad0f06..4a17152 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkImageReader.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 07:58:54 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -61,8 +61,8 @@ namespace bbitk
   BBTK_CATEGORY("image;read/write");
   BBTK_DESCRIPTION("Generic itk image reader");
   BBTK_INPUT(ImageReader,Filename,
-            "filename with complete path",std::string);
-  BBTK_OUTPUT(ImageReader,Out,"Output image",anyImagePointer);
+            "filename with complete path",std::string,"file name");
+  BBTK_OUTPUT(ImageReader,Out,"Output image",anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ImageReader);
   //=================================================================
   
index 189067b..fdcf589 100644 (file)
@@ -64,10 +64,10 @@ namespace bbitk
   BBTK_CATEGORY("image");
        typedef std::vector<long> vectoroflong;
   BBTK_INPUT(ImageRegionCreator,Index,"Vector of region indices",
-            vectoroflong);
+            vectoroflong,"image index");
   BBTK_INPUT(ImageRegionCreator,Size,"Vector of region sizes",
-            vectoroflong);
-  BBTK_OUTPUT(ImageRegionCreator,Out,"Output generic region",anyImageRegion);
+            vectoroflong,"image size");
+  BBTK_OUTPUT(ImageRegionCreator,Out,"Output generic region",anyImageRegion,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ImageRegionCreator);
   
 } // namespace bbitk
index 34a1b7a..5798b7a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkImageSeriesReader.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 07:58:55 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -63,8 +63,8 @@ namespace bbitk
   BBTK_CATEGORY("image;read/write");
   typedef std::vector<std::string> vectorofstring;
   BBTK_INPUT(ImageSeriesReader,FileNames,
-            "vector of file names with complete paths",vectorofstring);
-  BBTK_OUTPUT(ImageSeriesReader,Out,"Output itk::image<T,D> with type T and dimension D determined by the content of the files",anyImagePointer);
+            "vector of file names with complete paths",vectorofstring,"file names list");
+  BBTK_OUTPUT(ImageSeriesReader,Out,"Output itk::image<T,D> with type T and dimension D determined by the content of the files",anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ImageSeriesReader);
   //=================================================================
   
index 6457760..d4fa74b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkImageWriter.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/07 07:58:55 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:31 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -61,8 +61,8 @@ namespace bbitk
   BBTK_DESCRIPTION("Generic itk image writer");
   BBTK_CATEGORY("image;read/write");
   BBTK_INPUT(ImageWriter,Filename,
-            "filename with complete path",std::string);
-  BBTK_INPUT(ImageWriter,In,"Image to write",anyImagePointer);
+            "filename with complete path",std::string,"file name");
+  BBTK_INPUT(ImageWriter,In,"Image to write",anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ImageWriter);
   //=================================================================
   
index 5d87c97..8c9ed21 100644 (file)
@@ -39,14 +39,14 @@ namespace bbitk
   BBTK_DESCRIPTION("Resamples an image");
   BBTK_CATEGORY("image;filter");
   BBTK_INPUT(ResampleImageFilter,In,
-            "Input image. Can be any itk::Image<T,D>*",anyImagePointer);
+            "Input image. Can be any itk::Image<T,D>*",anyImagePointer,"");
   BBTK_INPUT(ResampleImageFilter,Spacing,
-            "Spacing",std::vector<double>);
+            "Spacing",std::vector<double>,"spacing");
   BBTK_INPUT(ResampleImageFilter,Interpolation,
-            "Interpolation",std::string);
+            "Interpolation",std::string,"");
   BBTK_OUTPUT(ResampleImageFilter,Out,
              "Output image. Of the same type and dimension than the input image",
-             anyImagePointer);
+             anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ResampleImageFilter);
 
 
index 35238a5..e0a21c3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkvtkitkImage2vtkImageData.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 11:49:17 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:31 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -64,10 +64,10 @@ namespace bbitkvtk
   BBTK_DESCRIPTION("Converts a generic itkImage to a vtkImageData");
   BBTK_DEFAULT_ADAPTOR();
   BBTK_INPUT(itkImage2vtkImageData,In,
-            "Input itkImage",bbitk::anyImagePointer);
+            "Input itkImage",bbitk::anyImagePointer,"");
   BBTK_OUTPUT(itkImage2vtkImageData,Out,
              "Output vtkImageData",
-             vtkImageData*);
+             vtkImageData*,"");
   BBTK_END_DESCRIBE_BLACK_BOX(itkImage2vtkImageData);
   //=================================================================
    
index 9467881..94fc7ce 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkvtkvtkImageData2itkImage.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 11:49:18 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:31 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -61,10 +61,10 @@ namespace bbitkvtk
   BBTK_DESCRIPTION("Converts a vtkImageData* to a generic itkImage pointer");
   BBTK_DEFAULT_ADAPTOR();
   BBTK_INPUT(vtkImageData2itkImage,In,
-            "Input vtkImageData",vtkImageData*);
+            "Input vtkImageData",vtkImageData*,"");
   BBTK_OUTPUT(vtkImageData2itkImage,Out,
              "Output itkImage",
-             bbitk::anyImagePointer);
+             bbitk::anyImagePointer,"");
   BBTK_END_DESCRIBE_BLACK_BOX(vtkImageData2itkImage);
   //=================================================================
   
index 1144e71..13cee0e 100644 (file)
@@ -29,11 +29,11 @@ virtual void bbUserDestructor();
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ASCII,bbtk::AtomicBlackBox);
   BBTK_NAME("ASCII");  
   BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
-  BBTK_DESCRIPTION("ascii to string - string to ascii");
-  BBTK_CATEGORY("__CATEGORY__");
-  BBTK_INPUT(ASCII,In,"Input Ascii number or Ascii",std::string);
-  BBTK_INPUT(ASCII,type,"type (default 0) 0=AsciiNum_To_String, 1=String_To_AsciiNum",int);
-  BBTK_OUTPUT(ASCII,Out,"Ascii number or Ascii",std::string);
+  BBTK_DESCRIPTION("ascii codes sequence to string - string to ascii codes sequence");
+  BBTK_CATEGORY("misc");
+  BBTK_INPUT(ASCII,In,"Input Ascii code or Ascii character",std::string,"");
+  BBTK_INPUT(ASCII,type,"type (default 0) 0=Ascii codes to string, 1=String to ascii codes",int,"");
+  BBTK_OUTPUT(ASCII,Out,"Ascii codes sequence or characters sequence",std::string,"");
 BBTK_END_DESCRIBE_BLACK_BOX(ASCII);
 }
 // EO namespace bbstd
index 78e55d4..38a2758 100644 (file)
@@ -33,17 +33,17 @@ namespace bbstd
   BBTK_AUTHOR("jean-pierre.roux@creatis.insa-lyon.fr");
   BBTK_CATEGORY("misc");
   BBTK_DESCRIPTION("String concatenation");
-  BBTK_INPUT(ConcatStrings,In1, "String 1", std::string);
-  BBTK_INPUT(ConcatStrings,In2, "String 2", std::string);  
-  BBTK_INPUT(ConcatStrings,In3, "String 3", std::string);  
-  BBTK_INPUT(ConcatStrings,In4, "String 4", std::string);  
-  BBTK_INPUT(ConcatStrings,In5, "String 5", std::string);  
-  BBTK_INPUT(ConcatStrings,In6, "String 6", std::string);  
-  BBTK_INPUT(ConcatStrings,In7, "String 7", std::string);  
-  BBTK_INPUT(ConcatStrings,In8, "String 8", std::string);  
-  BBTK_INPUT(ConcatStrings,In9, "String 9", std::string);  
-  BBTK_INPUT(ConcatStrings,In10,"String 10",std::string);  
-  BBTK_OUTPUT(ConcatStrings,Out,"Concatenated string",std::string);
+  BBTK_INPUT(ConcatStrings,In1, "String 1", std::string,"");
+  BBTK_INPUT(ConcatStrings,In2, "String 2", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In3, "String 3", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In4, "String 4", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In5, "String 5", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In6, "String 6", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In7, "String 7", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In8, "String 8", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In9, "String 9", std::string,"");  
+  BBTK_INPUT(ConcatStrings,In10,"String 10",std::string,"");  
+  BBTK_OUTPUT(ConcatStrings,Out,"Concatenated string",std::string,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ConcatStrings);
 
 }
index 00c8996..c85ff38 100644 (file)
@@ -28,11 +28,11 @@ namespace bbstd
   BBTK_AUTHOR("jpr@creatis.insa-lyon.fr");
   BBTK_CATEGORY("misc");
   BBTK_DESCRIPTION("Gets configuration informations");
-  BBTK_OUTPUT(Configuration,BinPath,"Binaries path",std::string);
-  BBTK_OUTPUT(Configuration,DataPath,"Data path",std::string);
-  BBTK_OUTPUT(Configuration,DocPath,"Documentation path",std::string);
-  BBTK_OUTPUT(Configuration,FileSeparator,"/ or \\",std::string);  
-  BBTK_OUTPUT(Configuration,SystemType,"0=Linux 1=Windows",int);  
+  BBTK_OUTPUT(Configuration,BinPath,"Binaries path",std::string,"directory name");
+  BBTK_OUTPUT(Configuration,DataPath,"Data path",std::string,"directory name");
+  BBTK_OUTPUT(Configuration,DocPath,"Documentation path",std::string,"directory name");
+  BBTK_OUTPUT(Configuration,FileSeparator,"/ or \\",std::string,"");  
+  BBTK_OUTPUT(Configuration,SystemType,"0=Linux 1=Windows",int,"");  
   BBTK_END_DESCRIBE_BLACK_BOX(Configuration);
 }
 // EO namespace bbstd
index 40b6da5..2718848 100755 (executable)
@@ -25,7 +25,7 @@ namespace bbstd
     BBTK_NAME("ExecBbiCommand");
     BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
     BBTK_DESCRIPTION("Executes bbi commands");
-    BBTK_INPUT(ExecBbiCommand,In,"bbi commands separated by ';' , use '' to indicate strings ex. help 'graph' ",std::string);  
+    BBTK_INPUT(ExecBbiCommand,In,"bbi commands separated by ';' , use '' to indicate strings ex. help 'graph' ",std::string,"");  
 //  BBTK_OUTPUT(ExecBbiCommand,Out,"Concatenated string",std::string);
   BBTK_END_DESCRIBE_BLACK_BOX(ExecBbiCommand);
 
index cc7f72a..e3b6ba1 100755 (executable)
@@ -25,7 +25,7 @@ namespace bbstd
     BBTK_NAME("ExecSystemCommand");
     BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
     BBTK_DESCRIPTION("Execute bbi commands");
-    BBTK_INPUT(ExecSystemCommand,In,"bbi commands separated by ';' , use '' to indicate strings ex. help 'graph' ",std::string);  
+    BBTK_INPUT(ExecSystemCommand,In,"bbi commands separated by ';' , use '' to indicate strings ex. help 'graph' ",std::string,"");  
 //  BBTK_OUTPUT(ExecSystemCommand,Out,"Concatenated string",std::string);
   BBTK_END_DESCRIBE_BLACK_BOX(ExecSystemCommand);
 
index 79f575e..561e37b 100644 (file)
@@ -71,14 +71,14 @@ namespace bbstd
   AddInputDescriptor
   (new bbtk::AtomicBlackBoxInputDescriptor
    (typeid(MagicBoxDescriptor),
-    "In","Input data",
+    "In","Input data","",
     new bbtk::AtomicBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
     (&MagicBox::bbGetInputIn),
     new MagicBoxSetFunctor (&MagicBox::bbSetInputIn) ) );
   AddOutputDescriptor
   (new bbtk::AtomicBlackBoxOutputDescriptor
    (typeid(MagicBoxDescriptor),
-    "Out","Output data",
+    "Out","Output data","",
     new bbtk::AtomicBlackBoxTGetFunctor<MagicBox,bbtk::Data,bbtk::Data>
     (&MagicBox::bbGetOutputOut),
     new MagicBoxSetFunctor (&MagicBox::bbSetOutputOut) ) );
index c370742..af94462 100644 (file)
@@ -27,11 +27,11 @@ namespace bbstd
   BBTK_AUTHOR("jpr@creatis.insa-lyon.fr");
   BBTK_CATEGORY("misc");
   BBTK_DESCRIPTION("Makes a kosher file name");
-  BBTK_INPUT(MakeFileName,Directory,"Directory Name",std::string);
-  BBTK_INPUT(MakeFileName,File,"File Name",std::string);
-  BBTK_INPUT(MakeFileName,Extent,"Extention",std::string);
+  BBTK_INPUT(MakeFileName,Directory,"Directory Name",std::string,"directory name");
+  BBTK_INPUT(MakeFileName,File,"File Name",std::string,"file name");
+  BBTK_INPUT(MakeFileName,Extent,"Extention",std::string,"file extension");
   
-  BBTK_OUTPUT(MakeFileName,Out,"Full File Name",std::string);
+  BBTK_OUTPUT(MakeFileName,Out,"Full File Name",std::string,"file name");
   BBTK_END_DESCRIBE_BLACK_BOX(MakeFileName);
 
 }
index fe08851..8bafeba 100644 (file)
@@ -38,18 +38,18 @@ namespace bbstd
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
   BBTK_CATEGORY("misc");
   BBTK_DESCRIPTION("Outputs the string set to the ith input Ini (In0 ... In9) according to the value of the input In, hence selects a string according to an index.");
-  BBTK_INPUT(StringSelect,In,"Index of the string to select",int);
-  BBTK_INPUT(StringSelect,In0,"String of index 0",std::string);
-  BBTK_INPUT(StringSelect,In1,"String of index 1",std::string);
-  BBTK_INPUT(StringSelect,In2,"String of index 2",std::string);
-  BBTK_INPUT(StringSelect,In3,"String of index 3",std::string);
-  BBTK_INPUT(StringSelect,In4,"String of index 4",std::string);
-  BBTK_INPUT(StringSelect,In5,"String of index 4",std::string);
-  BBTK_INPUT(StringSelect,In6,"String of index 6",std::string);
-  BBTK_INPUT(StringSelect,In7,"String of index 7",std::string);
-  BBTK_INPUT(StringSelect,In8,"String of index 8",std::string);
-  BBTK_INPUT(StringSelect,In9,"String of index 9",std::string);
-  BBTK_OUTPUT(StringSelect,Out,"Selected string",std::string);
+  BBTK_INPUT(StringSelect,In,"Index of the string to select",int,"");
+  BBTK_INPUT(StringSelect,In0,"String of index 0",std::string,"");
+  BBTK_INPUT(StringSelect,In1,"String of index 1",std::string,"");
+  BBTK_INPUT(StringSelect,In2,"String of index 2",std::string,"");
+  BBTK_INPUT(StringSelect,In3,"String of index 3",std::string,"");
+  BBTK_INPUT(StringSelect,In4,"String of index 4",std::string,"");
+  BBTK_INPUT(StringSelect,In5,"String of index 4",std::string,"");
+  BBTK_INPUT(StringSelect,In6,"String of index 6",std::string,"");
+  BBTK_INPUT(StringSelect,In7,"String of index 7",std::string,"");
+  BBTK_INPUT(StringSelect,In8,"String of index 8",std::string,"");
+  BBTK_INPUT(StringSelect,In9,"String of index 9",std::string,"");
+  BBTK_OUTPUT(StringSelect,Out,"Selected string",std::string,"");
   BBTK_END_DESCRIBE_BLACK_BOX(StringSelect);
   //=======================================================================
 
index a4f12a2..863ca66 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkImagePlanes.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/01 14:26:22 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -84,10 +84,10 @@ namespace bbvtk
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("Creates three 3D planes with the input image mapped onto with which the user can interact. The output vtkImagePlaneWidget objects are to be inserted into a 3D scene (e.g. a Viewer3D)");
   BBTK_CATEGORY("3D object creator");
-  BBTK_INPUT(ImagePlanes,In,"Input Image",vtkImageData *);
-  BBTK_OUTPUT(ImagePlanes,PlaneX,"The image plane in X direction",vtkImagePlaneWidget*);
-  BBTK_OUTPUT(ImagePlanes,PlaneY,"The image plane in Y direction",vtkImagePlaneWidget*);
-  BBTK_OUTPUT(ImagePlanes,PlaneZ,"The image plane in Z direction",vtkImagePlaneWidget*);
+  BBTK_INPUT(ImagePlanes,In,"Input Image",vtkImageData *,"");
+  BBTK_OUTPUT(ImagePlanes,PlaneX,"The image plane in X direction",vtkImagePlaneWidget*,"");
+  BBTK_OUTPUT(ImagePlanes,PlaneY,"The image plane in Y direction",vtkImagePlaneWidget*,"");
+  BBTK_OUTPUT(ImagePlanes,PlaneZ,"The image plane in Z direction",vtkImagePlaneWidget*,"");
   BBTK_END_DESCRIBE_BLACK_BOX(ImagePlanes);
   //=================================================================
 
index 71b8f1a..5cebfec 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkIsoSurfaceExtractor.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/19 13:30:18 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -84,13 +84,13 @@ namespace bbvtk
   BBTK_DESCRIPTION("Extracts an iso-surface of a 3D image and creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)");
   typedef std::vector<double> vectorcolour;
   BBTK_CATEGORY("3D object creator");
-  BBTK_INPUT(IsoSurfaceExtractor,In,"Input image",vtkImageData*);
+  BBTK_INPUT(IsoSurfaceExtractor,In,"Input image",vtkImageData*,"");
   //  BBTK_INPUT(IsoSurfaceExtractor,InVtkObject,"Image vtkObject",vtkObject*);
-  BBTK_INPUT(IsoSurfaceExtractor,Isovalue,"Isovalue",double);
-  BBTK_INPUT(IsoSurfaceExtractor,Opacity,"Opacity",double);
-  BBTK_INPUT(IsoSurfaceExtractor,Colour,"r g b",vectorcolour);
+  BBTK_INPUT(IsoSurfaceExtractor,Isovalue,"Isovalue",double,"");
+  BBTK_INPUT(IsoSurfaceExtractor,Opacity,"Opacity",double,"");
+  BBTK_INPUT(IsoSurfaceExtractor,Colour,"r g b",vectorcolour,"color");
   //  BBTK_INPUT(IsoSurfaceExtractor,Renderer,"3D scene in which to insert the surface",vtkRenderer*);
-  BBTK_OUTPUT(IsoSurfaceExtractor,Out,"Extracted iso-surface",vtkProp3D *);
+  BBTK_OUTPUT(IsoSurfaceExtractor,Out,"Extracted iso-surface",vtkProp3D *,"");
   
   BBTK_END_DESCRIBE_BLACK_BOX(IsoSurfaceExtractor);
   
index 3d1bd4a..cf04d79 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkMIPCreator.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/19 13:30:18 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -81,10 +81,10 @@ namespace bbvtk
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("Creates a Maximum Intensity Projection (MIP) view of a 3D image. Creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)");
   BBTK_CATEGORY("3D object creator");
-  BBTK_INPUT(MIPCreator,Shift,"Gray scale shift",int);
-  BBTK_INPUT(MIPCreator,Scale,"Gray scale scaling",float);
-  BBTK_INPUT(MIPCreator,In,"Input Image",vtkImageData *);
-  BBTK_OUTPUT(MIPCreator,Out,"MIP object to plug into a 3D viewer",vtkProp3D*);
+  BBTK_INPUT(MIPCreator,Shift,"Gray scale shift",int,"");
+  BBTK_INPUT(MIPCreator,Scale,"Gray scale scaling",float,"");
+  BBTK_INPUT(MIPCreator,In,"Input Image",vtkImageData *,"");
+  BBTK_OUTPUT(MIPCreator,Out,"MIP object to plug into a 3D viewer",vtkProp3D*,"");
   BBTK_END_DESCRIBE_BLACK_BOX(MIPCreator);
   //=================================================================
 
index fd1041b..b281f7e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkMarchingCubes.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/13 08:21:38 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -79,9 +79,9 @@ namespace bbvtk
   BBTK_DESCRIPTION("Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes)");
   BBTK_CATEGORY("image;mesh");
 
-  BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*);
-  BBTK_INPUT(MarchingCubes,Value,"Value of the iso-surface",double);
-  BBTK_OUTPUT(MarchingCubes,Out,"Output iso-surface",vtkPolyData*);
+  BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*,"");
+  BBTK_INPUT(MarchingCubes,Value,"Value of the iso-surface",double,"");
+  BBTK_OUTPUT(MarchingCubes,Out,"Output iso-surface",vtkPolyData*,"");
   
   BBTK_END_DESCRIBE_BLACK_BOX(MarchingCubes);
   //=======================================================================
index d254bc4..a35231d 100644 (file)
@@ -10,7 +10,7 @@
 <include>vtkImageData.h</include> 
 <vtkparent>vtkMetaImageReader</vtkparent>
 
-<input name="In" type="std::string" description="Filename"/>  
+<input name="In" type="std::string" nature="file name" description="Name of the file to read"/>  
 <output name="Out" type="vtkImageData*" description="Output image" special="vtk output"/>
 
  <process><PRE>
index cae667b..885951d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxColourSelector.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/20 11:51:59 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -67,7 +67,7 @@ namespace bbwx
   BBTK_NAME("ColourSelector");
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("Colour Selector dialog (bbfication of wxColourSelector)");
-  BBTK_OUTPUT(ColourSelector,Out,"The colour selected by the user",std::string);
+  BBTK_OUTPUT(ColourSelector,Out,"The colour selected by the user",std::string,"color");
   BBTK_END_DESCRIBE_BLACK_BOX(ColourSelector);
   //=================================================================
 
index 0ffeb1d..4d51d1a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxColourSelectorButton.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/20 11:36:29 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -102,8 +102,8 @@ private:
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
   BBTK_DESCRIPTION("A button which displays a colour picker dialog when clicked");
-  BBTK_INPUT(ColourSelectorButton,In,"Initial colour",std::string);
-  BBTK_OUTPUT(ColourSelectorButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string);
+  BBTK_INPUT(ColourSelectorButton,In,"Initial colour",std::string,"color");
+  BBTK_OUTPUT(ColourSelectorButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string,"color");
   BBTK_END_DESCRIBE_BLACK_BOX(ColourSelectorButton);
   //=================================================================
   
index 1c4374d..9e58b1a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk 
   Module:    $RCSfile: bbwxCommandButton.h,v $ 
   Language:  C++ 
-  Date:      $Date: 2008/02/15 12:47:18 $ 
-  Version:   $Revision: 1.1 $ 
+  Date:      $Date: 2008/04/08 06:59:32 $ 
+  Version:   $Revision: 1.2 $ 
                                                                                  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 
   l'Image). All rights reserved. See Doc/License.txt or 
@@ -94,9 +94,9 @@ namespace bbwx
 
   typedef std::vector<double> vectorcolour;
   
-  BBTK_INPUT(CommandButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string);   
-  BBTK_INPUT(CommandButton,Label,"Label of the button",std::string); 
-  BBTK_INPUT(CommandButton,Colour,"Colour of the button (-1 -1 -1  Background)",vectorcolour); 
+  BBTK_INPUT(CommandButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string,"");   
+  BBTK_INPUT(CommandButton,Label,"Label of the button",std::string,""); 
+  BBTK_INPUT(CommandButton,Colour,"Colour of the button (-1 -1 -1  Background)",vectorcolour,"color"); 
   //   BBTK_OUTPUT(CommandButton,Out,"..Out..",int); 
   BBTK_END_DESCRIBE_BLACK_BOX(CommandButton); 
   //================================================================= 
index f30f63d..b4f1753 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxDirectorySelector.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/15 12:47:18 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -70,10 +70,10 @@ namespace bbwx
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   BBTK_CATEGORY("widget");
   BBTK_DESCRIPTION("Pops up a directory selection dialog (wxDirDialog)");
-  BBTK_INPUT(DirectorySelector,Title,"Title of the dialog",std::string);
-  BBTK_INPUT(DirectorySelector,Message,"Message to show on the dialog",std::string);
-  BBTK_INPUT(DirectorySelector,DefaultDir,"The default directory",std::string);
-  BBTK_OUTPUT(DirectorySelector,Out,"The directory selected by the user",std::string);
+  BBTK_INPUT(DirectorySelector,Title,"Title of the dialog",std::string,"directory name");
+  BBTK_INPUT(DirectorySelector,Message,"Message to show on the dialog",std::string,"");
+  BBTK_INPUT(DirectorySelector,DefaultDir,"The default directory",std::string,"directory name");
+  BBTK_OUTPUT(DirectorySelector,Out,"The directory selected by the user",std::string,"directory name");
   BBTK_END_DESCRIBE_BLACK_BOX(DirectorySelector);
   //=================================================================
 
index b0a9037..836bf44 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxFileSelector.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/15 12:47:18 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -70,13 +70,14 @@ namespace bbwx
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   BBTK_CATEGORY("widget");
   BBTK_DESCRIPTION("Pops up a file selection dialog for reading or saving (wxFileDialog)");
-  BBTK_INPUT(FileSelector,Title,"Title of the dialog",std::string);
-  BBTK_INPUT(FileSelector,Message,"Message to show on the dialog",std::string);
-  BBTK_INPUT(FileSelector,DefaultDir,"The default directory",std::string);
-  BBTK_INPUT(FileSelector,DefaultFile,"The default filename",std::string);
-  BBTK_INPUT(FileSelector,Wildcard,"A wildcard, such as \"*.*\" or \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"",std::string);
-  BBTK_INPUT(FileSelector,OpenSave,"Open for an open dialog (default) / Save for a save dialog",std::string);
-  BBTK_OUTPUT(FileSelector,Out,"The file selected by the user",std::string);
+  BBTK_INPUT(FileSelector,Title,"Title of the dialog",std::string,"");
+  BBTK_INPUT(FileSelector,Message,"Message to show on the dialog",
+            std::string,"");
+  BBTK_INPUT(FileSelector,DefaultDir,"The default directory",std::string,"");
+  BBTK_INPUT(FileSelector,DefaultFile,"The default filename",std::string,"file name");
+  BBTK_INPUT(FileSelector,Wildcard,"A wildcard, such as \"*.*\" or \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"",std::string,"wildcard");
+  BBTK_INPUT(FileSelector,OpenSave,"Open for an open dialog (default) / Save for a save dialog",std::string,"");
+  BBTK_OUTPUT(FileSelector,Out,"The file selected by the user",std::string,"file name");
   BBTK_END_DESCRIBE_BLACK_BOX(FileSelector);
   //=================================================================
 
index 6cdb27e..0db6f4e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxInputText.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/15 12:47:18 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -98,11 +98,12 @@ namespace bbwx
   BBTK_NAME("InputText");
   BBTK_AUTHOR("laurent guigues at creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("A zone in which the user can enter a text (wxTextCtrl)");
-  BBTK_INPUT(InputText,In,"Initial text (default '')",std::string);
+  BBTK_INPUT(InputText,In,"Initial text (default '')",std::string,"");
 
-  BBTK_INPUT(InputText,Title,"Title of the input zone (default '') ",std::string);
+  BBTK_INPUT(InputText,Title,"Title of the input zone (default '') ",
+            std::string,"");
 
-  BBTK_OUTPUT(InputText,Out,"Current text",std::string);
+  BBTK_OUTPUT(InputText,Out,"Current text",std::string,"");
   BBTK_END_DESCRIBE_BLACK_BOX(InputText);
   //=================================================================
 
index 069811e..a9e9909 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutLine.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/15 12:19:58 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -81,16 +81,16 @@ namespace bbwx
   BBTK_DESCRIPTION("LayoutLine widget (wxBoxSizer)");
   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
   
-  BBTK_INPUT(LayoutLine,Widget1,"widget 1",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget2,"widget 2",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget3,"widget 3",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget4,"widget 4",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget5,"widget 5",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget6,"widget 6",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget7,"widget 7",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget8,"widget 8",wxWindow*);
-  BBTK_INPUT(LayoutLine,Widget9,"widget 9",wxWindow*);
-  BBTK_INPUT(LayoutLine,Orientation,"Orientation (default V), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string);
+  BBTK_INPUT(LayoutLine,Widget1,"widget 1",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget2,"widget 2",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget3,"widget 3",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget4,"widget 4",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget5,"widget 5",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget6,"widget 6",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget7,"widget 7",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget8,"widget 8",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Widget9,"widget 9",wxWindow*,"");
+  BBTK_INPUT(LayoutLine,Orientation,"Orientation (default V), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,"");
   BBTK_END_DESCRIBE_BLACK_BOX(LayoutLine);
   //=================================================================
   
index a1656c1..32424b3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutSplit.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/15 12:24:43 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -70,10 +70,10 @@ namespace bbwx
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("Widget which splits a window in two fixed size parts (wxSplitterWindow)");
   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
-  BBTK_INPUT(LayoutSplit,Widget1,"Upper or left widget",wxWindow*);
-  BBTK_INPUT(LayoutSplit,Widget2,"Lower or right widget",wxWindow*);
-  BBTK_INPUT(LayoutSplit,Orientation,"Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string);
-   BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int);
+  BBTK_INPUT(LayoutSplit,Widget1,"Upper or left widget",wxWindow*,"");
+  BBTK_INPUT(LayoutSplit,Widget2,"Lower or right widget",wxWindow*,"");
+  BBTK_INPUT(LayoutSplit,Orientation,"Orientation (default H), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,"");
+   BBTK_INPUT(LayoutSplit,Proportion,"Proportion (in percent) of the first children in the window",int,"");
   BBTK_END_DESCRIBE_BLACK_BOX(LayoutSplit);
   //=================================================================
 }
index ed3cd47..6827853 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxLayoutTab.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/19 18:31:36 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -80,16 +80,18 @@ namespace bbwx
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("LayoutTab widget (wxNotebook)");
     // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
-    BBTK_INPUT(LayoutTab,Widget1,"widget 1",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget2,"widget 2",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget3,"widget 3",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget4,"widget 4",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget5,"widget 5",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget6,"widget 6",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget7,"widget 7",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget8,"widget 8",wxWindow*);
-    BBTK_INPUT(LayoutTab,Widget9,"widget 9",wxWindow*);
-    BBTK_INPUT(LayoutTab,Orientation,"Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT " ,std::string);
+    BBTK_INPUT(LayoutTab,Widget1,"widget 1",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget2,"widget 2",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget3,"widget 3",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget4,"widget 4",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget5,"widget 5",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget6,"widget 6",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget7,"widget 7",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget8,"widget 8",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Widget9,"widget 9",wxWindow*,"");
+    BBTK_INPUT(LayoutTab,Orientation,
+              "Orientation (default T), 0=T=TOP , 1=R=RIGHT , 2=B=BOTTON , 3=L=LEFT " 
+              ,std::string,"");
   BBTK_END_DESCRIBE_BLACK_BOX(LayoutTab);
   //=================================================================
 
index 71a0d10..f6764e4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxRadioButton.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/11 14:47:12 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -109,22 +109,23 @@ namespace bbwx
   BBTK_NAME("RadioButton");
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("RadioButton group widget 0-9 entries");
-  BBTK_INPUT(RadioButton,In,"Set initial item",int);
-
-  BBTK_INPUT(RadioButton,In0,"option 0",std::string);
-  BBTK_INPUT(RadioButton,In1,"option 1",std::string);
-  BBTK_INPUT(RadioButton,In2,"option 2",std::string);
-  BBTK_INPUT(RadioButton,In3,"option 3",std::string);
-  BBTK_INPUT(RadioButton,In4,"option 4",std::string);
-  BBTK_INPUT(RadioButton,In5,"option 5",std::string);
-  BBTK_INPUT(RadioButton,In6,"option 6",std::string);
-  BBTK_INPUT(RadioButton,In7,"option 7",std::string);
-  BBTK_INPUT(RadioButton,In8,"option 8",std::string);
-  BBTK_INPUT(RadioButton,In9,"option 9",std::string);
-
-  BBTK_INPUT(RadioButton,Title,"Title of the widget (default '') ",std::string);
-
-  BBTK_OUTPUT(RadioButton,Out,"Item selected",int);
+  BBTK_INPUT(RadioButton,In,"Set initial item",int,"");
+
+  BBTK_INPUT(RadioButton,In0,"option 0",std::string,"");
+  BBTK_INPUT(RadioButton,In1,"option 1",std::string,"");
+  BBTK_INPUT(RadioButton,In2,"option 2",std::string,"");
+  BBTK_INPUT(RadioButton,In3,"option 3",std::string,"");
+  BBTK_INPUT(RadioButton,In4,"option 4",std::string,"");
+  BBTK_INPUT(RadioButton,In5,"option 5",std::string,"");
+  BBTK_INPUT(RadioButton,In6,"option 6",std::string,"");
+  BBTK_INPUT(RadioButton,In7,"option 7",std::string,"");
+  BBTK_INPUT(RadioButton,In8,"option 8",std::string,"");
+  BBTK_INPUT(RadioButton,In9,"option 9",std::string,"");
+
+  BBTK_INPUT(RadioButton,Title,"Title of the widget (default '') ",
+            std::string,"");
+
+  BBTK_OUTPUT(RadioButton,Out,"Item selected",int,"");
   BBTK_END_DESCRIBE_BLACK_BOX(RadioButton);
   //=================================================================
 
index 5d4d445..33c44ba 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxSlider.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/13 15:09:38 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/04/08 06:59:32 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -138,15 +138,15 @@ namespace bbwx
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
   BBTK_DESCRIPTION("Slider widget (wxSlider)");
-  BBTK_INPUT(Slider,In,"Initial position of the slider (default 0)",int);
-  BBTK_INPUT(Slider,Min,"Minimum value of the slider (default 0)",int);
-  BBTK_INPUT(Slider,Max,"Maximum value of the slider (default 500)",int);
-  BBTK_INPUT(Slider,Label,"Show slider labels ? (default FALSE) ",bool);
-  BBTK_INPUT(Slider,Title,"Title shown above the slider (default '') ", std::string);
-  BBTK_INPUT(Slider,Orientation, "Orientation : (default H)  0=H=HORIZONTAL, 1=V=VERTICAL ",std::string);
-  BBTK_INPUT(Slider,ChangeResolution, "Can the user change the resolution of the slider ? (default FALSE) ",bool);
-  BBTK_INPUT(Slider,ReactiveOnTrack, "Slider sends info when track moves (default 0 = no)",int);  
-  BBTK_OUTPUT(Slider,Out,"Current position of the slider",int);
+  BBTK_INPUT(Slider,In,"Initial position of the slider (default 0)",int,"");
+  BBTK_INPUT(Slider,Min,"Minimum value of the slider (default 0)",int,"");
+  BBTK_INPUT(Slider,Max,"Maximum value of the slider (default 500)",int,"");
+  BBTK_INPUT(Slider,Label,"Show slider labels ? (default FALSE) ",bool,"");
+  BBTK_INPUT(Slider,Title,"Title shown above the slider (default '') ", std::string,"");
+  BBTK_INPUT(Slider,Orientation, "Orientation : (default H)  0=H=HORIZONTAL, 1=V=VERTICAL ",std::string,"");
+  BBTK_INPUT(Slider,ChangeResolution, "Can the user change the resolution of the slider ? (default FALSE) ",bool,"");
+  BBTK_INPUT(Slider,ReactiveOnTrack, "Slider sends info when track moves (default 0 = no)",int,"");  
+  BBTK_OUTPUT(Slider,Out,"Current position of the slider",int,"");
   BBTK_END_DESCRIBE_BLACK_BOX(Slider);
   //=================================================================
   
index d24947c..34d5d55 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer2D.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/10 12:28:44 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/08 06:59:33 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -93,10 +93,10 @@ namespace bbwxvtk
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("Viewer2D widget (vtk)");
   BBTK_CATEGORY("viewer");
-  BBTK_INPUT(Viewer2D,Slice,"Position of the slider",int);
-  BBTK_INPUT(Viewer2D,Orientation,"Slicing orientation : 0:yz / 1:xz / 2:xy",int);
-  BBTK_INPUT(Viewer2D,In,"Input Image",vtkImageData *);
-  BBTK_OUTPUT(Viewer2D,Out,"Position of the slider",int);
+  BBTK_INPUT(Viewer2D,Slice,"Position of the slider",int,"");
+  BBTK_INPUT(Viewer2D,Orientation,"Slicing orientation : 0:yz / 1:xz / 2:xy",int,"");
+  BBTK_INPUT(Viewer2D,In,"Input Image",vtkImageData *,"");
+  BBTK_OUTPUT(Viewer2D,Out,"Position of the slider",int,"");
   BBTK_END_DESCRIBE_BLACK_BOX(Viewer2D);
   //=================================================================
 
index af59ce9..24a0a3c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer3D.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/01 14:26:23 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/08 06:59:33 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -100,18 +100,18 @@ namespace bbwxvtk
   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
   BBTK_DESCRIPTION("3D Viewer (vtk)");
   BBTK_CATEGORY("viewer");
-  BBTK_INPUT(Viewer3D,In1,"Input actor",vtkProp3D *);
-  BBTK_INPUT(Viewer3D,In2,"Input actor",vtkProp3D *);
-  BBTK_INPUT(Viewer3D,In3,"Input actor",vtkProp3D *);
-  BBTK_INPUT(Viewer3D,In4,"Input actor",vtkProp3D *);
-  BBTK_INPUT(Viewer3D,In5,"Input actor",vtkProp3D *);
-  BBTK_INPUT(Viewer3D,Obs1,"Input observer",vtkInteractorObserver *);
-  BBTK_INPUT(Viewer3D,Obs2,"Input observer",vtkInteractorObserver *);
-  BBTK_INPUT(Viewer3D,Obs3,"Input observer",vtkInteractorObserver *);
-  BBTK_INPUT(Viewer3D,Obs4,"Input observer",vtkInteractorObserver *);
-  BBTK_INPUT(Viewer3D,Obs5,"Input observer",vtkInteractorObserver *);
-  BBTK_OUTPUT(Viewer3D,Renderer,"Renderer to which actors can be added.",vtkRenderer*);
-  BBTK_OUTPUT(Viewer3D,Interactor,"Interactor with which vtk widgets can interact",wxVTKRenderWindowInteractor*);
+  BBTK_INPUT(Viewer3D,In1,"Input actor",vtkProp3D *,"");
+  BBTK_INPUT(Viewer3D,In2,"Input actor",vtkProp3D *,"");
+  BBTK_INPUT(Viewer3D,In3,"Input actor",vtkProp3D *,"");
+  BBTK_INPUT(Viewer3D,In4,"Input actor",vtkProp3D *,"");
+  BBTK_INPUT(Viewer3D,In5,"Input actor",vtkProp3D *,"");
+  BBTK_INPUT(Viewer3D,Obs1,"Input observer",vtkInteractorObserver *,"");
+  BBTK_INPUT(Viewer3D,Obs2,"Input observer",vtkInteractorObserver *,"");
+  BBTK_INPUT(Viewer3D,Obs3,"Input observer",vtkInteractorObserver *,"");
+  BBTK_INPUT(Viewer3D,Obs4,"Input observer",vtkInteractorObserver *,"");
+  BBTK_INPUT(Viewer3D,Obs5,"Input observer",vtkInteractorObserver *,"");
+  BBTK_OUTPUT(Viewer3D,Renderer,"Renderer to which actors can be added.",vtkRenderer*,"");
+  BBTK_OUTPUT(Viewer3D,Interactor,"Interactor with which vtk widgets can interact",wxVTKRenderWindowInteractor*,"");
   BBTK_END_DESCRIBE_BLACK_BOX(Viewer3D);
   //=================================================================