From 02506e1a92ee485d694cf0ed4bd1a76d96ac822c Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Mon, 11 Apr 2011 11:28:33 +0000 Subject: [PATCH] no message --- .../bbs/appli/Sample_Box1.bbg | 86 +++++++++++++++++++ .../bbs/appli/Sample_Box1.bbs | 47 ++++++++++ .../lib/mySampleLib/myFierceClass2.cxx | 4 +- .../lib/mySampleLib/myFierceClass2.h | 2 +- .../mySampleLib/myFierceClass3vtkPipeline.cxx | 48 +++++++++++ .../mySampleLib/myFierceClass3vtkPipeline.h | 34 ++++++++ 6 files changed, 218 insertions(+), 3 deletions(-) create mode 100644 appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbg create mode 100644 appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbs create mode 100644 appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.cxx create mode 100644 appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.h 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 index 0000000..91fcdad --- /dev/null +++ b/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbg @@ -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: +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 index 0000000..a6d51bc --- /dev/null +++ b/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_Box1.bbs @@ -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 "" + +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 diff --git a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx index ed610ba..d5f2825 100644 --- a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx +++ b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx @@ -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; } diff --git a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h index 0fc1923..3b0871d 100644 --- a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h +++ b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h @@ -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 index 0000000..adb354e --- /dev/null +++ b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.cxx @@ -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 index 0000000..ea5f48c --- /dev/null +++ b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass3vtkPipeline.h @@ -0,0 +1,34 @@ +#ifndef _myFierceClass3vtkPipeline_H_ +#define _myFierceClass3vtkPipeline_H_ + + +#include +#include +#include + +//--------------------------------------------- +// 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_ -- 2.47.1