]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Mon, 3 Mar 2008 14:55:55 +0000 (14:55 +0000)
committerguigues <guigues>
Mon, 3 Mar 2008 14:55:55 +0000 (14:55 +0000)
kernel/doc/bbtkWebSite/CMakeLists.txt
kernel/doc/bbtkWebSite/make-index.bbs.in
kernel/doc/bbtkWebSite/menu.html
kernel/src/bbtkFactory.cxx
kernel/src/bbtkFactory.h
kernel/src/bbtkInterpreter.cxx
packages/wxvtk/bbs/appli/ExampleDoubleSlicer.bbs [new file with mode: 0644]
packages/wxvtk/bbs/boxes/bbDoubleSlicer.bbs [new file with mode: 0644]

index e60a894f48afee770e747266a477eaf1a01f21a1..77b99620ccfc515320640b7ede6125acf4eabbce 100644 (file)
@@ -21,6 +21,7 @@ ENDFOREACH(page)
 SET(BBTK_INDEX_ALPHA_FILE ${BBTK_BBDOC_BUILD_PATH}/index-alpha.html)
 SET(BBTK_INDEX_PACKAGES_FILE ${BBTK_BBDOC_BUILD_PATH}/index-package.html)
 SET(BBTK_INDEX_CATEGORIES_FILE ${BBTK_BBDOC_BUILD_PATH}/index-category.html)
