]> Creatis software - bbtk.git/commitdiff
#2841 BBTK Bug New Normal - bbpConfigurator Cleaning string package:boxname ->...
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Sat, 20 Feb 2016 23:53:50 +0000 (00:53 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Sat, 20 Feb 2016 23:53:50 +0000 (00:53 +0100)
kernel/appli/bbpConfigurator/bbpConfigurator.cpp
packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg
packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs
packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg
packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs
packages/vtk/src/bbvtkImageVtkProperties.cxx
packages/wx/src/bbwxColourSelectorButton.cxx
packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg
packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs

index fdabc26ed99cb56165e7c89f98c9e556baabac82..4de87c8161b0cf4d3611f2f4752842e1eb65b256 100644 (file)
@@ -106,15 +106,46 @@ int main(int argc, char **argv)
   BoxesVector boxs;
 
 
   BoxesVector boxs;
 
 
-  for (int i = 0; i < (int)files.size(); ++i) {
+  for (int i = 0; i < (int)files.size(); ++i) 
+  {
     bbtk::BBPInterpreter::Pointer I = bbtk::BBPInterpreter::New();
     I->InterpretFile(files[i].string());
     bbtk::BBPInterpreter::Pointer I = bbtk::BBPInterpreter::New();
     I->InterpretFile(files[i].string());
+
+
     boxs.push_back( ((bbtk::BBPInterpreter*)(I.get()))->boxName );
     boxs.push_back( ((bbtk::BBPInterpreter*)(I.get()))->boxName );
-    deps.push_back( ((bbtk::BBPInterpreter*)(I.get()))->dependencies );
 
 
-    //print box name and dependencies
+// EED 2016/02/19
+//    deps.push_back( ((bbtk::BBPInterpreter*)(I.get()))->dependencies );
+ //-->  Cleanning string package:boxname -> boxname
+    std::set<std::string> tmpDependencies1=  ((bbtk::BBPInterpreter*)(I.get()))->dependencies  ;
+    std::set<std::string> tmpDependencies2;
+    std::set<std::string>::const_iterator sit(tmpDependencies1.begin()), send(tmpDependencies1.end()); 
+       int pos;
+       std::string tmpStr;
 //    std::cout << ((bbtk::BBPInterpreter*)(I.get()))->boxName << ": ";
 //    std::cout << ((bbtk::BBPInterpreter*)(I.get()))->boxName << ": ";
-//    for(
+    for(;sit!=send;++sit)
+    { 
+               pos=(*sit).find(":");   
+               if (pos== std::string::npos ) 
+               { 
+                       tmpDependencies2.insert( *sit );
+//                     std::cout << *sit << ' ';
+               } else {
+                       tmpStr=(*sit).substr(pos+1);
+                       tmpDependencies2.insert( tmpStr );
+//                     std::cout << tmpStr << ' ';
+               } // if
+
+    } // for
+//    std::cout << std::endl;
+    deps.push_back( tmpDependencies2 );
+ //<--
+
+
+
+//    //print box name and dependencies  OLD VERSION
+//    std::cout << ((bbtk::BBPInterpreter*)(I.get()))->boxName << ": ";
+//   for(
 //      Dependencies::iterator it = ((bbtk::BBPInterpreter*)(I.get()))->dependencies.begin();
 //      it != ((bbtk::BBPInterpreter*)(I.get()))->dependencies.end();
 //      it++) {
 //      Dependencies::iterator it = ((bbtk::BBPInterpreter*)(I.get()))->dependencies.begin();
 //      it != ((bbtk::BBPInterpreter*)(I.get()))->dependencies.end();
 //      it++) {
@@ -122,22 +153,21 @@ int main(int argc, char **argv)
 //    }
 //    std::cout << std::endl;
 
 //    }
 //    std::cout << std::endl;
 
-  }
+  } // for i
 
   // Only keep dependencies from package
   Dependencies boxNamesSet(boxs.begin(), boxs.end());
 
 
   // Only keep dependencies from package
   Dependencies boxNamesSet(boxs.begin(), boxs.end());
 
-  //std::cout << "after: " << std::endl;
-  for (DependenciesVector::iterator it = deps.begin(); it != deps.end(); it++) {
+//std::cout << "after: " << std::endl;
+  for (DependenciesVector::iterator it = deps.begin(); it != deps.end(); it++) 
+  {
     BoxesVector tmp;
     std::set_intersection(it->begin(), it->end(), boxNamesSet.begin(), boxNamesSet.end(),std::back_inserter(tmp));
     Dependencies tmp1(tmp.begin(),tmp.end());
     it->swap( tmp1 );
     BoxesVector tmp;
     std::set_intersection(it->begin(), it->end(), boxNamesSet.begin(), boxNamesSet.end(),std::back_inserter(tmp));
     Dependencies tmp1(tmp.begin(),tmp.end());
     it->swap( tmp1 );
-    //print clean dependencies
-//    for(
-//      Dependencies::iterator it1 = it->begin();
-//      it1 != it->end();
-//      it1++) {
+//    //print clean dependencies
+//    for( Dependencies::iterator it1 = it->begin();  it1 != it->end(); it1++) 
+//    {
 //      std::cout << *it1 << ", ";
 //    }
 //    std::cout << std::endl;
 //      std::cout << *it1 << ", ";
 //    }
 //    std::cout << std::endl;
@@ -210,7 +240,9 @@ int main(int argc, char **argv)
     // find max priority level
     int mx_priority = 0;
     for (int i = 0; i < (int)priorities.size(); i++)
     // find max priority level
     int mx_priority = 0;
     for (int i = 0; i < (int)priorities.size(); i++)
+    {
       mx_priority = std::max(mx_priority, priorities[i]);
       mx_priority = std::max(mx_priority, priorities[i]);
+    }
 
     // for each priority level print scripts in that level.
     for (int i = 0; i <= mx_priority; i++)
 
     // for each priority level print scripts in that level.
     for (int i = 0; i <= mx_priority; i++)
index b9251f04f486c134e3cf07541ecb5c2eaa20cad1..59c4792993ffe649b83fa1077d7b73e9fbe38ac0 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg
+# - /tmpEED/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbg
 # ----------------------------------
 
 APP_START
 # ----------------------------------
 
 APP_START
@@ -35,16 +35,20 @@ COMPLEX_PORT
 TypeName
 88.917806:-71.094563:-900.000000
 FIN_COMPLEX_PORT
 TypeName
 88.917806:-71.094563:-900.000000
 FIN_COMPLEX_PORT
-COMPLEXINPUTS:2
+COMPLEXINPUTS:3
 COMPLEX_PORT
 in
 COMPLEX_PORT
 in
-34.967521:145.605564:-900.000000
+20.217710:145.236819:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 FileName
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 FileName
-102.519294:151.601731:-900.000000
+105.100511:147.914278:-900.000000
 FIN_COMPLEX_PORT
 FIN_COMPLEX_PORT
-BOXES:9
+COMPLEX_PORT
+boxExecute
+-92.186317:150.079323:-900.000000
+FIN_COMPLEX_PORT
+BOXES:10
 BOX
 wx:OutputText:Box02
 ISEXEC:FALSE
 BOX
 wx:OutputText:Box02
 ISEXEC:FALSE
@@ -56,8 +60,8 @@ FIN_BOX
 BOX
 wx:OutputText:Box17
 ISEXEC:FALSE
 BOX
 wx:OutputText:Box17
 ISEXEC:FALSE
--80.770416:34.681383:-900.000000
--35.195416:24.681383:-900.000000
+-81.960343:34.681383:-900.000000
+-36.385343:24.681383:-900.000000
 PORT
 Title:"Size"
 FIN_BOX
 PORT
 Title:"Size"
 FIN_BOX
@@ -72,24 +76,24 @@ FIN_BOX
 BOX
 wx:OutputText:Box22
 ISEXEC:FALSE
 BOX
 wx:OutputText:Box22
 ISEXEC:FALSE
--35.332320:1.230494:-900.000000
-10.242680:-8.769506:-900.000000
+-33.844911:1.230494:-900.000000
+11.730089:-8.769506:-900.000000
 PORT
 Title:"TypeName"
 FIN_BOX
 BOX
 wx:OutputText:Box26
 ISEXEC:FALSE
 PORT
 Title:"TypeName"
 FIN_BOX
 BOX
 wx:OutputText:Box26
 ISEXEC:FALSE
--131.615626:26.628991:-900.000000
--86.040626:16.628991:-900.000000
+-128.670557:28.919600:-900.000000
+-83.095557:18.919600:-900.000000
 PORT
 Title:"Min Max"
 FIN_BOX
 BOX
 vtk:ImageVtkProperties:Box09
 ISEXEC:FALSE
 PORT
 Title:"Min Max"
 FIN_BOX
 BOX
 vtk:ImageVtkProperties:Box09
 ISEXEC:FALSE
-33.571051:113.198814:-900.000000
-79.146051:103.198814:-900.000000
+14.396297:109.880107:-900.000000
+59.971297:99.880107:-900.000000
 FIN_BOX
 BOX
 wx:OutputText:Box10
 FIN_BOX
 BOX
 wx:OutputText:Box10
@@ -115,7 +119,13 @@ ISEXEC:FALSE
 PORT
 Title:"Name"
 FIN_BOX
 PORT
 Title:"Name"
 FIN_BOX
-CONNECTIONS:21
+BOX
+std:MagicBox:Box14
+ISEXEC:FALSE
+-98.823731:125.742136:-900.000000
+-53.248731:115.742136:-900.000000
+FIN_BOX
+CONNECTIONS:30
 CONNECTION
 Box09:Components:Box10:In
 NumberOfControlPoints:0
 CONNECTION
 Box09:Components:Box10:In
 NumberOfControlPoints:0
@@ -179,4 +189,31 @@ NumberOfControlPoints:0
 CONNECTION
 Box13:Widget:Box11:Widget7
 NumberOfControlPoints:0
 CONNECTION
 Box13:Widget:Box11:Widget7
 NumberOfControlPoints:0
+CONNECTION
+boxExecute:boxExecute:Box14:In
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box10:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box02:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box17:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box20:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box22:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box13:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:BoxChange:Box09:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box14:Out:Box26:BoxExecute
+NumberOfControlPoints:0
 APP_END
 APP_END
index 5272b3b4761f58735f769c5270f9fadabb7a542e..00c5bd36854ae3cdb83d87e43f43ddcfa1b5989a 100644 (file)
@@ -1,12 +1,13 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs
+# - /tmpEED/creaTools/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/imageVtkPropertiesWidget.bbs
 # ----------------------------------
 
 include std
 include itkvtk
 include wx
 include vtk
 # ----------------------------------
 
 include std
 include itkvtk
 include wx
 include vtk
+include std
 
 define ImageVtkPropertiesWidget toolsbbtk
 
 
 define ImageVtkPropertiesWidget toolsbbtk
 
@@ -15,32 +16,34 @@ description "Description ??"
 
 category "<VOID>"
 
 
 category "<VOID>"
 
-new OutputText Box02
+new wx:OutputText Box02
   set Box02.Title "Dimensions"
 
   set Box02.Title "Dimensions"
 
-new OutputText Box17
+new wx:OutputText Box17
   set Box17.Title "Size"
 
   set Box17.Title "Size"
 
-new OutputText Box20
+new wx:OutputText Box20
   set Box20.Title "Spacing"
 
   set Box20.Title "Spacing"
 
-new OutputText Box22
+new wx:OutputText Box22
   set Box22.Title "TypeName"
 
   set Box22.Title "TypeName"
 
-new OutputText Box26
+new wx:OutputText Box26
   set Box26.Title "Min Max"
 
   set Box26.Title "Min Max"
 
-new ImageVtkProperties Box09
+new vtk:ImageVtkProperties Box09
 
 
-new OutputText Box10
+new wx:OutputText Box10
   set Box10.Title "Components"
 
   set Box10.Title "Components"
 
-new LayoutLine Box11
+new wx:LayoutLine Box11
   set Box11.WinTitle "Image properties"
 
   set Box11.WinTitle "Image properties"
 
-new OutputText Box13
+new wx:OutputText Box13
   set Box13.Title "Name"
 
   set Box13.Title "Name"
 
+new std:MagicBox Box14
+
 
 connect Box09.Components Box10.In
 connect Box09.MinMax Box26.In
 
 connect Box09.Components Box10.In
 connect Box09.MinMax Box26.In
@@ -55,10 +58,19 @@ connect Box22.Widget Box11.Widget5
 connect Box26.Widget Box11.Widget6
 connect Box09.Dimension Box02.In
 connect Box13.Widget Box11.Widget7
 connect Box26.Widget Box11.Widget6
 connect Box09.Dimension Box02.In
 connect Box13.Widget Box11.Widget7
+connect Box14.Out Box10.BoxExecute
+connect Box14.Out Box02.BoxExecute
+connect Box14.Out Box17.BoxExecute
+connect Box14.Out Box20.BoxExecute
+connect Box14.Out Box22.BoxExecute
+connect Box14.Out Box13.BoxExecute
+connect Box14.BoxChange Box09.BoxExecute
+connect Box14.Out Box26.BoxExecute
 
 # Complex input ports
 input in Box09.In " "
 input FileName Box13.In " "
 
 # Complex input ports
 input in Box09.In " "
 input FileName Box13.In " "
+input boxExecute Box14.In " "
 
 # Complex output ports
 output widget Box11.Widget " "
 
 # Complex output ports
 output widget Box11.Widget " "
@@ -68,5 +80,6 @@ output Size Box09.Size " "
 output Spacing Box09.Spacing " "
 output TypeName Box09.TypeName " "
 
 output Spacing Box09.Spacing " "
 output TypeName Box09.TypeName " "
 
+message    
 
 endefine
 
 endefine
index a81e328266941b0dade0b661f0f79ef38f2e4cee..a10d53f1d7c323f8f0988910f409af2acecb2331 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/vtk/boxes/bbIsoSurfaceExtractor.bbg
+# - /tmpEED/creaTools/creatools_source/bbtk/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbg
 # ----------------------------------
 
 APP_START
 # ----------------------------------
 
 APP_START
@@ -42,30 +42,30 @@ Transform
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 BoxExecute
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 BoxExecute
--19.682203:99.666647:-900.000000
+-19.682203:95.133203:-900.000000
 FIN_COMPLEX_PORT
 BOXES:3
 BOX
 vtk:MarchingCubes:mc
 ISEXEC:FALSE
 FIN_COMPLEX_PORT
 BOXES:3
 BOX
 vtk:MarchingCubes:mc
 ISEXEC:FALSE
--13.834130:38.831538:-900.000000
-31.740870:28.831538:-900.000000
+11.855384:37.572248:-900.000000
+57.430384:27.572248:-900.000000
 FIN_BOX
 BOX
 vtk:PolyDataToActor:polydatatoactor
 ISEXEC:FALSE
 FIN_BOX
 BOX
 vtk:PolyDataToActor:polydatatoactor
 ISEXEC:FALSE
--99.833324:8.498185:-900.000000
--28.658324:-1.501815:-900.000000
+-89.255289:4.468457:-900.000000
+-18.080289:-5.531543:-900.000000
 FIN_BOX
 BOX
 std:MultipleInputs:Box03
 ISEXEC:FALSE
 FIN_BOX
 BOX
 std:MultipleInputs:Box03
 ISEXEC:FALSE
--27.966362:71.986554:-900.000000
-17.608638:61.986554:-900.000000
+-40.307403:60.149229:-900.000000
+5.267597:50.149229:-900.000000
 PORT
 BoxProcessMode:"reactive"
 FIN_BOX
 PORT
 BoxProcessMode:"reactive"
 FIN_BOX
-CONNECTIONS:11
+CONNECTIONS:10
 CONNECTION
 mc:Out:polydatatoactor:In
 NumberOfControlPoints:0
 CONNECTION
 mc:Out:polydatatoactor:In
 NumberOfControlPoints:0
@@ -94,9 +94,6 @@ CONNECTION
 BoxExecute:BoxExecute:Box03:In1
 NumberOfControlPoints:0
 CONNECTION
 BoxExecute:BoxExecute:Box03:In1
 NumberOfControlPoints:0
 CONNECTION
-Box03:Out:polydatatoactor:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
-Box03:Out:mc:BoxExecute
+Box03:BoxChange:polydatatoactor:BoxExecute
 NumberOfControlPoints:0
 APP_END
 NumberOfControlPoints:0
 APP_END
index 48d3ab6159a47decdd8de8b04b2160d6595d46b3..0a0add3670d6a01ae6c466bb78b65496d20ab464 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/vtk/boxes/bbIsoSurfaceExtractor.bbs
+# - /tmpEED/creaTools/creatools_source/bbtk/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs
 # ----------------------------------
 
 include std
 # ----------------------------------
 
 include std
@@ -15,17 +15,16 @@ description "Extracts an iso-surface of a 3D image and creates a vtkProp3D objec
 
 category "3D object creator"
 
 
 category "3D object creator"
 
-new MarchingCubes mc
+new vtk:MarchingCubes mc
 
 
-new PolyDataToActor polydatatoactor
+new vtk:PolyDataToActor polydatatoactor
 
 
-new MultipleInputs Box03
+new std:MultipleInputs Box03
   set Box03.BoxProcessMode "reactive"
 
 
 connect mc.Out polydatatoactor.In
   set Box03.BoxProcessMode "reactive"
 
 
 connect mc.Out polydatatoactor.In
-connect Box03.Out polydatatoactor.BoxExecute
-connect Box03.Out mc.BoxExecute
+connect Box03.BoxChange polydatatoactor.BoxExecute
 
 # Complex input ports
 input In mc.In " "
 
 # Complex input ports
 input In mc.In " "
@@ -39,5 +38,6 @@ input BoxExecute Box03.In1 " "
 # Complex output ports
 output Out polydatatoactor.Out " "
 
 # Complex output ports
 output Out polydatatoactor.Out " "
 
+message    
 
 endefine
 
 endefine
index 9a8b563f68715fd7f628bbe54022e039e467d15e..f9d8b7d1c958362386a3b0471ae5ed9537e621a1 100644 (file)
@@ -50,7 +50,9 @@ void ImageVtkProperties::Process()
        std::vector<float> vspacing;
        std::vector<float> vrange;
 
        std::vector<float> vspacing;
        std::vector<float> vrange;
 
-       if ( bbGetInputIn() ){
+       if ( bbGetInputIn() )
+       {
+               bbGetInputIn()->Modified();
                bbGetInputIn()->Update();
                
                bbGetInputIn()->GetWholeExtent(ext);
                bbGetInputIn()->Update();
                
                bbGetInputIn()->GetWholeExtent(ext);
@@ -68,23 +70,25 @@ void ImageVtkProperties::Process()
        
                bbGetInputIn()->GetSpacing(spc);
                for (unsigned int i=0;i<dim;++i) 
        
                bbGetInputIn()->GetSpacing(spc);
                for (unsigned int i=0;i<dim;++i) 
+               {
                        vspacing.push_back((float)spc[i]);
                        vspacing.push_back((float)spc[i]);
+               }
 
                vrange.push_back((float)range[0]);
                vrange.push_back((float)range[1]);
 
 
                vrange.push_back((float)range[0]);
                vrange.push_back((float)range[1]);
 
-               if (bbGetInputIn()->GetScalarType()==VTK_BIT)                   nametype="VTK_BIT";             // 1
-               if (bbGetInputIn()->GetScalarType()==VTK_CHAR)                  nametype="VTK_CHAR";            // 2
+               if (bbGetInputIn()->GetScalarType()==VTK_BIT)                           nametype="VTK_BIT";                     // 1
+               if (bbGetInputIn()->GetScalarType()==VTK_CHAR)                          nametype="VTK_CHAR";                    // 2
                if (bbGetInputIn()->GetScalarType()==VTK_SIGNED_CHAR)           nametype="VTK_SIGNED_CHAR";     // 15
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_CHAR)         nametype="VTK_UNSIGNED_CHAR";   // 3
                if (bbGetInputIn()->GetScalarType()==VTK_SIGNED_CHAR)           nametype="VTK_SIGNED_CHAR";     // 15
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_CHAR)         nametype="VTK_UNSIGNED_CHAR";   // 3
-               if (bbGetInputIn()->GetScalarType()==VTK_SHORT)                 nametype="VTK_SHORT";           // 4
+               if (bbGetInputIn()->GetScalarType()==VTK_SHORT)                         nametype="VTK_SHORT";                   // 4
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_SHORT)        nametype="VTK_UNSIGNED_SHORT";  // 5
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_SHORT)        nametype="VTK_UNSIGNED_SHORT";  // 5
-               if (bbGetInputIn()->GetScalarType()==VTK_INT)                   nametype="VTK_INT";             // 6
+               if (bbGetInputIn()->GetScalarType()==VTK_INT)                           nametype="VTK_INT";             // 6
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_INT)          nametype="VTK_UNSIGNED_INT";    // 7
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_INT)          nametype="VTK_UNSIGNED_INT";    // 7
-               if (bbGetInputIn()->GetScalarType()==VTK_LONG)                  nametype="VTK_LONG";            // 8  
+               if (bbGetInputIn()->GetScalarType()==VTK_LONG)                          nametype="VTK_LONG";            // 8  
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_LONG)         nametype="VTK_UNSIGNED_LONG";   // 9
                if (bbGetInputIn()->GetScalarType()==VTK_UNSIGNED_LONG)         nametype="VTK_UNSIGNED_LONG";   // 9
