]> Creatis software - bbtk.git/commitdiff
2042 Feature bbpConfigurator
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Thu, 25 Jul 2013 14:19:24 +0000 (16:19 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Thu, 25 Jul 2013 14:19:24 +0000 (16:19 +0200)
  2077 Feature IsoSurfaceWidget Box internal distribution
  2083 Feature Create the SphereListWidget box

kernel/cmake/BBTKConfigurePackage_src.cmake
packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs
packages/vtk/src/bbvtkPolyDataWriterPlus.cxx~ [deleted file]
packages/vtk/src/bbvtkPolyDataWriterPlus.h~ [deleted file]
packages/vtk/src/bbvtkSphereList.cxx
packages/vtk/src/bbvtkSphereList.h
packages/wxvtk/bbs/boxes/SphereListWidget.bbg [new file with mode: 0644]
packages/wxvtk/bbs/boxes/SphereListWidget.bbs [new file with mode: 0644]
packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbg
packages/wxvtk/bbs/boxes/bbIsoSurfaceWidget.bbs

index 080c02fe66504ba7d4e206bcc819b7a0d35300ef..7afdea40a046d84494dc6d40dbbf00537b9c45d9 100644 (file)
@@ -314,32 +314,35 @@ ENDIF(CHCON_LIBRARIES)
 ## bbpConfigurator   create de PACKAGE.bbp file
 ## bbConfigurator <path_to_bbs> <package_name> <output_path>
 
-  IF (WIN32)
+
+
+IF (WIN32)
     MAKE_DLL_PATH()
-    ADD_CUSTOM_COMMAND( 
-        TARGET  bb${BBTK_PACKAGE_NAME} POST_BUILD
+    ADD_CUSTOM_TARGET( ${BBTK_PACKAGE_NAME}.bbp  ALL
          COMMAND  set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && ${BBTK_BBPCONFIGURATOR} ${CMAKE_CURRENT_SOURCE_DIR}/../bbs/boxes/  ${BBTK_PACKAGE_NAME}  ${BBTK_BBS_BUILD_PATH}/
     ) 
-  ELSE(WIN32)
+ELSE(WIN32)
     SET(LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH}:${LIBRARY_OUTPUT_PATH}")
-    ADD_CUSTOM_COMMAND( 
-         TARGET  bb${BBTK_PACKAGE_NAME} POST_BUILD
+    ADD_CUSTOM_TARGET( ${BBTK_PACKAGE_NAME}.bbp  ALL
          COMMAND  ${BBTK_BBPCONFIGURATOR} ${CMAKE_CURRENT_SOURCE_DIR}/../bbs/boxes/  ${BBTK_PACKAGE_NAME}  ${BBTK_BBS_BUILD_PATH}/
     ) 
-  ENDIF(WIN32)
+ENDIF(WIN32)
+
+add_dependencies(${BBTK_PACKAGE_NAME}.bbp  bbpConfigurator )
 
-  SET(OUTPUT_FILE ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}.bbp)
-  IF(WIN32)
+
+SET(OUTPUT_FILE ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}.bbp)
+IF(WIN32)
    INSTALL(
      FILES ${OUTPUT_FILE}
 #    DESTINATION ${BBTK_BBS_INSTALL_PATH}
      DESTINATION ${BBTK_BBS_REL_PATH}
     )
-   ELSE(WIN32)
+ELSE(WIN32     )
      INSTALL(
        FILES ${OUTPUT_FILE}
        DESTINATION ${BBTK_BBS_INSTALL_PATH}
 #      DESTINATION ${BBTK_BBS_REL_PATH}
      )
-  ENDIF(WIN32)
+ENDIF(WIN32)
 
index 5ce07901aa049a7959c594938951777e27009d49..71f10b5df87b8346d6179323021dd837e93fd3c0 100644 (file)
@@ -1,59 +1,45 @@
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/All/creatools_source/bbtk/packages/vtk/bbs/boxes/bbIsoSurfaceExtractor.bbs
+# ----------------------------------
 
 include std
+include itkvtk
 include vtk
+include std
 
-# --- Box Description ---
 define IsoSurfaceExtractor vtk
 
-  description "Extracts an iso-surface of a 3D image and creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)" 
-  author "j p r at creatis.univ-lyon1.fr"
-  category "3D object creator"
-# ---                ---
-
-  new MarchingCubes   mc
-  new PolyDataToActor polydatatoactor   
-    connect mc.Out polydatatoactor.In
-
-  new MagicBox  mb
-   connect mb.BoxChange mc.BoxExecute
-   connect mb.BoxChange polydatatoactor.BoxExecute
-  
-# ---                ---
-
-  input In        mc.In              "vtkImageData"
-  input Isovalue  mc.Value          "Isovalue"
-  input Opacity   polydatatoactor.Opacity   "Opacity"  
-  input Colour    polydatatoactor.Colour    "R G B"
-  input Renderer  polydatatoactor.Renderer  "3D scene in which to insert the surface"
-  input Transform polydatatoactor.Transform "Linear Transform (4x4 homogeneous)"     
-  input BoxExecute mb.BoxExecute "BoxExecute"     
-    
-
-  output Out polydatatoactor.Out "Extracted iso-surface (as a vtkProp3D *)"
+author "j p r at creatis.univ-lyon1.fr"
+description "Extracts an iso-surface of a 3D image and creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)"
+
+category "3D object creator"
+
+new MarchingCubes mc
+  set mc.BoxProcessMode "Reactive"
+
+new PolyDataToActor polydatatoactor
+  set polydatatoactor.BoxProcessMode "Reactive"
+
+new MultipleInputs Box03
+  set Box03.BoxProcessMode "Reactive"
+
+
+connect mc.Out polydatatoactor.In
+connect Box03.BoxChange polydatatoactor.BoxExecute
+connect Box03.BoxChange mc.BoxExecute
+
+# Complex input ports
+input In mc.In " "
+input Isovalue mc.Value " "
+input Opacity polydatatoactor.Opacity " "
+input Colour polydatatoactor.Colour " "
+input Renderer polydatatoactor.Renderer " "
+input Transform polydatatoactor.Transform " "
+input BoxExecute Box03.In1 " "
+
+# Complex output ports
+output Out polydatatoactor.Out " "
+
 
 endefine
diff --git a/packages/vtk/src/bbvtkPolyDataWriterPlus.cxx~ b/packages/vtk/src/bbvtkPolyDataWriterPlus.cxx~
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/packages/vtk/src/bbvtkPolyDataWriterPlus.h~ b/packages/vtk/src/bbvtkPolyDataWriterPlus.h~
deleted file mode 100644 (file)
index 26466bf..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-# ---------------------------------------------------------------------
-#
-# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-#                        pour la SantÈ)
-# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-# Previous Authors : Laurent Guigues, Jean-Pierre Roux
-# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
-#
-#  This software is governed by the CeCILL-B license under French law and
-#  abiding by the rules of distribution of free software. You can  use,
-#  modify and/ or redistribute the software under the terms of the CeCILL-B
-#  license as circulated by CEA, CNRS and INRIA at the following URL
-#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-#  or in the file LICENSE.txt.
-#
-#  As a counterpart to the access to the source code and  rights to copy,
-#  modify and redistribute granted by the license, users are provided only
-#  with a limited warranty  and the software's author,  the holder of the
-#  economic rights,  and the successive licensors  have only  limited
-#  liability.
-#
-#  The fact that you are presently reading this means that you have had
-#  knowledge of the CeCILL-B license and that you accept its terms.
-# ------------------------------------------------------------------------ */
-
-
-#ifndef __bbPersistenceVTKReader_h_INCLUDED__
-#define __bbPersistenceVTKReader_h_INCLUDED__
-#include "bbPersistence_EXPORT.h"
-#include "bbtkAtomicBlackBox.h"
-#include "iostream"
-
-#include <vtkGenericDataObjectReader.h>
-#include <vtkUnstructuredGridReader.h>
-#include <vtkXMLPolyDataReader.h>
-#include <vtkProperty.h>
-#include <vtkObject.h>
-#include <vtkCommand.h>
-#include <vtkPolyData.h>
-#include <vtkPolyDataMapper.h>
-#include <vtkPolyDataReader.h>
-#include <vtkActor.h>
-#include <vtkProp3D.h>
-#include "names.h"
-
-namespace bbPersistence
-{
-
-#define OBS_POST_READER_1 1401
-
-class bbPersistence_EXPORT VTKReader
- : 
-   public bbtk::AtomicBlackBox,
-   public vtkObject
-{
-  BBTK_BLACK_BOX_INTERFACE(VTKReader,bbtk::AtomicBlackBox);
-  BBTK_DECLARE_INPUT(InPath, std::string);
-  BBTK_DECLARE_INPUT(InOpacity, double);
-  BBTK_DECLARE_INPUT(InColor, std::vector<double>);
-  BBTK_DECLARE_INPUT(InPostReadObs1, vtkCommand*);
-  BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
-  BBTK_DECLARE_OUTPUT(OutActor,vtkProp3D*);
-  BBTK_PROCESS(Process);
-  void Process();
-
-  vtkPolyData* informacion;
-
-  bool readed;
-};
-
-BBTK_BEGIN_DESCRIBE_BLACK_BOX(VTKReader,bbtk::AtomicBlackBox);
-BBTK_NAME("VTKReader");
-BBTK_AUTHOR("_author_");
-BBTK_DESCRIPTION("_description_");
-BBTK_CATEGORY("__CATEGORY__");
-BBTK_INPUT(VTKReader,InPath,"Path to the file to be readed",std::string,"");
-BBTK_INPUT(VTKReader,InOpacity,"",double,"");
-BBTK_INPUT(VTKReader,InColor,"",std::vector<double>,"");
-BBTK_INPUT(VTKReader,InPostReadObs1,"Who will be notified after persist", vtkCommand*,"");
-BBTK_OUTPUT(VTKReader,Out,"Information readed", vtkPolyData*,"");
-BBTK_OUTPUT(VTKReader,OutActor,"Information as an actor", vtkProp3D*,"");
-BBTK_END_DESCRIBE_BLACK_BOX(VTKReader);
-}
-// EO namespace bbPersistence
-
-#endif // __bbPersistenceVTKReader_h_INCLUDED__
-
-
index 50889bd9dc746a47fba9e79a37a34de6f5f8c0c8..24624139132c46c63f31b4217fa60e039438aec5 100644 (file)
@@ -38,6 +38,49 @@ namespace bbvtk
 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,SphereList)
 BBTK_BLACK_BOX_IMPLEMENTATION(SphereList,bbtk::AtomicBlackBox);
 
