]> Creatis software - bbtk.git/commitdiff
Some cleaning
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 3 Jul 2008 18:20:56 +0000 (18:20 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 3 Jul 2008 18:20:56 +0000 (18:20 +0000)
16 files changed:
kernel/appli/bbCreateBlackBox/xml-templates/VTK_ImageAlgorithm-template.xml
kernel/appli/bbCreateBlackBox/xml-templates/VTK_PolyDataAlgorithm-template.xml
kernel/appli/bbCreateBlackBox/xml-templates/std-template.xml
kernel/appli/bbCreateBlackBox/xml-templates/widget-template.xml
kernel/appli/bbc/CMakeLists.txt
kernel/appli/bbc/main.cxx.in
kernel/appli/bbs2cpp/CMakeLists.txt
kernel/appli/bbs2cpp/bbs2cpp.cxx
kernel/doc/bbtkPackageDevelopersGuide/bbtkPackageDevelopersGuide.tex
kernel/src/bbtkBlackBoxInputOutputDescriptor.h
packages/toolsbbtk/bbs/appli/GUICreateBlackBox.bbs
packages/vtk/src/bbvtkConeSource.xml
packages/vtk/src/bbvtkImageDilateErode3D.xml
packages/vtk/src/bbvtkImageGaussianSmooth.xml
packages/vtk/src/bbvtkMetaImageReader.xml
packages/wx/src/bbwxDirectorySelector.h

index 3f0f0eccbe4297ae58a561be635b644b308e065b..bf2eea9644ac7cee52e5cd950af5b4476d16c244 100644 (file)
@@ -1,19 +1,66 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
+<!--==========================================================================
+   STARTS THE DESCRIPTION OF THE BLACK BOX -->
 
 <blackbox name="__BLACKBOXNAME__" type="VTK_ImageAlgorithm">
 
+ <!--========================================================================
+    THE BOX DOCUMENTATION -->
+
 <author>__AUTHOR__</author>
 <description><PRE>__DESCRIPTION__</PRE></description>
 <category>__CategoryBlackBox__</category>
 
+<!--========================================================================
+    #include directives to be put in the .h generated
+    There must be one tag per file to include -->
+
 <include>vtkImageAnisotropicDiffusion3D.h</include> 
-<include>vtkImageData.h</include> 
+<include>vtkImageData.h                  </include> 
+
+  <!--========================================================================
+    THE vtk class the box inherits from (if any) -->
 <vtkparent>vtkImageAnisotropicDiffusion3D</vtkparent>
 
+ <!--========================================================================
+    INPUTS/OUTPUTS DECLARATION -->
+
 <input name="In" type="vtkImageData*" special="vtk input" description="Input image"/>
 <output name="Out" type="vtkImageData*" special="vtk output" description="Output image"/>
 <input name="DiffusionThreshold" type="double" special="vtk parameter" description="Difference threshold that stops diffusion"/>
 
-</blackbox>
+  <!--========================================================================
+    CONSTRUCTORS / DESTRUCTORS (OPTIONAL) 
+    THE CONSTRUCTION METHOD BODY :
+    Generaly you initialize the Input variables with their default values
+    This is also where you should allocate the output pointers -->
+
+  <constructor>
+  <PRE>
+    bbSetInputIn(0);
+  </PRE>
+  </constructor>
 
+  <!-- THE COPY-CONSTRUCTION METHOD BODY :
+    Here does nothing 
+    But this is where you should allocate the output pointers if any
+    and copy the pointed values (to avoid bug caused by multiple references)-->
+  <copyconstructor>
+  <PRE>
+  </PRE>
+  </copyconstructor>
+
+  <!-- THE DESTRUCTION METHOD BODY :
+    Here does nothing 
+    but this is where you should desallocate the output pointers if any -->
+
+  <destructor>
+  <PRE>
+
+  </PRE>
+  </destructor>
+
+<!--=======================================================================-->
+<!-- END OF BLACK BOX DESCRIPTION -->
+</blackbox>
 
index b6eca380de057af593c2c50bef74e799c915a70e..c7f15bcac32ca0ec9ff1a3cfc3e2da7a76e8371c 100644 (file)
@@ -1,15 +1,27 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-
-
+<!--==========================================================================
+   STARTS THE DESCRIPTION OF THE BLACK BOX -->
 <blackbox name="__BLACKBOXNAME__" type="VTK_PolyDataAlgorithm">
 
+ <!--========================================================================
+    THE BOX DOCUMENTATION -->
+
 <author>__AUTHOR__</author>
 <description><PRE>__DESCRIPTION__</PRE></description>
 <category>__CategoryBlackBox__</category>
 
+<!--========================================================================
+    #include directives to be put in the .h generated
+    There must be one tag per file to include -->
+
 <include>vtkAppendPolyData.h</include> 
+
+  <!--========================================================================
+    THE vtk class the box inherits from (if any) -->
 <vtkparent>vtkAppendPolyData</vtkparent>
 
+ <!--========================================================================
+    INPUTS/OUTPUTS DECLARATION -->
 <output name="Out" type="vtkPolyData*" special="vtk output" description="Output Mesh"/>
 <input name="In1" type="vtkPolyData *" description="PolyData 1"/>
 <input name="In2" type="vtkPolyData *" description="PolyData 2"/>
@@ -17,6 +29,9 @@
 <input name="In4" type="vtkPolyData *" description="PolyData 4"/>
 <input name="In5" type="vtkPolyData *" description="PolyData 5"/>
 
+ <!--========================================================================
+    PROCESS section -->
+
 <process>
 <PRE>
   SetInput(bbGetInputIn1());
   SetInput(bbGetInputIn3());
   SetInput(bbGetInputIn4());
   SetInput(bbGetInputIn5());
-   
+
   Update();
 </PRE>
 </process>
 
+  <!--========================================================================
+    CONSTRUCTORS / DESTRUCTORS (OPTIONAL) 
+    THE CONSTRUCTION METHOD BODY :
+    Generaly you initialize the Input variables with their default values
+    This is also where you should allocate the output pointers -->
+
 <constructor>
 <PRE>
   bbSetInputIn1((vtkPolyData *)0);
   bbSetInputIn5((vtkPolyData *)0);
   bbSetOutputOut((vtkPolyData *)0);
 </PRE>
-</constructor>   
+</constructor>
+
+  <!-- THE COPY-CONSTRUCTION METHOD BODY :
+    Here does nothing 
+    But this is where you should allocate the output pointers if any
+    and copy the pointed values (to avoid bug caused by multiple references)-->
+  <copyconstructor>
+  <PRE>
+  </PRE>
+  </copyconstructor>
+
+  <!-- THE DESTRUCTION METHOD BODY :
+    Here does nothing 
+    but this is where you should desallocate the output pointers if any -->
+
+  <destructor>
+  <PRE>
 
+  </PRE>
+  </destructor>
 
+<!--=======================================================================-->
+<!-- END OF BLACK BOX DESCRIPTION -->
 </blackbox>
 
 
index b02c5509b8e11693f28cc14436b900bcca3bee88..6a8caa0bc5bd76f1b9eca247ac3505b51b965ba5 100644 (file)
@@ -5,6 +5,7 @@
 
   <!--========================================================================
     THE BOX DOCUMENTATION -->
+
   <author>__AUTHOR__</author>
   <description>__DESCRIPTION__</description>
   <category>__CATEGORY__</category>
@@ -21,6 +22,7 @@
     INPUTS/OUTPUTS DECLARATION -->
   <!-- Declares an input with name 'In', type 'double' 
       and description 'First input' -->
+
   <input name="In" type="double" description="First input"/>
   
   <!-- Declares an output with name 'Out', type 'double' 
@@ -40,6 +42,7 @@
       (the one provided in the attribute 'name' of the tag 'input')
     * TYPE is the C++ type of the input/output
       (the one provided in the attribute 'type' of the tag 'input') -->
+
   <process><PRE>
     bbSetOutputOut( bbGetInputIn() );
     std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
     This is also where you should allocate the output pointers -->
   <constructor><PRE>
     bbSetInputIn(0);
-  </PRE></constructor>    
+  </PRE></constructor>
+
   <!-- THE COPY-CONSTRUCTION METHOD BODY :
     Here does nothing 
     But this is where you should allocate the output pointers if any
     and copy the pointed values (to avoid bug caused by multiple references)-->
   <copyconstructor><PRE>
-  </PRE></copyconstructor>    
+  </PRE></copyconstructor>
+
   <!-- THE DESTRUCTION METHOD BODY :
     Here does nothing 
     but this is where you should desallocate the output pointers if any -->
   <destructor><PRE>
-  </PRE></destructor>    
+  </PRE></destructor>
   <!--=====================================================================-->
 
 <!--=======================================================================-->
index 4e321db4dd9a015b9847b6ef4e7f7ba0cd72f85b..ec1d45b2c22babee01becd16cc624846a0a67d49 100644 (file)
@@ -1,11 +1,20 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-
+<!--==========================================================================
+   STARTS THE DESCRIPTION OF THE BLACK BOX -->
 <blackbox name="__BLACKBOXNAME__" widget>
-
+ <!--========================================================================
+    THE BOX DOCUMENTATION -->
   <author>__AUTHOR__</author>
   <description>__DESCRIPTION__</description>
   <category>__CategoryBlackBox__</category>
 
+<!--========================================================================
+    #include directives to be put in the .h generated
+    There must be one tag per file to include -->
+
+ <!--========================================================================
+    INPUTS/OUTPUTS DECLARATION -->
+
   <input name="Title" type="std::string" description="Title prepended to the text"/>
   <input name="In" type="std::string" description="Text"/>
 
    bbSetOutputWidget( new wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
    Process();
   </PRE></createwidget>
+
+ <!--========================================================================
+    PROCESS section -->
+
   <process><PRE>
    std::string msg;
     if (bbGetInputTitle()!="")
       {
        msg = bbGetInputTitle()+": " + bbGetInputIn();
-      }  
-    else 
+      }
+    else
       {
        msg = bbGetInputIn();
       }
    ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) ); 
   </PRE></process>