-               if (bbGetInputIn()->GetScalarType()==VTK_FLOAT)                 nametype="VTK_FLOAT";           // 10
-               if (bbGetInputIn()->GetScalarType()==VTK_DOUBLE)                nametype="VTK_DOUBLE";          // 11
+               if (bbGetInputIn()->GetScalarType()==VTK_FLOAT)                         nametype="VTK_FLOAT";           // 10
+               if (bbGetInputIn()->GetScalarType()==VTK_DOUBLE)                        nametype="VTK_DOUBLE";          // 11
        } else {        
                dim                                     = 0;            
                numberoOfComponents     = 0;
        } else {        
                dim                                     = 0;            
                numberoOfComponents     = 0;
index e0c22782e32490e69986645ee7a53ec9220bee25..df4ed6eebca98b56c84bfed73cadb9bb3c9679e3 100644 (file)
@@ -164,6 +164,7 @@ void wxColourPickerCtrlWidget::UpdateBox()
 
   void ColourSelectorButton::Process() 
   { 
 
   void ColourSelectorButton::Process() 
   { 
+/*
   // The widget may not be created : have to test it before using it
     wxColourPickerCtrlWidget* w = ( wxColourPickerCtrlWidget* )bbGetOutputWidget();
     if (w) 
   // The widget may not be created : have to test it before using it
     wxColourPickerCtrlWidget* w = ( wxColourPickerCtrlWidget* )bbGetOutputWidget();
     if (w) 
@@ -176,6 +177,8 @@ void wxColourPickerCtrlWidget::UpdateBox()
       // to the input (which may have changed if the user set it)
        bbSetOutputOut(bbGetInputIn());
       }
       // to the input (which may have changed if the user set it)
        bbSetOutputOut(bbGetInputIn());
       }
+*/
+
   }
 
 
   }
 
 
@@ -199,6 +202,7 @@ void wxColourPickerCtrlWidget::UpdateBox()
                                                                cr , cg , cb );    
     
     bbSetOutputWidget( w );
                                                                cr , cg , cb );    
     
     bbSetOutputWidget( w );