+double SphereList::GetRadio(int i)
+{
+    double radio;
+       if (bbGetInputlstRadio().size()==0)
+        {
+            radio = 1.0;
+        } else if (bbGetInputlstRadio().size() < i )
+       {
+            radio = bbGetInputlstRadio()[i];
+        } else  
+        {
+            radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
+        }  
+
+       return radio;
+}
+
+
+void SphereList::GetPoint(int i, double &px,double &py,double &pz)        
+ {
+      double spc[3];
+      if (bbGetInputSpacing().size()==3)
+      {
+               spc[0]=bbGetInputSpacing()[0];
+               spc[1]=bbGetInputSpacing()[1];
+               spc[2]=bbGetInputSpacing()[2];
+      } else {
+               spc[0]=spc[1]=spc[2]=1;
+       }
+
+       px = bbGetInputlstPointX()[i]*spc[0];
+       if (bbGetInputlstPointY().size() == bbGetInputlstPointX().size() )
+       {
+               py = bbGetInputlstPointY()[i]*spc[1];
+       }
+               if (bbGetInputlstPointZ().size() == bbGetInputlstPointX().size() )
+       {                       
+               pz = bbGetInputlstPointZ()[i]*spc[2];
+       }
+}  
+
+                       
+
 void SphereList::Process()
 {
 
@@ -45,8 +88,7 @@ void SphereList::Process()
        double px = 0.0;
        double py = 0.0;
        double pz = 0.0;
-       double radio;
-       double spc[3];
+       
  
        int last_valid_color_index = 0;
 
@@ -57,66 +99,41 @@ void SphereList::Process()
                if (sphereActor.size() != 0)
                 {
                   for (int i = 0; i < sphereActor.size(); i++)
-                    sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
-               }
-                else
-                {
-                    if (bbGetInputSpacing().size()==3)
-                    {
-                       spc[0]=bbGetInputSpacing()[0];
-                       spc[1]=bbGetInputSpacing()[1];
-                       spc[2]=bbGetInputSpacing()[2];
-                    }
-                    else
-                    {
-                       spc[0]=spc[1]=spc[2]=1;
-                    }
+                  {
+                       GetPoint(i, px,py,pz);
+                       sphereActor[i] ->SetPosition( px,py,pz );
+                       sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
+                       vtkspheresourceLst[i] -> SetRadius( GetRadio(i) ); 
+                 } // for i
+               } else {
+                   
 
                     iMin=0;
                     iMax=bbGetInputlstPointX().size();
-                    printf("EED SphereList::Process   iMax=%d \n", iMax);
-                    for (int i = 0; i < iMax; i++)
-                      {
-                        std::cout << "CM SphereList::Process i=" <<  i  << " bbGetInputlstPointX()[i]=" << bbGetInputlstPointX()[i] << std::endl;
-                        std::cout << "CM SphereList::Process i=" <<  i  << " bbGetInputlstPointY()[i]=" << bbGetInputlstPointY()[i] << std::endl;
-                        std::cout << "CM SphereList::Process i=" <<  i  << " bbGetInputlstPointZ()[i]=" << bbGetInputlstPointZ()[i] << std::endl;
-                      }
-                    // If the vector Y or respectively the vector Z has a different size from the vector X, the position value py or respectively pz is set to 0.
+//                    printf("EED SphereList::Process   iMax=%d \n", iMax);
+//                    for (int i = 0; i < iMax; i++)
+//                      {
+//                        std::cout << "CM SphereList::Process i=" <<  i  << " bbGetInputlstPointX()[i]=" << bbGetInputlstPointX()[i] << std::endl;
+//                        std::cout << "CM SphereList::Process i=" <<  i  << " bbGetInputlstPointY()[i]=" << bbGetInputlstPointY()[i] << std::endl;
+//                        std::cout << "CM SphereList::Process i=" <<  i  << " bbGetInputlstPointZ()[i]=" << bbGetInputlstPointZ()[i] << std::endl;
+//                      } // for i
+                   // If the vector Y or respectively the vector Z has a different size from the vector X, the position value py or respectively pz is set to 0.
                     for ( int i=iMin ; i<iMax; i=i+1 )
                     {
-                       px = bbGetInputlstPointX()[i]*spc[0];
-                       if (bbGetInputlstPointY().size() == bbGetInputlstPointX().size() )
-                       {
-                           py = bbGetInputlstPointY()[i]*spc[1];
-                       }
-                       if (bbGetInputlstPointZ().size() == bbGetInputlstPointX().size() )
-                       {                       
-                           pz = bbGetInputlstPointZ()[i]*spc[2];
-                       }
+                         
 
-                       // If the number of elements in the radio list is different from the number of X coordinates, the radio value is set to 1.
-                       if (bbGetInputlstRadio().size() == bbGetInputlstPointX().size() )
-                       {
-                           radio = bbGetInputlstRadio()[i];
-                        }
-                       else
-                       {
-                            if (bbGetInputlstRadio().size()>=1)
-                            {
-                                radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
-                            } 
-                            else 
-                            {
-                                radio = 1.0;
-                            }
-                       }
+                        GetPoint(i, px,py,pz);
+
+                       
 
                        // Sphere
                        vtkSphereSource * newSphere =  vtkSphereSource::New();
+                       vtkspheresourceLst.push_back(newSphere);
 
                        newSphere -> SetThetaResolution(20);
                        newSphere -> SetPhiResolution(20);
-                       newSphere -> SetRadius(radio); 
+                       newSphere -> SetRadius( GetRadio(i) ); 
 
                        vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
                        newMapper -> SetInput( newSphere -> GetOutput() );
index ac45d5ed087e0ff95a789996cebe5ab60bca89e1..ddbc10d4bcf33ec345efc1ef40f087c20c3da16a 100644 (file)
@@ -62,7 +62,11 @@ class bbvtk_EXPORT SphereList
   void Process();
 
   std::vector<vtkActor *> sphereActor;
+  std::vector<vtkSphereSource *> vtkspheresourceLst;
 
+private:
+   double GetRadio(int);
+   void GetPoint(int i, double &px,double &py,double &pz);   
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(SphereList,bbtk::AtomicBlackBox);
diff --git a/packages/wxvtk/bbs/boxes/SphereListWidget.bbg b/packages/wxvtk/bbs/boxes/SphereListWidget.bbg
new file mode 100644 (file)
index 0000000..dcbec1c
--- /dev/null
@@ -0,0 +1,199 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/All/creatools_source/bbtk/packages/wxvtk/bbs/boxes/SphereListWidget.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:SphereListWidget
+PACKAGENAME:wxvtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+Widget
+-85.905274:-92.354431:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:6
+COMPLEX_PORT
+lstPointX
+8.139713:82.586776:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+lstPointY
+24.043459:82.712003:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+lstPointZ
+39.321073:82.461550:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+Renderer
+-24.568408:81.683772:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+spc
+-7.675531:83.753591:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+WinTitle
+-55.788338:78.579533:-900.000000
+FIN_COMPLEX_PORT
+BOXES:9
+BOX
+wx:Slider:Box00
+ISEXEC:FALSE
+-167.678079:54.285621:-900.000000
+-126.609253:44.285621:-900.000000
+PORT
+In:"50"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Opacity4"
+FIN_BOX
+BOX
+wx:Slider:Box01
+ISEXEC:FALSE
+71.003339:58.793770:-900.000000
+103.778339:48.793770:-900.000000
+PORT
+Label:"true"
+PORT
+Max:"50"
+PORT
+Min:"1"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Radio"
+FIN_BOX
+BOX
+wx:LayoutLine:Box02
+ISEXEC:FALSE
+-87.908896:-62.675787:-900.000000
+-42.333896:-72.675787:-900.000000
+PORT
+WinTitle:"Center Point"
+FIN_BOX
+BOX
+vtk:SphereList:Box03
+ISEXEC:FALSE
+-3.863333:-42.636949:-900.000000
+41.711667:-52.636949:-900.000000
+PORT
+Colour:"0.32 0.12 0.12"
+PORT
+lstPointX:"10 10"
+PORT
+lstPointY:"10 20"
+PORT
+lstPointZ:"10 30"
+PORT
+lstRadio:"10"
+FIN_BOX
+BOX
+std:Div:Box04
+ISEXEC:FALSE
+-116.710956:22.728582:-900.000000
+-83.935956:12.728582:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+std:ConcatStrings:Box05
+ISEXEC:FALSE
+50.279055:8.830270:-900.000000
+95.854055:-1.169730:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box08
+ISEXEC:FALSE
+-98.614166:-13.546822:-900.000000
+-53.039166:-23.546822:-900.000000
+PORT
+BoxProcessMode:"Reactive"
+FIN_BOX
+BOX
+vtk:UpdateRender:Box07
+ISEXEC:FALSE
+-19.609381:-58.498699:-900.000000
+25.965619:-68.498699:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MagicBox:Box09
+ISEXEC:FALSE
+-41.657874:42.759098:-900.000000
+3.917126:32.759098:-900.000000
+FIN_BOX
+CONNECTIONS:20
+CONNECTION
+Box00:Widget:Box02:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box02:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Widget:Widget
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box03:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box04:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box05:In1
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box08:In1
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box03:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box08:BoxChange:Box07:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Renderer:Renderer:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box03:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box07:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box05:Out:Box03:lstRadio
+NumberOfControlPoints:0
+CONNECTION
+Box05:BoxChange:Box08:In2
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box08:In3
+NumberOfControlPoints:0
+CONNECTION
+lstPointX:lstPointX:Box03:lstPointX
+NumberOfControlPoints:0
+CONNECTION
+lstPointY:lstPointY:Box03:lstPointY
+NumberOfControlPoints:0
+CONNECTION
+lstPointZ:lstPointZ:Box03:lstPointZ
+NumberOfControlPoints:0
+CONNECTION
+spc:spc:Box03:Spacing
+NumberOfControlPoints:0
+CONNECTION
+WinTitle:WinTitle:Box02:WinTitle
+NumberOfControlPoints:0
+APP_END
diff --git a/packages/wxvtk/bbs/boxes/SphereListWidget.bbs b/packages/wxvtk/bbs/boxes/SphereListWidget.bbs
new file mode 100644 (file)
index 0000000..584e325
--- /dev/null
@@ -0,0 +1,84 @@
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/All/creatools_source/bbtk/packages/wxvtk/bbs/boxes/SphereListWidget.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include wx
+include vtk
+include std
+
+define SphereListWidget wxvtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new Slider Box00
+  set Box00.In "50"
+  set Box00.Label "true"
+  set Box00.Max "100"
+  set Box00.Min "0"
+  set Box00.ReactiveOnTrack "true"
+  set Box00.Title "Opacity4"
+
+new Slider Box01
+  set Box01.Label "true"
+  set Box01.Max "50"
+  set Box01.Min "1"
+  set Box01.ReactiveOnTrack "true"
+  set Box01.Title "Radio"
+
+new LayoutLine Box02
+  set Box02.WinTitle "Center Point"
+
+new SphereList Box03
+  set Box03.Colour "0.32 0.12 0.12"
+  set Box03.lstPointX "10 10"
+  set Box03.lstPointY "10 20"
+  set Box03.lstPointZ "10 30"
+  set Box03.lstRadio "10"
+
+new Div Box04
+  set Box04.In2 "100"
+
+new ConcatStrings Box05
+
+new MultipleInputs Box08
+  set Box08.BoxProcessMode "Reactive"
+
+new UpdateRender Box07
+  set Box07.Active "true"
+
+new MagicBox Box09
+
+
+connect Box00.Widget Box02.Widget1
+connect Box01.Widget Box02.Widget2
+connect Box04.Out Box03.Opacity
+connect Box00.Out Box04.In1
+connect Box01.Out Box05.In1
+connect Box00.BoxChange Box08.In1
+connect Box08.BoxChange Box03.BoxExecute
+connect Box08.BoxChange Box07.BoxExecute
+connect Box09.Out Box03.Renderer
+connect Box09.Out Box07.Renderer
+connect Box05.Out Box03.lstRadio
+connect Box05.BoxChange Box08.In2
+connect Box01.BoxChange Box08.In3
+
+# Complex input ports
+input Renderer Box09.In " "
+input lstPointX Box03.lstPointX " "
+input lstPointY Box03.lstPointY " "
+input lstPointZ Box03.lstPointZ " "
+input spc Box03.Spacing " "
+input WinTitle Box02.WinTitle " "
+
+# Complex output ports
+output Widget Box02.Widget " "
+
+
+endefine
index 91f7798724ee9a2c9c589ce2bc35022a44d9f84b..ac1ecf98216d0fa23874c261899d779d2aa76e51 100644 (file)
@@ -13,73 +13,73 @@ PACKAGENAME:wxvtk
 COMPLEXOUTPUTS:3
 COMPLEX_PORT
 Out
-128.872171:-162.115738:-900.000000
+63.993992:-275.375244:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
-BoxChange
--34.608288:-163.975879:-900.000000
+Widget
+-21.409188:-290.726543:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
-Widget
-34.548501:-166.490826:-900.000000
+BoxChange
+-72.512970:-286.784432:-900.000000
 FIN_COMPLEX_PORT
 COMPLEXINPUTS:9
 COMPLEX_PORT
 Title
-39.234431:101.542958:-900.000000
+169.373226:99.285429:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Opacity
-0.000000:100.000000:-900.000000
+57.880232:97.499002:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Isovalue
-50.000000:100.000000:-900.000000
+102.163666:96.427146:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Colour
-100.000000:100.000000:-900.000000
+26.041925:107.145708:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 Vertical
-20.134330:100.771479:-900.000000
+150.000000:100.000000:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
 BoxExecute
--60.588425:111.024895:-900.000000
+-109.766428:92.854292:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
-vtkRenderer
+In
 250.000000:100.000000:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
-In
+maxIsovalue
 300.000000:100.000000:-900.000000
 FIN_COMPLEX_PORT
 COMPLEX_PORT
-maxIsovalue
-149.046234:101.002263:-900.000000
+vtkRenderer
+350.000000:100.000000:-900.000000
 FIN_COMPLEX_PORT
-BOXES:7
+BOXES:9
 BOX
 wx:LayoutLine:controls
 ISEXEC:FALSE
--52.203428:-69.894900:-900.000000
-5.356572:-79.894900:-900.000000
+97.896195:-54.335314:-900.000000
+155.456195:-64.335314:-900.000000
 PORT
 Orientation:"HORIZONTAL"
 FIN_BOX
 BOX
 vtk:IsoSurfaceExtractor:surface
 ISEXEC:FALSE
-81.774701:-123.904671:-900.000000
-152.949701:-133.904671:-900.000000
+36.840302:-236.896173:-900.000000
+108.015302:-246.896173:-900.000000
 FIN_BOX
 BOX
 wx:Slider:isovalue
 ISEXEC:FALSE
-110.172480:-11.334358:-900.000000
-161.572480:-21.334358:-900.000000
+97.896195:33.580835:-900.000000
+149.296195:23.580835:-900.000000
 PORT
 ChangeResolution:"true"
 PORT
@@ -90,8 +90,8 @@ FIN_BOX
 BOX
 wx:Slider:opacity
 ISEXEC:FALSE
--58.854441:19.859760:-900.000000
--7.454441:9.859760:-900.000000
+32.910163:-25.716566:-900.000000
+84.310163:-35.716566:-900.000000
 PORT
 In:"100"
 PORT
@@ -99,29 +99,47 @@ Max:"100"
 PORT
 Min:"0"
 PORT
+ReactiveOnTrack:"true"
+PORT
 Title:"Opacity"
 FIN_BOX
 BOX
 wx:ColourSelectorButton:colour
 ISEXEC:FALSE
-13.629466:-34.056096:-900.000000
-84.804466:-44.056096:-900.000000
+10.003991:41.822344:-900.000000
+81.178991:31.822344:-900.000000
 FIN_BOX
 BOX
 std:MultipleInputs:refresh
 ISEXEC:FALSE
-31.511492:-88.460556:-900.000000
-77.086492:-98.460556:-900.000000
+-92.618071:-105.393837:-900.000000
+-47.043071:-115.393837:-900.000000
+PORT
+BoxProcessMode:"Reactive"
 FIN_BOX
 BOX
 std:Div:div
 ISEXEC:FALSE
-61.718338:-56.253614:-900.000000
-94.493338:-66.253614:-900.000000
+0.000000:-110.000000:-900.000000
+32.775000:-120.000000:-900.000000
 PORT
 In2:"100"
 FIN_BOX
-CONNECTIONS:23
+BOX
+vtk:UpdateRender:Box08
+ISEXEC:FALSE
+-7.502993:-172.858283:-900.000000
+38.072007:-182.858283:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+std:MagicBox:Box09
+ISEXEC:FALSE
+170.465036:-148.550905:-900.000000
+216.040036:-158.550905:-900.000000
+FIN_BOX
+CONNECTIONS:26
 CONNECTION
 isovalue:Out:surface:Isovalue
 NumberOfControlPoints:0
@@ -153,6 +171,18 @@ CONNECTION
 opacity:Widget:controls:Widget2
 NumberOfControlPoints:0
 CONNECTION
+refresh:BoxChange:surface:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+refresh:BoxChange:Box08:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:surface:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box08:Renderer
+NumberOfControlPoints:0
+CONNECTION
 Title:Title:controls:WinTitle
 NumberOfControlPoints:0
 CONNECTION
@@ -171,15 +201,15 @@ CONNECTION
 BoxExecute:BoxExecute:refresh:In4
 NumberOfControlPoints:0
 CONNECTION
-vtkRenderer:vtkRenderer:surface:Renderer
-NumberOfControlPoints:0
-CONNECTION
 In:In:surface:In
 NumberOfControlPoints:0
 CONNECTION
 maxIsovalue:maxIsovalue:isovalue:Max
 NumberOfControlPoints:0
 CONNECTION
+vtkRenderer:vtkRenderer:Box09:In
+NumberOfControlPoints:0
+CONNECTION
 surface:Out:Out:Out
 NumberOfControlPoints:0
 CONNECTION
@@ -188,7 +218,4 @@ NumberOfControlPoints:0
 CONNECTION
 refresh:BoxChange:BoxChange:BoxChange
 NumberOfControlPoints:0
-CONNECTION
-refresh:BoxChange:surface:BoxExecute
-NumberOfControlPoints:0
 APP_END
index 13f2110296c1d2c938a7f6944f111b9bb1003982..995a4a0501e5e2553096029caf7185ab699dc27a 100644 (file)
@@ -30,15 +30,22 @@ new Slider 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 MultipleInputs refresh
+  set refresh.BoxProcessMode "Reactive"
 
 new Div div
   set div.In2 "100"
 
+new UpdateRender Box08
+  set Box08.Active "true"
+
+new MagicBox Box09
+
 
 connect isovalue.Out surface.Isovalue
 connect opacity.Out div.In1
@@ -51,6 +58,9 @@ connect colour.Widget controls.Widget3
 connect isovalue.Widget controls.Widget1
 connect opacity.Widget controls.Widget2
 connect refresh.BoxChange surface.BoxExecute
+connect refresh.BoxChange Box08.BoxExecute
+connect Box09.Out surface.Renderer
+connect Box09.Out Box08.Renderer
 
 # Complex input ports
 input Title controls.WinTitle " "
@@ -59,9 +69,9 @@ input Isovalue isovalue.In " "
 input Colour colour.In " "
 input Vertical controls.Orientation " "
 input BoxExecute refresh.In4 " "
-input vtkRenderer surface.Renderer " "
 input In surface.In " "
 input maxIsovalue isovalue.Max " "
+input vtkRenderer Box09.In " "
 
 # Complex output ports
 output Out surface.Out " "