]> Creatis software - crea.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 11 Apr 2011 11:28:33 +0000 (11:28 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Mon, 11 Apr 2011 11:28:33 +0000 (11:28 +0000)
appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbg [new file with mode: 0644]
appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbs [new file with mode: 0644]
appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx
appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h
appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.cxx [new file with mode: 0644]
appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.h [new file with mode: 0644]

diff --git a/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbg b/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbg
new file mode 100644 (file)
index 0000000..91fcdad
--- /dev/null
@@ -0,0 +1,86 @@
+# ----------------------------------
+# - 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
diff --git a/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbs b/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbs
new file mode 100644 (file)
index 0000000..a6d51bc
--- /dev/null
@@ -0,0 +1,47 @@
+# ----------------------------------
+# - 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
index ed610baa2ad5b724c9ae8353fc23b540927cd9e3..d5f2825a0eb08cc9d95b7f4545bbf897863ae6c2 100644 (file)
@@ -12,10 +12,10 @@ void myFierceClass2::SetY (double y)
 
 void myFierceClass2::Execute()
 {
-   Percent=(X/Y)*100;
+   Result=X+Y+2;
 }
 
 double myFierceClass2::GetResult()
 {
-   return Percent;
+   return Result;
 }
index 0fc1923a1c9ba9d37831fe218f2ea7b0ddbdf481..3b0871dda69f7533c9b235ce4cfc2c7a3a39a97d 100644 (file)
@@ -21,7 +21,7 @@ class /*CREA_EXPORT*/ myFierceClass2
    private:
       float X;
       float Y;
-      float Percent;
+      float Result;
 };
 
 //-----------------------------------------------------------------------------
diff --git a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.cxx b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.cxx
new file mode 100644 (file)
index 0000000..adb354e
--- /dev/null
@@ -0,0 +1,48 @@
+
+
+#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();
+}
diff --git a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.h b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.h
new file mode 100644 (file)
index 0000000..ea5f48c
--- /dev/null
@@ -0,0 +1,34 @@
+#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_