+    bbSetOutputOut(bbGetInputIn());
   }
 
 
   }
 
 
index a79e53b50af6540a27443b748c34a713997ce110..c353d2f9c9317327b823c09251508447683c2b4e 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBG BlackBox Diagram file
-# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/wxvtk/boxes/bbIsoSurfaceWidget.bbg
+# - /tmpEED/creaTools/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg
 # ----------------------------------
 
 APP_START
 # ----------------------------------
 
 APP_START
@@ -70,16 +70,16 @@ PORT
 Orientation:"HORIZONTAL"
 FIN_BOX
 BOX
 Orientation:"HORIZONTAL"
 FIN_BOX
 BOX
-vtk:IsoSurfaceExtractor:surface
+vtk:IsoSurfaceExtractor:Asurface
 ISEXEC:FALSE
 ISEXEC:FALSE
-36.840302:-236.896173:-900.000000
-108.015302:-246.896173:-900.000000
+43.917303:-225.853762:-900.000000
+115.092303:-235.853762:-900.000000
 FIN_BOX
 BOX
 wx:Slider:isovalue
 ISEXEC:FALSE
 FIN_BOX
 BOX
 wx:Slider:isovalue
 ISEXEC:FALSE
-97.623363:33.580835:-900.000000
-149.023363:23.580835:-900.000000
+98.069545:33.134653:-900.000000
+149.469545:23.134653:-900.000000
 PORT
 ChangeResolution:"true"
 PORT
 PORT
 ChangeResolution:"true"
 PORT
