--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
+# - /Users/davila/Creatis/C23/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleMarchingCubes2.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:9
+BOX
+vtk:LoadHola:Box00
+ISEXEC:FALSE
+-27.599389:38.890732:-900.000000
+-6.049389:36.390732:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box01
+ISEXEC:FALSE
+-16.608374:10.422259:-900.000000
+21.991626:7.922259:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:PolyDataToActor_Widget:Box02
+ISEXEC:FALSE
+-49.493516:-11.332302:-900.000000
+-26.473516:-13.832302:-900.000000
+FIN_BOX
+BOX
+creaVtk:MarchingCubes2:Box03
+ISEXEC:FALSE
+-47.378096:1.297573:-900.000000
+-25.093096:-1.202427:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box04
+ISEXEC:TRUE
+-38.663218:-23.332412:-900.000000
+-15.903218:-25.832412:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-58.418249:-18.320351:-900.000000
+-25.098249:-20.820351:-900.000000
+FIN_BOX
+BOX
+wx:CheckBox:Box06
+ISEXEC:FALSE
+-62.808374:12.443259:-900.000000
+-41.178374:9.943259:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box07
+ISEXEC:FALSE
+-64.135009:-4.271200:-900.000000
+-42.165009:-6.771200:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box10
+ISEXEC:FALSE
+-96.096271:11.950144:-900.000000
+-66.296271:9.450144:-900.000000
+PORT
+In:"1200"
+PORT
+Label:"true"
+PORT
+Max:"2000"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Isovalue"
+FIN_BOX
+CONNECTIONS:14
+CONNECTION
+Box00:Out:Box01:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box04:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box03:Out:Box02:polydata
+NumberOfControlPoints:0
+CONNECTION
+Box01:Renderer1:Box02:render
+NumberOfControlPoints:0
+CONNECTION
+Box02:widget:Box05:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box04:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box05:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box06:Out:Box03:Active
+NumberOfControlPoints:0
+CONNECTION
+Box06:BoxChange:Box07:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box07:In2
+NumberOfControlPoints:0
+CONNECTION
+Box07:BoxChange:Box02:boxexecute
+NumberOfControlPoints:0
+CONNECTION
+Box10:Out:Box03:Value
+NumberOfControlPoints:0
+CONNECTION
+Box10:Widget:Box05:Widget2
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBS BlackBox Script
+# - /Users/davila/Creatis/C23/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleMarchingCubes2.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include vtk
+include creaMaracasVisu
+include creaVtk
+include wx
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new vtk:LoadHola Box00
+
+new creaMaracasVisu:ViewerNV Box01
+
+new creaMaracasVisu:PolyDataToActor_Widget Box02
+
+new creaVtk:MarchingCubes2 Box03
+
+new wx:LayoutSplit Box04
+ set Box04.Orientation "H"
+
+new wx:LayoutLine Box05
+
+new wx:CheckBox Box06
+
+new std:MultipleInputs Box07
+
+new wx:Slider Box10
+ set Box10.In "1200"
+ set Box10.Label "true"
+ set Box10.Max "2000"
+ set Box10.ReactiveOnTrack "true"
+ set Box10.Title "Isovalue"
+
+
+connect Box00.Out Box01.In
+
+connect Box00.Out Box03.In
+
+connect Box01.Widget Box04.Widget2
+
+connect Box03.Out Box02.polydata
+
+connect Box01.Renderer1 Box02.render
+
+connect Box02.widget Box05.Widget3
+
+connect Box05.Widget Box04.Widget1
+
+connect Box06.Widget Box05.Widget1
+
+connect Box06.Out Box03.Active
+
+connect Box06.BoxChange Box07.In1
+
+connect Box01.BoxChange Box07.In2
+
+connect Box07.BoxChange Box02.boxexecute
+
+connect Box10.Out Box03.Value
+
+connect Box10.Widget Box05.Widget2
+
+
+
+# Complex input ports
+exec Box04
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkImageGaussianSmooth2.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageGaussianSmooth2)
+BBTK_BLACK_BOX_IMPLEMENTATION(ImageGaussianSmooth2,bbtk::AtomicBlackBox);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ImageGaussianSmooth2::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (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')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if (bbGetInputIn()!=NULL)
+ {
+ if (gaussiansmooth==NULL) { gaussiansmooth=vtkImageGaussianSmooth::New(); }
+ gaussiansmooth->SetInputData( bbGetInputIn() );
+ gaussiansmooth->SetStandardDeviation( bbGetInputStdDevX() , bbGetInputStdDevY() , bbGetInputStdDevZ() );
+ gaussiansmooth->Modified();
+ gaussiansmooth->Update();
+ bbSetOutputOut( gaussiansmooth->GetOutput() );
+ } else {
+ bbSetOutputOut(NULL);
+ }
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ImageGaussianSmooth2::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ gaussiansmooth=NULL;
+ bbSetInputIn(NULL);
+ bbSetInputStdDevX(2);
+ bbSetInputStdDevY(2);
+ bbSetInputStdDevZ(2);
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ImageGaussianSmooth2::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void ImageGaussianSmooth2::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkImageGaussianSmooth2_h_INCLUDED__
+#define __bbcreaVtkImageGaussianSmooth2_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+#include "vtkImageGaussianSmooth.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ImageGaussianSmooth2
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ImageGaussianSmooth2,bbtk::AtomicBlackBox);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+ BBTK_DECLARE_INPUT(In,vtkImageData*);
+ BBTK_DECLARE_INPUT(StdDevX,double);
+ BBTK_DECLARE_INPUT(StdDevY,double);
+ BBTK_DECLARE_INPUT(StdDevZ,double);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+ vtkImageGaussianSmooth *gaussiansmooth;
+
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageGaussianSmooth2,bbtk::AtomicBlackBox);
+ BBTK_NAME("ImageGaussianSmooth2");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(ImageGaussianSmooth2,In,"First input",vtkImageData*,"");
+ BBTK_INPUT(ImageGaussianSmooth2,StdDevX,"(default 2) Standard deviation in direction X",double,"");
+ BBTK_INPUT(ImageGaussianSmooth2,StdDevY,"(default 2) Standard deviation in direction Y",double,"");
+ BBTK_INPUT(ImageGaussianSmooth2,StdDevZ,"(default 2) Standard deviation in direction Z",double,"");
+
+ BBTK_OUTPUT(ImageGaussianSmooth2,Out,"First output",vtkImageData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(ImageGaussianSmooth2);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+
+} // EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkImageGaussianSmooth2_h_INCLUDED__
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#include "bbcreaVtkMarchingCubes2.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MarchingCubes2)
+BBTK_BLACK_BOX_IMPLEMENTATION(MarchingCubes2,bbtk::AtomicBlackBox);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void MarchingCubes2::Process()
+{
+
+// THE MAIN PROCESSING METHOD BODY
+// Here we simply set the input 'In' value to the output 'Out'
+// And print out the output value
+// INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
+// void bbSet{Input|Output}NAME(const TYPE&)
+// const TYPE& bbGet{Input|Output}NAME() const
+// Where :
+// * NAME is the name of the input/output
+// (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')
+// bbSetOutputOut( bbGetInputIn() );
+// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
+ if ( (bbGetInputActive()==true) && (bbGetInputIn()!=NULL) )
+ {
+ if (marchingcubes==NULL) { marchingcubes=vtkMarchingCubes::New(); }
+ marchingcubes->SetInputData( bbGetInputIn() );
+ marchingcubes->SetValue(0, bbGetInputValue() );
+
+ if(bbGetInputComputeNormalsOn())
+ {
+ marchingcubes->ComputeNormalsOn();
+ }else {
+ marchingcubes->ComputeNormalsOff();
+ }// if Normals
+
+ if(bbGetInputComputeScalarsOn())
+ {
+ marchingcubes->ComputeScalarsOn();
+ }else{
+ marchingcubes->ComputeScalarsOff();
+ }// if Scalars
+
+ marchingcubes->Update();
+ bbSetOutputOut( marchingcubes->GetOutput() );
+ } else {
+ bbSetOutputOut(NULL);
+ } // Active
+
+
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void MarchingCubes2::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+ marchingcubes=NULL;
+ bbSetInputActive(true);
+ bbSetInputIn(NULL);
+ bbSetInputValue( 400 );
+ bbSetInputComputeNormalsOn(true);
+ bbSetInputComputeScalarsOn(true);
+ bbSetOutputOut(NULL);
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void MarchingCubes2::bbUserInitializeProcessing()
+{
+
+// THE INITIALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should allocate the internal/output pointers
+// if any
+
+
+}
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+void MarchingCubes2::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /dev/null
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+#ifndef __bbcreaVtkMarchingCubes2_h_INCLUDED__
+#define __bbcreaVtkMarchingCubes2_h_INCLUDED__
+
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkImageData.h>
+#include <vtkPolyData.h>
+#include <vtkMarchingCubes.h>
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT MarchingCubes2
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(MarchingCubes2,bbtk::AtomicBlackBox);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+ BBTK_DECLARE_INPUT(Active,bool);
+ BBTK_DECLARE_INPUT(In,vtkImageData*);
+ BBTK_DECLARE_INPUT(Value,double);
+ BBTK_DECLARE_INPUT(ComputeNormalsOn,bool);
+ BBTK_DECLARE_INPUT(ComputeScalarsOn,bool);
+ BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
+ BBTK_PROCESS(Process);
+ void Process();
+ vtkMarchingCubes *marchingcubes;
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(MarchingCubes2,bbtk::AtomicBlackBox);
+ BBTK_NAME("MarchingCubes2");
+ BBTK_AUTHOR("InfoDev");
+ BBTK_DESCRIPTION("No Description.");
+ BBTK_CATEGORY("empty");
+
+ BBTK_INPUT(MarchingCubes2,Active,"(default true) Active",bool,"");
+ BBTK_INPUT(MarchingCubes2,In,"Input image",vtkImageData*,"");
+ BBTK_INPUT(MarchingCubes2,Value,"Value of the iso-surface",double,"");
+ BBTK_INPUT(MarchingCubes2,ComputeNormalsOn,"Set the computation of normals",bool,"");
+ BBTK_INPUT(MarchingCubes2,ComputeScalarsOn,"Set the computation of scalars",bool,"");
+
+ BBTK_OUTPUT(MarchingCubes2,Out,"Output polydata (iso-surface)",vtkPolyData*,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(MarchingCubes2);
+//=====
+// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
+//=====
+}
+// EO namespace bbcreaVtk
+
+#endif // __bbcreaVtkMarchingCubes2_h_INCLUDED__
+