-  
+
+ <!--======================================================================
+   CONSTRUCTORS / DESTRUCTORS (OPTIONAL) -->
+
   <constructor><PRE> 
     bbSetInputIn("");
     bbSetInputTitle("");
-  </PRE></constructor>    
+  </PRE>
+  </constructor>
+
+</copyconstructor>
+  <!-- THE COPY-CONSTRUCTION METHOD BODY :
+    Here does nothing 
+    But this is where you should allocate the output pointers if any
+    and copy the pointed values (to avoid bug caused by multiple references)-->
+  <copyconstructor>
+  <PRE>
+
+  </PRE>
+  <!-- THE DESTRUCTION METHOD BODY :
+    Here does nothing 
+    but this is where you should desallocate the output pointers if any -->
+
+  <destructor>
+  <PRE>
+
+  </PRE>
+  </destructor>
+
 
 
 </blackbox>
index 0ee3cb18b68cbe454aa5c0e0e74864f0795958ad..41bc8976f5dcd046c70a5fae4a1f7ba6689cd6d7 100644 (file)
@@ -3,8 +3,6 @@ SET(bbc_DATA_REL_PATH_FROM_DATA kernel/bbc)
 # Relative path to the data used by bbc from bin folder
 SET(bbc_DATA_REL_PATH_FROM_BIN ../${BBTK_DATA_REL_PATH}/${bbc_DATA_REL_PATH_FROM_DATA})
 