@@ -106,8 +106,8 @@ FIN_BOX
 BOX
 wx:ColourSelectorButton:colour
 ISEXEC:FALSE
 BOX
 wx:ColourSelectorButton:colour
 ISEXEC:FALSE
-10.003991:41.822344:-900.000000
-81.178991:31.822344:-900.000000
+5.737517:35.117885:-900.000000
+76.912517:25.117885:-900.000000
 FIN_BOX
 BOX
 std:MultipleInputs:refresh
 FIN_BOX
 BOX
 std:MultipleInputs:refresh
@@ -116,18 +116,18 @@ ISEXEC:FALSE
 -47.043071:-114.029679:-900.000000
 FIN_BOX
 BOX
 -47.043071:-114.029679:-900.000000
 FIN_BOX
 BOX
-std:Div:div
+std:Div:Adiv
 ISEXEC:FALSE
 ISEXEC:FALSE
-0.000000:-110.000000:-900.000000
-26.375000:-120.000000:-900.000000
+1.523741:-151.750497:-900.000000
+34.298741:-161.750497:-900.000000
 PORT
 In2:"100"
 FIN_BOX
 BOX
 vtk:UpdateRender:Box08
 ISEXEC:FALSE
 PORT
 In2:"100"
 FIN_BOX
 BOX
 vtk:UpdateRender:Box08
 ISEXEC:FALSE
