--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.2 BBG BlackBox Diagram file
+# - /Users/davila/tmp/MyEEDPrj/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+BOXES:6
+BOX
+mySamplePackage:mySampleBox1:Box00
+ISEXEC:FALSE
+-56.801457:101.723415:900.000000
+-11.226457:91.723415:900.000000
+FIN_BOX
+BOX
+wx:Slider:Box01
+ISEXEC:FALSE
+1.508210:178.722924:900.000000
+52.908210:168.722924:900.000000
+PORT
+Label:true
+PORT
+Title:In2
+FIN_BOX
+BOX
+wx:Slider:Box02
+ISEXEC:FALSE
+-78.049885:178.345872:900.000000
+-26.649885:168.345872:900.000000
+PORT
+Label:true
+PORT
+Title:In1
+FIN_BOX
+BOX
+wx:LayoutLine:Box03
+ISEXEC:TRUE
+-83.705673:7.163999:900.000000
+-26.145673:-2.836001:900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+-0.000000:49.770941:900.000000
+45.575000:39.770941:900.000000
+PORT
+Title:"In1+In2+2"
+FIN_BOX
+BOX
+std:MultipleInputs:Box05
+ISEXEC:FALSE
+9.803367:139.886508:900.000000
+55.378367:129.886508:900.000000
+FIN_BOX
+CONNECTIONS:9
+CONNECTION
+Box02:Out:Box00:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box00:In2
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box01:Widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box03:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:BoxChange:Box05:In1
+NumberOfControlPoints:0
+CONNECTION
+Box01:BoxChange:Box05:In2
+NumberOfControlPoints:0
+CONNECTION
+Box05:BoxChange:Box04:BoxExecute
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.2 BBS BlackBox Script
+# - /Users/davila/tmp/MyEEDPrj/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include mySamplePackage
+include wx
+include std
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new mySampleBox1 Box00
+
+new Slider Box01
+ set Box01.Label true
+ set Box01.Title In2
+
+new Slider Box02
+ set Box02.Label true
+ set Box02.Title In1
+
+new LayoutLine Box03
+
+new OutputText Box04
+ set Box04.Title "In1+In2+2"
+
+new MultipleInputs Box05
+
+
+connect Box02.Out Box00.In1
+connect Box01.Out Box00.In2
+connect Box02.Widget Box03.Widget1
+connect Box01.Widget Box03.Widget2
+connect Box04.Widget Box03.Widget3
+connect Box00.Out Box04.In
+connect Box02.BoxChange Box05.In1
+connect Box01.BoxChange Box05.In2
+connect Box05.BoxChange Box04.BoxExecute
+
+exec Box03
void myFierceClass2::Execute()
{
- Percent=(X/Y)*100;
+ Result=X+Y+2;
}
double myFierceClass2::GetResult()
{
- return Percent;
+ return Result;
}
private:
float X;
float Y;
- float Percent;
+ float Result;
};
//-----------------------------------------------------------------------------
--- /dev/null
+
+
+#include "myFierceClass3vtkPipeline.h"
+
+
+myFierceClass3vtkPipeline::myFierceClass3vtkPipeline()
+{
+ filterThreshold = vtkImageThreshold::New();
+ filterThreshold->SetOutputScalarTypeToShort();
+ filterThreshold->SetOutValue(0);
+ filterThreshold->SetInValue(255);
+ filterGaussian = vtkImageGaussianSmooth::New();
+ filterGaussian->SetInput( filterThreshold->GetOutput() );
+ filterGaussian->SetStandardDeviations ( 2 , 2 );
+}
+
+
+myFierceClass3vtkPipeline::myFierceClass3vtkPipeline()
+{
+ filterThreshold->Delete();
+ filterGaussian->Delete();
+}
+
+
+void myFierceClass3vtkPipeline::SetImage (vtkImageData *img)
+{
+ image = img;
+}
+
+
+void myFierceClass3vtkPipeline::SetThresholdBetween ( double l, double u )
+{
+ lower = l;
+ upper = u;
+}
+
+
+void myFierceClass3vtkPipeline::Execute()
+{
+ filterThreshold->SetInput(image);
+ filterThreshold->ThresholdBetween ( lower , upper );
+ filterGaussian->Update();
+}
+
+vtkImageData *myFierceClass3vtkPipeline::GetResult()
+{
+ return filterGaussian->GetOutput();
+}
--- /dev/null
+#ifndef _myFierceClass3vtkPipeline_H_
+#define _myFierceClass3vtkPipeline_H_
+
+
+#include <vtkImageData.h>
+#include <vtkImageThreshold.h>
+#include <vtkImageGaussianSmooth.h>
+
+//---------------------------------------------
+// dummy class
+// with Setters and Getters
+// the job is done by the function Execute
+
+//---------------------------------------------
+class /*CREA_EXPORT*/ myFierceClass3vtkPipeline
+{
+ public :
+ myFierceClass3vtkPipeline();
+ myFierceClass3vtkPipeline();
+ void SetImage(vtkImageData * img);
+ void SetThresholdBetween(double l,double u);
+ void Execute();
+ vtkImageData *GetResult();
+
+ private:
+ double lower;
+ double upper;
+ vtkImageData *image;
+ vtkImageThreshold *filterThreshold;
+ vtkImageGaussianSmooth *filterGaussian;
+};
+
+//-----------------------------------------------------------------------------
+#endif // _myFierceClass3vtkPipeline_H_