-
-
 # Build tree 
 SET(bbc_CMAKE_OPTION_FOR_BUILD_TREE "-DBBTK_DIR=${PROJECT_BINARY_DIR}")
 CONFIGURE_FILE(
@@ -32,7 +30,7 @@ ELSE(UNIX)
                ${CMAKE_CURRENT_SOURCE_DIR}/bbc.bat.in
                ${CMAKE_CURRENT_BINARY_DIR}/bbc.bat
                @ONLY IMMEDIATE
-       )    
+       )
        INSTALL(
                PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/bbc.bat
                DESTINATION bin
index d1d8212b4326ff3d41c83773230e3d4e4a4faa70..f3bd451a83ef561a30b9178ee144ce6612012394 100644 (file)
@@ -46,7 +46,7 @@ public:
   bool text_dialog;
 
   std::map<std::string,std::string> param_map;
-  
+
 };
 
 IMPLEMENT_APP(wxBBIApp);
@@ -77,7 +77,7 @@ bool wxBBIApp::OnCmdLineParsed(wxCmdLineParser& parser)
          std::string right = s.substr(pos+1,s.size());
          param_map[left]=right;
        }
-      else 
+      else
        {
          std::cout << "'" << s << "' option unrecognized : ignored"<<std::endl;
        }
@@ -121,12 +121,12 @@ bool wxBBIApp::OnInit( )
     if (text_dialog) mExecuter->SetDialogMode(bbtk::VirtualExec::TextDialog);
 
     EXEC_FUNCTION(mExecuter);