--7.502993:-172.858283:-900.000000
-38.072007:-182.858283:-900.000000
+-38.587305:-230.303310:-900.000000
+6.987695:-240.303310:-900.000000
 PORT
 Active:"true"
 FIN_BOX
 PORT
 Active:"true"
 FIN_BOX
@@ -137,18 +137,18 @@ ISEXEC:FALSE
 170.465036:-148.550905:-900.000000
 216.040036:-158.550905:-900.000000
 FIN_BOX
 170.465036:-148.550905:-900.000000
 216.040036:-158.550905:-900.000000
 FIN_BOX
-CONNECTIONS:27
+CONNECTIONS:28
 CONNECTION
 CONNECTION
-isovalue:Out:surface:Isovalue
+isovalue:Out:Asurface:Isovalue
 NumberOfControlPoints:0
 CONNECTION
 NumberOfControlPoints:0
 CONNECTION
-opacity:Out:div:In1
+opacity:Out:Adiv:In1
 NumberOfControlPoints:0
 CONNECTION
 NumberOfControlPoints:0
 CONNECTION
-div:Out:surface:Opacity
+Adiv:Out:Asurface:Opacity
 NumberOfControlPoints:0
 CONNECTION
 NumberOfControlPoints:0
 CONNECTION
-colour:Out:surface:Colour
+colour:Out:Asurface:Colour
 NumberOfControlPoints:0
 CONNECTION
 isovalue:BoxChange:refresh:In1
 NumberOfControlPoints:0
 CONNECTION
 isovalue:BoxChange:refresh:In1