+SET(BBTK_INDEX_ADAPTORS_FILE ${BBTK_BBDOC_BUILD_PATH}/index-adaptors.html)
 SET(INDEX_OUTPUT 
   ${BBTK_INDEX_ALPHA_FILE} ${BBTK_INDEX_PACKAGES_FILE} 
   ${BBTK_INDEX_CATEGORIES_FILE}
@@ -49,6 +50,7 @@ INSTALL(
 SET(BBTK_INDEX_ALPHA_FILE index-alpha.html)
 SET(BBTK_INDEX_PACKAGES_FILE index-package.html)
 SET(BBTK_INDEX_CATEGORIES_FILE index-category.html)
+SET(BBTK_INDEX_ADAPTORS_FILE index-adaptors.html)
 CONFIGURE_FILE(
   ${CMAKE_CURRENT_SOURCE_DIR}/make-index.bbs.in
   ${BBTK_BBDOC_BUILD_PATH}/make-index.bbs
index 20abbaf7504975c7bfa127d6bcdae97d371ccebb..3f71e949b49593122b024621b14dbf9a99b082f7 100644 (file)
@@ -3,3 +3,4 @@ include *
 index @BBTK_INDEX_ALPHA_FILE@ Initials
 index @BBTK_INDEX_PACKAGES_FILE@ Packages
 index @BBTK_INDEX_CATEGORIES_FILE@ Categories
+index @BBTK_INDEX_ADAPTORS_FILE@ Adaptors
index 8391c790f0b609bc17b2fc6f903580f11cb7e9cd..d9cf149958abb472ee121cf0857011461f0b6ed1 100644 (file)
@@ -50,7 +50,9 @@ Reference (pdf)<br>
 package</a><br>
 
 <a target="information" href="../bbdoc/index-category.html">List by
-category</a></font><br>
+category</a><br>
+
+<a target="information" href="../bbdoc/index-adaptors.html">List of adaptors</a></font><br>
 
 <ul>
 </ul>
index 0d76d0fa40d8b2dcc3b217c4e8df412c0fd99348..bdcde1fc42f876b2e719346661c23895db8a103b 100644 (file)
@@ -4,8 +4,8 @@ Program:   bbtk
 Module:    $RCSfile: bbtkFactory.cxx,v $
 Language:  C++
 
-Date:      $Date: 2008/03/03 08:06:36 $
-Version:   $Revision: 1.24 $
+Date:      $Date: 2008/03/03 14:55:55 $
+Version:   $Revision: 1.25 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -914,6 +914,16 @@ namespace bbtk
             ++j)
          {
            
+           // Skip adaptors 
+           if ( type==Adaptors )
+             {  
+               if (j->second->GetKind() == BlackBoxDescriptor::STANDARD )
+                 continue;
+             }
+           else 
+             if (j->second->GetKind() != BlackBoxDescriptor::STANDARD )
+               continue;
+
            std::vector<std::string> keys;
            if (type==Packages)
              {
@@ -922,7 +932,7 @@ namespace bbtk
                keys.push_back(k);
                title = "Boxes by package";
              }
-           else if (type==Initials)
+           else if ((type==Initials) || (type==Adaptors))
              {
                std::string init(" ");
                init[0] =  std::toupper(j->second->GetTypeName()[0]);
@@ -939,6 +949,7 @@ namespace bbtk
                  keys.push_back(" NONE");
                title = "Boxes by category";
              }
+    
            
            std::vector<std::string>::const_iterator k;
            for (k=keys.begin(); k!=keys.end(); ++k )
index 8cf02be971c5e34d4c4c631440b0bcf5c5388d17..35c04e6e3e42e21f812502ccba739f8d27e325a2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkFactory.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/03 08:06:36 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/03/03 14:55:55 $
+  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
@@ -76,7 +76,8 @@ namespace bbtk
       {
        Packages,
        Categories,
-       Initials
+       Initials,
+       Adaptors
       }
       IndexEntryType;
     void CreateHtmlIndex(IndexEntryType type, const std::string& filename);
index d563f1989422be408919d81226e9280d42c23d6c..28dbfe43798c7b94b7c46668c8df21f3035bdc79 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/03 11:43:52 $
-  Version:   $Revision: 1.38 $
+  Date:      $Date: 2008/03/03 14:55:55 $
+  Version:   $Revision: 1.39 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -172,8 +172,8 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
     info.argmax = 2;
     info.code = cIndex;
 
-    info.syntax = "index [<filename> ['Initials'(default)|'Packages'|'Categories']]";
-    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";
+    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;
 
     info.category = "reset";  //EED
@@ -1579,6 +1579,7 @@ void  Interpreter::Index(const std::string& filename,
   if (type=="Initials") t = Factory::Initials;
   else if (type=="Categories") t = Factory::Categories;
   else if (type=="Packages") t = Factory::Packages;
+  else if (type=="Adaptors") t = Factory::Adaptors;
   
   GetGlobalFactory()->CreateHtmlIndex(t,filename);
 }
diff --git a/packages/wxvtk/bbs/appli/ExampleDoubleSlicer.bbs b/packages/wxvtk/bbs/appli/ExampleDoubleSlicer.bbs
new file mode 100644 (file)
index 0000000..f76f3ca
--- /dev/null
@@ -0,0 +1,22 @@
+description "Demo of the box <a href=#DoubleSlicer>DoubleSlicer</a>."
+author "laurent.guigues at creatis.insa-lyon.fr"
+category "example"     
+
+include vtk/boxes/bbLoadHola
+include wxvtk/boxes/bbDoubleSlicer
+
+new LoadHola image1
+new LoadHola image2
+new DoubleSlicer viewer 
+load itkvtk 
+connect image1.Out viewer.In1
+connect image2.Out viewer.In2
+
+load std 
+set viewer.WinTitle "ExampleDoubleSlicer" 
+set viewer.WinWidth 600 
+set viewer.WinHeight 400 
+set viewer.Orientation 0 
+
+exec viewer 
+
diff --git a/packages/wxvtk/bbs/boxes/bbDoubleSlicer.bbs b/packages/wxvtk/bbs/boxes/bbDoubleSlicer.bbs
new file mode 100644 (file)
index 0000000..d1839f6
--- /dev/null
@@ -0,0 +1,57 @@
+load std 
+load wx
+load wxvtk 
+
+define DoubleSlicer
+
+ description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#DemoDoubleSlicer'>DemoDoubleSlicer.bbs</a>. Screenshot : <center><img src='DemoDoubleSlicer.png'></center>"
+ author "laurent.guigues at creatis.insa-lyon.fr"
+
+ new LayoutLine main
+ new LayoutLine slicers
+ new Viewer2D slicer1
+ new Viewer2D slicer2
+ new Slider slider
+
+ connect slicers.Widget main.Widget1
+ connect slicer1.Widget slicers.Widget1
+ connect slicer2.Widget slicers.Widget2
+ connect slider.Widget main.Widget2
+ connect slider.Out slicer1.Slice
+ connect slider.Out slicer2.Slice
+
+
+ # WE NEED A MultipleInputs BOX TO CONNECT BOTH 
+ # slider.BoxChange AND THE INPUT BoxExecuteSlicer1
+ # OF THE COMPLEX BOX TO slicer1.BoxExecute
+ # idem for slicer2
+ new MultipleInputs refresh1
+ new MultipleInputs refresh2
+ connect refresh1.Out slicer1.BoxExecute
+ connect refresh2.Out slicer2.BoxExecute
+
+ connect slider.BoxChange refresh2.In1
+ connect slider.BoxChange refresh1.In1
+
+# set main.Proportion 80
+ set slider.Title "Slice"
+
+ input In1 slicer1.In "Left (or top) image"
+ input In2 slicer2.In "Right (or bottom) image"
+
+ input WinTitle main.WinTitle "Title of the window"
+ input WinWidth main.WinWidth "Width of the window"
+ input WinHeight main.WinHeight "Width of the window"
+ input Orientation slicers.Orientation "Orientation of the images (0=Horizontal / 1=Vertical)"
+ input RefreshSlicer1 refresh1.In2 "Refreshes the first slicer"
+ input RefreshSlicer2 refresh2.In2 "Refreshes the second slicer"
+ input BoxProcessModeSlicer1 slicer1.BoxProcessMode "Process mode of the first slicer"
+ input BoxProcessModeSlicer2 slicer2.BoxProcessMode "Process mode of the second slicer"
+
+ output Widget main.Widget "Widget"
+
+# exec slicer1
+ exec main
+
+endefine
+