-    
+
     mExecuter->SetNoExecMode(false);
 
-    if (help) 
+    if (help)
       {
-       std::string package; 
+       std::string package;
        mExecuter->GetFactory()->HelpBlackBox("workspace",package,false);
       }
   }
@@ -138,15 +138,15 @@ bool wxBBIApp::OnInit( )
       bbtk::Wx::GetTopWindow()->Close();
       return false;
     }
-  if (help || !bbtk::Wx::IsSomeWindowAlive()) 
-    { 
+  if (help || !bbtk::Wx::IsSomeWindowAlive())
+    {
       return false;
     }
   return true;
 }
 
 
-#if defined(_WIN32) 
+#if defined(_WIN32)
 
 //  How to have a Console and wxWidgets
 //  http://www.wxwidgets.org/wiki/index.php/MSVC_Setup_Guide
@@ -155,11 +155,11 @@ bool wxBBIApp::OnInit( )
 //  you need to use the linker option "/subsystem:console" and the following code:
 int main(int argc, char* argv[])
 {
-  return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 
+  return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(),
                 SW_SHOWNORMAL);
 }
 
-#endif // defined(_WIN32) 
+#endif // defined(_WIN32)
 
 
 #else
@@ -183,7 +183,7 @@ int main(int argc, char* argv[])
     {
       I.CommandLineInterpreter();
     }
-  else 
+  else
     {
       std::string f(argv[1]);
       I.InterpretFile(f);
index ddec705363af1563eb0b4cafb9b178ec06c50189..a682e24c4ecf10c255442ad7bc4a8235d8915e40 100644 (file)
@@ -3,13 +3,13 @@ SET(SOURCES bbs2cpp )
 SET(EXENAME bbs2cpp )
 
 #IF(BBTK_USE_WXWIDGETS AND WIN32)
-#  ADD_EXECUTABLE(${EXENAME} WIN32 ${SOURCES})  
+#  ADD_EXECUTABLE(${EXENAME} WIN32 ${SOURCES})
 #  SET_TARGET_PROPERTIES(${EXENAME} PROPERTIES LINK_FLAGS /subsystem:console )
 #ELSE(BBTK_USE_WXWIDGETS AND WIN32)
-#  ADD_EXECUTABLE(${EXENAME} ${SOURCES})  
+#  ADD_EXECUTABLE(${EXENAME} ${SOURCES})
 #ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
 
-ADD_EXECUTABLE(${EXENAME} ${SOURCES})  
+ADD_EXECUTABLE(${EXENAME} ${SOURCES})
 
 TARGET_LINK_LIBRARIES(${EXENAME} bbtk)
 INSTALL_TARGETS(/bin/ ${EXENAME})
index 0fd3e0c7e6a0a392dfcbc03a6b200174b0afe315..bfddf71fef3a8a12f71276fda4ef9a90efd34f6f 100644 (file)
@@ -23,6 +23,6 @@ int main(int argc, char* argv[])
 
   return 0;
 }
-        
+
 // EOF
 
index de75a2789bc21ec1e1432fcf99805ce200430667..0c6a4287c6ac84ba3ea59888ce5ee98ff1367e02 100644 (file)
@@ -72,8 +72,7 @@ the utility \bbfy will then generate the corresponding \CPP code.
 
 Run \texttt{bbStudio}.
 
-Use the option \texttt{Create Package} of the menu \texttt{Tools}.
-
+You''l get something like in fig. \ref{bb-Studio}
 
 \begin{figure}[!ht]
 \caption{\label{bb-Studio} bbStudio}
@@ -82,6 +81,8 @@ Use the option \texttt{Create Package} of the menu \texttt{Tools}.
 \end{center}
 \end{figure}
 
+Use the option \texttt{Create package} of the menu \texttt{Tools}.
+
 You will be asked to choose the directory where you want to create the package,
 then you'll get something like in fig. \ref{bbCreatePackage}. 
 