@@ -157,9 +157,6 @@ CONNECTION
 opacity:BoxChange:refresh:In2
 NumberOfControlPoints:0
 CONNECTION
 opacity:BoxChange:refresh:In2
 NumberOfControlPoints:0
 CONNECTION
-colour:BoxChange:refresh:In3
-NumberOfControlPoints:0
-CONNECTION
 colour:Widget:controls:Widget3
 NumberOfControlPoints:0
 CONNECTION
 colour:Widget:controls:Widget3
 NumberOfControlPoints:0
 CONNECTION
@@ -169,7 +166,7 @@ CONNECTION
 opacity:Widget:controls:Widget2
 NumberOfControlPoints:0
 CONNECTION
 opacity:Widget:controls:Widget2
 NumberOfControlPoints:0
 CONNECTION
-Box09:Out:surface:Renderer
+Box09:Out:Asurface:Renderer
 NumberOfControlPoints:0
 CONNECTION
 Box09:Out:Box08:Renderer
 NumberOfControlPoints:0
 CONNECTION
 Box09:Out:Box08:Renderer
@@ -193,7 +190,7 @@ CONNECTION
 BoxExecute:BoxExecute:refresh:In4
 NumberOfControlPoints:0
 CONNECTION
 BoxExecute:BoxExecute:refresh:In4
 NumberOfControlPoints:0
 CONNECTION
-In:In:surface:In
+In:In:Asurface:In
 NumberOfControlPoints:0
 CONNECTION
 maxIsovalue:maxIsovalue:isovalue:Max
 NumberOfControlPoints:0
 CONNECTION
 maxIsovalue:maxIsovalue:isovalue:Max
@@ -202,21 +199,27 @@ CONNECTION
 vtkRenderer:vtkRenderer:Box09:In
 NumberOfControlPoints:0
 CONNECTION
 vtkRenderer:vtkRenderer:Box09:In
 NumberOfControlPoints:0
 CONNECTION
-surface:Out:Out:Out
+Asurface:Out:Out:Out
 NumberOfControlPoints:0
 CONNECTION
 controls:Widget:Widget:Widget
 NumberOfControlPoints:0
 CONNECTION
 NumberOfControlPoints:0
 CONNECTION
 controls:Widget:Widget:Widget
 NumberOfControlPoints:0
 CONNECTION
-refresh:Out:BoxChange:BoxChange
+opacity:BoxChange:refresh:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
 NumberOfControlPoints:0
 CONNECTION
-refresh:Out:Box08:BoxExecute
+refresh:BoxChange:BoxChange:BoxChange
 NumberOfControlPoints:0
 CONNECTION
 NumberOfControlPoints:0
 CONNECTION
-refresh:Out:surface:BoxExecute
+refresh:BoxChange:Asurface:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
 NumberOfControlPoints:0
 CONNECTION
-opacity:BoxChange:refresh:BoxExecute
+refresh:BoxChange:Box08:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+refresh:BoxChange:Adiv:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+colour:BoxChange:refresh:In3
 NumberOfControlPoints:0
 APP_END
 NumberOfControlPoints:0
 APP_END