@@ -98,7 +99,7 @@ That will creates the directory structure and the \texttt{cmake}
 files necessary to build the project.
 
 You must then decide the name of your new package. 
-It will be the name used to load the package in \texttt{bbi}.
+This name will be used to load the package in \texttt{bbi}.
 Fill up the form like in fig. \ref{bbFillUpPackageForm}.
 
 
@@ -109,7 +110,7 @@ Fill up the form like in fig. \ref{bbFillUpPackageForm}.
 \end{center}
 \end{figure} 
 
-Edit the file 'MyPackage/CMakeLists.txt' to customize your package
+Edit the file \texttt{MyPackage/CMakeLists.txt} to customize your package
 
 
 the file tree obtained is :
@@ -352,9 +353,11 @@ Apart from this choice of the description langage to use,
 there is an important choice to do concerning the implementation of the box. 
 In \CPP, a black box is nothing but a class which has the standard 
 interface of all black boxes : what's its name ? inputs ? outputs ? and so on. 
+
+
 The abstract description of this interface is done in the class 
 \texttt{bbtk::BlackBox} and is implemented in its child classes : 
-\texttt{bbtk::UserBlackBox} and \texttt{bbtk::WxBlackBox} 
+\texttt{bbtk::AtomicBlackBox} and \texttt{bbtk::WxBlackBox} 
 \footnote{all the classes of the \bbtk library are in a \emph{namespace} 
 called \texttt{bbtk} 
 and the \CPP header of a class called \texttt{NameOfAClass} is 
@@ -366,10 +369,12 @@ If your black box is a \emph{Widget} black box,
 that is a black box which has (or is) 
 a piece of a graphical interface based on the \wx library,
 then it must inherit the class \texttt{bbtk::WxBlackBox}. 
-Concretely, a \texttt{bbtk::WxBlackBox} is associated 
+
+Concretely, a \texttt{bbtk::WxBlackBox} is associated to
 a \texttt{wxWindow} and must be able to return a pointer to it. 
-If your black box is not a widget black box, it must inherit 
-\texttt{bbtk::UserBlackBox}.
+If your black box is not a widget black box 
+(that is : doesn't returns a pointer to a \emph{Widget}),
+ it must inherit from \texttt{bbtk::AtomicBlackBox}.
 
 \subsubsection{Inherit or encapsulate ?}
 
@@ -393,7 +398,7 @@ In \CPP, in order to embed an existing processing \emph{class}
 into a standard interface you only have two possibilities :
 \begin{enumerate}
 \item {\bf Inherit} the existing processing class 
-\emph{and} the interface class (e.g. \texttt{bbtk::UserBlackBox}).
+\emph{and} the interface class (e.g. \texttt{bbtk::AtomicBlackBox}).
 In this case you have to :
 \begin{enumerate}
 \item make the link between the inputs and outputs of the black box 
@@ -403,7 +408,7 @@ method of the inherited class in the processing method of the black box.
 \end{enumerate}
 \item {\bf Encapsulate} the existing processing class 
 in a class inherited from 
-the interface class (e.g. \texttt{bbtk::UserBlackBox}).
+the interface class (e.g. \texttt{bbtk::AtomicBlackBox}).
 In this case you have to :
 \begin{enumerate}
 \item declare it as a member of the black box, 
@@ -588,8 +593,8 @@ describing the \texttt{Add} box of the \texttt{std} package :
 
 The tags and their role are easily understandable.
 
-As the box is not a widget, we inherit from 
-\texttt{bbtk::UserBlackBox} (\texttt{parentblackbox} tag).
+As the box is not a widget, we inherit implicitely from 
+\texttt{bbtk::AtomicBlackBox}.
 
 
 The only part of the file which needs a bit of explaination is 
@@ -602,9 +607,9 @@ like the \texttt{<} and \texttt{>} which have a
 special meaning in \xml. 
 In the case of the \texttt{Add} box, the process code 
 is very simple : remember that 
-\texttt{bbGetInputIn1} is the 
+\texttt{bbGetInputIn1()} is the 
 accessor to the input \texttt{In1} declared above and 
-\texttt{bbGetInputIn2} is the 
+\texttt{bbGetInputIn2()} is the 
 accessor to the input \texttt{In2};  
 the code simply adds the values of the two inputs 
 and sets the output \texttt{Out} with the resulting value.
@@ -614,14 +619,14 @@ you must modify the xml file generated in previous step :
 
 \begin{enumerate}
   \item Complete the description and author tags if you feel like.
-  \item add the '\#include' directives to be put in the generated .h file
+  \item add the \texttt{\#include} directives to be put in the generated \texttt{.h} file
   \item Create your inputs and outputs
   \item Fill in the process tag
   \item Fill in the constructor tag
   \item Fill in the copyconstructor tag
   \item Fill in the destructor tag
   \item Pray
-\end{enumerate} 
+\end{enumerate}
 
 
 % ==========================================
@@ -631,11 +636,31 @@ you must modify the xml file generated in previous step :
 % ==========================================
 \subsubsection{Specific \texttt{xml} tags for \texttt{vtkImageAlgorithm} classes bbfication}
 % ==========================================
+\begin{verbatim}
+
+<blackbox name="..." type="VTK\_ImageAlgorithm">
+
+<vtkparent>the vtk ImageAlgorithm class it inherits from</vtkparent>
+<input  name="..."  type="double"        special="vtk parameter" description="..."/>
+<input name="..."   type="vtkImageData*" special="vtk output"    description="..."/>
 
+<output  name="..." type="double"        special="vtk parameter" description="..."/>
+<output name="..."  type="vtkImageData*" special="vtk output"    description="..."/>
+\end{verbatim}
 % ==========================================
 \subsubsection{Specific \texttt{xml} tags for \texttt{vtkPolyDataAlgorithm} classes bbfication}
 % ==========================================
+\begin{verbatim}
+<blackbox name="..." type="VTK\_PolyDataAlgorithm">
+
+<vtkparent>the vtk Polydata class it inherits from</vtkparent>
+<input  name="..."  type="double"       special="vtk parameter" description="..."/>
+<input  name="..."  type="vtkPolyData*" special="vtk output"    description="..."/>
 
+<output  name="..." type="double"       special="vtk parameter" description="..."/>
+<output name="..."  type="vtkPolyData*" special="vtk output"    description="..."/>
+
+\end{verbatim}
 % ==========================================
 \subsubsection{\bbfy \texttt{xml} tags reference}
 % ==========================================
@@ -685,8 +710,9 @@ Use \texttt{bbPACKAGE}, where \texttt{PACKAGE} is the name of the package\\\hlin
 \texttt{<output>} & \texttt{name} & - & 1 &  The name of the output \\\hline 
         & \texttt{type} & - & 1 &  The type of the output \\\hline 
         & \texttt{special} & - & 0-1 & In: \{\texttt{``itk output'', 
-``vtk output''}\} (see below).\\\hline 
-        & \texttt{generic\_type} & c) & 0-1 & The ``generic'' type of the output (see text).\\\hline 
+``vtk output''}\} (see below).\\\hline
+        & \texttt{generic\_type} & c) & 0-1 & The ``generic'' type  of the output (see text).\\\hline  
+        & \texttt{nature} & c) & 0-1 & The ``nature'' of the output (used for automatic GUI generation).\\\hline 
 
 \texttt{<process>} & - & - & 0-1 & The code of the processing method of the box. Must be put between clear tags : \texttt{<PRE></PRE>} \\\hline 
 \texttt{<constructor>} & - & - & 0-1 & The code of the user Constructor of the box (may contains default initialisations). Must be put between clear tags : \texttt{<PRE></PRE>} \\\hline 