index 6c25ef9740ff50f7d0eda1b1087a3c77b928532b..e2fd23867e6c41fbfd6440b6a590e15c6e452ffc 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
 # ----------------------------------
 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/creaTools/creatools_install/bin/../share/bbtk/bbs/wxvtk/boxes/bbIsoSurfaceWidget.bbs
+# - /tmpEED/creaTools/creatools_source/bbtk/packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs
 # ----------------------------------
 
 include std
 # ----------------------------------
 
 include std
@@ -16,51 +16,52 @@ description "Image iso-surface extractor (vtk"
 
 category "image;mesh;widget;viewer"
 
 
 category "image;mesh;widget;viewer"
 
-new LayoutLine controls
+new wx:LayoutLine controls
   set controls.Orientation "HORIZONTAL"
 
   set controls.Orientation "HORIZONTAL"
 
-new IsoSurfaceExtractor surface
+new vtk:IsoSurfaceExtractor Asurface
 
 
-new Slider isovalue
+new wx:Slider isovalue
   set isovalue.ChangeResolution "true"
   set isovalue.Max "5000"
   set isovalue.Title "Isovalue"
 
   set isovalue.ChangeResolution "true"
   set isovalue.Max "5000"
   set isovalue.Title "Isovalue"
 
-new Slider opacity
+new wx:Slider opacity
   set opacity.In "100"
   set opacity.Max "100"
   set opacity.Min "0"
   set opacity.ReactiveOnTrack "true"
   set opacity.Title "Opacity"
 
   set opacity.In "100"
   set opacity.Max "100"
   set opacity.Min "0"
   set opacity.ReactiveOnTrack "true"
   set opacity.Title "Opacity"
 
-new ColourSelectorButton colour
+new wx:ColourSelectorButton colour
 
 
-new MultipleInputs refresh
+new std:MultipleInputs refresh
 
 
-new Div div
-  set div.In2 "100"
+new std:Div Adiv
+  set Adiv.In2 "100"
 
 
-new UpdateRender Box08
+new vtk:UpdateRender Box08
   set Box08.Active "true"
 
   set Box08.Active "true"
 
-new MagicBox Box09
+new std:MagicBox Box09
 
 
 
 
-connect isovalue.Out surface.Isovalue
-connect opacity.Out div.In1
-connect div.Out surface.Opacity
-connect colour.Out surface.Colour
+connect isovalue.Out Asurface.Isovalue
+connect opacity.Out Adiv.In1
+connect Adiv.Out Asurface.Opacity
+connect colour.Out Asurface.Colour
 connect isovalue.BoxChange refresh.In1
 connect opacity.BoxChange refresh.In2
 connect isovalue.BoxChange refresh.In1
 connect opacity.BoxChange refresh.In2
-connect colour.BoxChange refresh.In3
 connect colour.Widget controls.Widget3
 connect isovalue.Widget controls.Widget1
 connect opacity.Widget controls.Widget2
 connect colour.Widget controls.Widget3
 connect isovalue.Widget controls.Widget1
 connect opacity.Widget controls.Widget2
-connect Box09.Out surface.Renderer
+connect Box09.Out Asurface.Renderer
 connect Box09.Out Box08.Renderer
 connect Box09.Out Box08.Renderer
-connect refresh.Out Box08.BoxExecute
-connect refresh.Out surface.BoxExecute
 connect opacity.BoxChange refresh.BoxExecute
 connect opacity.BoxChange refresh.BoxExecute
+connect refresh.BoxChange Asurface.BoxExecute
+connect refresh.BoxChange Box08.BoxExecute
+connect refresh.BoxChange Adiv.BoxExecute
+connect colour.BoxChange refresh.In3
 
 # Complex input ports
 input Title controls.WinTitle " "
 
 # Complex input ports
 input Title controls.WinTitle " "
@@ -69,14 +70,15 @@ input Isovalue isovalue.In " "
 input Colour colour.In " "
 input Vertical controls.Orientation " "
 input BoxExecute refresh.In4 " "
 input Colour colour.In " "
 input Vertical controls.Orientation " "
 input BoxExecute refresh.In4 " "
-input In surface.In " "
+input In Asurface.In " "
 input maxIsovalue isovalue.Max " "
 input vtkRenderer Box09.In " "
 
 # Complex output ports
 input maxIsovalue isovalue.Max " "
 input vtkRenderer Box09.In " "
 
 # Complex output ports
-output Out surface.Out " "
+output Out Asurface.Out " "
 output Widget controls.Widget " "
 output Widget controls.Widget " "
-output BoxChange refresh.Out " "
+output BoxChange refresh.BoxChange " "
 
 
+message    
 
 endefine
 
 endefine