@@ -731,7 +757,7 @@ c) & \texttt{<blackbox type == ''itkImageToImageFilter''>} and
  \texttt{example}        & : Example script showing a box use-case      \\ \hline
  \texttt{filter}         & : Image processing box                       \\ \hline
  \texttt{image}          & : Image processing related box               \\ \hline
- \texttt{interaction}    & :  \\ \hline
+ \texttt{interaction}    & :                                            \\ \hline
  \texttt{math}           & : Mathematical operations\\ \hline
  \texttt{mesh}           & : Mesh processing related box \\ \hline
  \texttt{misc}           & : A box that cannot be put in other category ! \\ \hline
@@ -764,6 +790,28 @@ c) & \texttt{<blackbox type == ''itkImageToImageFilter''>} and
 \end{tabular}
 \end{table}
 
+
+% ==========================================
+\begin{table}[!ht]
+\caption{\label{nature}
+\bbfy \texttt{nature}}
+\small
+\begin{tabular}{|ll|}
+\hline
+ \texttt{Nature}     &   : used for    \\ \hline \\ \hline
+ \texttt{file name} & Poping up a File Selector\\ \hline
+ \texttt{directory name} & Poping up a Directory Selector\\ \hline 
+ \texttt{file extension} & \\ \hline  
+ \texttt{colour} & Poping up a Colour Selector\\ \hline 
+ \texttt{pixel type} & \\ \hline 
+ \texttt{image dimension} & \\ \hline
+ \texttt{image index} & \\ \hline 
+ \texttt{image size} & \\ \hline 
+ \texttt{voxel size} & \\ \hline  
+\end{tabular}
+\end{table}
+
 % ==========================================
 \subsection{\CPP description of a box}
 % ==========================================
index fc2f97e91111929e348b1c429dec88a04605fb1f..ad994193aede75471524d29de4ccc60ceb9053cc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxInputOutputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/08 06:59:29 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/07/03 18:20:57 $
+  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
@@ -38,7 +38,7 @@ namespace bbtk
   class BBTK_EXPORT BlackBoxInputOutputDescriptor
   {
   public:
-    /// Ctor with name and description
+    /// Ctor with name, description and naure
     BlackBoxInputOutputDescriptor(TypeInfo creator_type_info,
                                  const std::string& name,
                                  const std::string& description,
index 43ac0e4f6081aa94025cd6ca589073ae15c0629d..c07f0b173ac450d9e2dcf86b29d9effcc2b13f71 100644 (file)
@@ -25,7 +25,7 @@ new InputText author
     set author.In "_author_"
 
 new InputText description
-    set description.Title "Description            (caracters   '<',  '>' not accepted...)"
+    set description.Title "Description    (caracters   '<',  '>' not accepted...)"
     set description.In "_description_"
 
 #---------------------------------------------------------------------
@@ -136,24 +136,24 @@ new ConcatStrings descriptionStr
 new Configuration conf
 
 new ConcatStrings commandStr
-    set                                                commandStr.In1 " "
-    connect ascii.Out                  commandStr.In2
-    connect conf.BinPath               commandStr.In3
+    set                                commandStr.In1 " "
+    connect ascii.Out          commandStr.In2
+    connect conf.BinPath       commandStr.In3
     connect conf.FileSeparator commandStr.In4
-    set                                                commandStr.In5 "bbCreateBlackBox"
-    connect ascii.Out                  commandStr.In6
-    set                                                commandStr.In7 " "
+    set                                commandStr.In5 "bbCreateBlackBox"
+    connect ascii.Out          commandStr.In6
+    set                                commandStr.In7 " "
 
 
 new ConcatStrings concatStr
-    connect  commandStr.Out            concatStr.In1 
+    connect  commandStr.Out                    concatStr.In1 
     connect dirStr.Out                         concatStr.In2 
     connect packageNameStr.Out concatStr.In3 
     connect blackboxNameStr.Out        concatStr.In4
     connect typeStr.Out                                concatStr.In5
     connect formatStr.Out                      concatStr.In6
     connect authorStr.Out                      concatStr.In7
-    connect descriptionStr.Out         concatStr.In8
+    connect descriptionStr.Out                 concatStr.In8
 
 /*
 LG : bug on linux 
index a749f683def0493541d3aefd4550fb2fd836a8de..0faf6f2fd25687f20f1f773e2b4a563fabe1f52b 100644 (file)
 <include>vtkConeSource.h</include> 
 <vtkparent>vtkConeSource</vtkparent>
 
-<output name="Out" type="vtkPolyData*" special="vtk output" description="Output Cone"/>
-<input name="Radius" type="double" special="vtk parameter" description="Cone Radius"/>
-<input name="Resolution" type="int" special="vtk parameter" description="Cone Resolution"/>
-<input name="CenterX" type="double" description="Center X coord"/>
-<input name="CenterY" type="double" description="Center Y coord"/>
-<input name="CenterZ" type="double" description="Center Z coord"/>
+<output name="Out"       type="vtkPolyData*" special="vtk output"    description="Output Cone"/>
+<input name="Radius"     type="double"       special="vtk parameter" description="Cone Radius"/>
+<input name="Resolution" type="int"          special="vtk parameter" description="Cone Resolution"/>
+<input name="CenterX"    type="double" description="Center X coord"/>
+<input name="CenterY"    type="double" description="Center Y coord"/>
+<input name="CenterZ"    type="double" description="Center Z coord"/>
 <input name="DirectionX" type="double" description="X Direction"/>
 <input name="DirectionY" type="double" description="Y Direction"/>
 <input name="DirectionZ" type="double" description="Z Direction"/>
@@ -27,7 +27,7 @@ SetCenter(bbGetInputCenterX(),
           bbGetInputCenterZ());
 
 SetDirection(bbGetInputDirectionX(), 
-          bbGetInputDirectionY(), 
+          bbGetInputDirectionY(),
           bbGetInputDirectionZ());
                     
 SetResolution(bbGetInputResolution());
index c4a35097f4a3e5a9d3d8a0dac34c5674348fba4f..548a128613f934f6f86f30f7c5a7f2ceaeaca3aa 100644 (file)
 
 <vtkparent>vtkImageDilateErode3D</vtkparent>
 
-<input name="In" type="vtkImageData*" special="vtk input" description="Input image"/>
-<output name="Out" type="vtkImageData*" special="vtk output" description="Output image"/>
-<input name="KernelSizeX" type="int" description="Size of the kernel in direction X"/>
-<input name="KernelSizeY" type="int" description="Size of the kernel in direction Y"/>
-<input name="KernelSizeZ" type="int" description="Size of the kernel in direction Z"/>
-<input name="DilateValue" type="double" special="vtk parameter" description="The dilation value"/>
-<input name="ErodeValue" type="double" special="vtk parameter" description="The erosion value"/>
+<input name="In"          type="vtkImageData*" special="vtk input"     description="Input image"/>
+<output name="Out"        type="vtkImageData*" special="vtk output"    description="Output image"/>
+<input name="KernelSizeX" type="int"                                   description="Size of the kernel in direction X"/>
+<input name="KernelSizeY" type="int"                                   description="Size of the kernel in direction Y"/>
+<input name="KernelSizeZ" type="int"                                   description="Size of the kernel in direction Z"/>
+<input name="DilateValue" type="double"        special="vtk parameter" description="The dilation value"/>
+<input name="ErodeValue"  type="double"        special="vtk parameter" description="The erosion value"/>
 
 <process>
 <PRE>
index 1bb734612560a458a5b2d5c21609b40cd750fe1c..c73c88c4e8a1bc6d04360ebcf89e331fce47b09e 100644 (file)
 
 <vtkparent>vtkImageGaussianSmooth</vtkparent>
 
-<input name="In"      type="vtkImageData*" special="vtk input" description="Input image"/>  
+<input name="In"      type="vtkImageData*" special="vtk input"  description="Input image"/>  
 <output name="Out"    type="vtkImageData*" special="vtk output" description="Output image"/>
-<input name="StdDevX" type="double" description="Standard deviation in direction X"/>
-<input name="StdDevY" type="double" description="Standard deviation in direction Y"/>
-<input name="StdDevZ" type="double" description="Standard deviation in direction Z"/>
+<input name="StdDevX" type="double"                             description="Standard deviation in direction X"/>
+<input name="StdDevY" type="double"                             description="Standard deviation in direction Y"/>
+<input name="StdDevZ" type="double"                             description="Standard deviation in direction Z"/>
 
 <process>
 <PRE>
index 38661c6cfa7c4e3993bd0441cc1eaf6aee12b060..e019150ec4926b29c6428d00355beef74f7881b4 100644 (file)
@@ -10,8 +10,8 @@
 <include>vtkImageData.h</include> 
 <vtkparent>vtkMetaImageReader</vtkparent>
 
-<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"/>
+<input  name="In"  type="std::string"   nature="file name"   description="Name of the file to read"/>  
+<output name="Out" type="vtkImageData*" special="vtk output" description="Output image" />
  
  <process><PRE>
    SetFileName(bbGetInputIn().c_str());
index 82bfe638869b47fbd8e5dc67b423d08439341088..8a07f3e599a186b6033845705889e011d8091bf1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxDirectorySelector.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/18 12:59:52 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/07/03 18:20:57 $
+  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
@@ -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,"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_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);
   //=================================================================