--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.2 BBG BlackBox Diagram file
+# - /Users/davila/Creatis/All2/creatools_source/crea/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_BoxVtkPipeline.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+BOXES:5
+BOX
+mySamplePackage:mySampleBoxWithVTK:Box00
+ISEXEC:FALSE
+-19.548882:83.036235:900.000000
+51.626118:73.036235:900.000000
+PORT
+Lower:1000
+PORT
+Upper:2000
+FIN_BOX
+BOX
+vtk:LoadHola:Box01
+ISEXEC:FALSE
+-21.939698:107.067447:900.000000
+23.635302:97.067447:900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+-60.852862:53.978044:900.000000
+-0.212862:43.978044:900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box03
+ISEXEC:FALSE
+9.466460:53.259684:900.000000
+70.106460:43.259684:900.000000
+PORT
+nTypeView:"0"
+FIN_BOX
+BOX
+wx:LayoutSplit:Box04
+ISEXEC:TRUE
+-10.314595:15.108602:900.000000
+35.260405:5.108602:900.000000
+PORT
+Orientation:H
+FIN_BOX
+CONNECTIONS:5
+CONNECTION
+Box01:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:Out:Box03:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box04:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box04:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box01:Out:Box02:In
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.2 BBS BlackBox Script
+# - /Users/davila/Creatis/All2/creatools_source/crea/appli/creaNewProject/NewProject/bbtk_mySamplePackage_PKG/bbs/appli/Sample_BoxVtkPipeline.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include mySamplePackage
+include vtk
+include creaMaracasVisu
+include wx
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new mySampleBoxWithVTK Box00
+ set Box00.Lower 1000
+ set Box00.Upper 2000
+
+new LoadHola Box01
+
+new ViewerNV Box02
+ set Box02.nTypeView "0"
+
+new ViewerNV Box03
+ set Box03.nTypeView "0"
+
+new LayoutSplit Box04
+ set Box04.Orientation H
+
+
+connect Box01.Out Box00.In
+connect Box00.Out Box03.In
+connect Box02.Widget Box04.Widget1
+connect Box03.Widget Box04.Widget2
+connect Box01.Out Box02.In
+
+exec Box04
// (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;
+
+ myVtkPipeline.SetImage( bbGetInputIn() );
+ myVtkPipeline.SetThresholdBetween( bbGetInputLower() , bbGetInputUpper() );
+ myVtkPipeline.Execute();
+ bbSetOutputOut( myVtkPipeline.GetResult() );
}
#include "bbtkAtomicBlackBox.h"
#include "iostream"
+#include <vtkImageData.h>
+#include "myFierceClass3vtkPipeline.h"
+
namespace bbmySamplePackage
{
{
BBTK_BLACK_BOX_INTERFACE(mySampleBoxWithVTK,bbtk::AtomicBlackBox);
- BBTK_DECLARE_INPUT(In,double);
- BBTK_DECLARE_OUTPUT(Out,double);
+ BBTK_DECLARE_INPUT(In,vtkImageData*);
+ BBTK_DECLARE_INPUT(Lower,double);
+ BBTK_DECLARE_INPUT(Upper,double);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
BBTK_PROCESS(Process);
void Process();
+ myFierceClass3vtkPipeline myVtkPipeline;
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(mySampleBoxWithVTK,bbtk::AtomicBlackBox);
BBTK_NAME("mySampleBoxWithVTK");
-BBTK_AUTHOR("_author_");
-BBTK_DESCRIPTION("_description_");
-BBTK_CATEGORY("");
-BBTK_INPUT(mySampleBoxWithVTK,In,"First input",double,"");
-BBTK_OUTPUT(mySampleBoxWithVTK,Out,"First output",double,"");
+BBTK_AUTHOR("Info-Dev");
+BBTK_DESCRIPTION("vtk pipeline example threshold + gaussian smooth");
+BBTK_CATEGORY("filter");
+BBTK_INPUT(mySampleBoxWithVTK,In,"Input image",vtkImageData*,"");
+BBTK_INPUT(mySampleBoxWithVTK,Lower,"lower threshold",double,"");
+BBTK_INPUT(mySampleBoxWithVTK,Upper,"upper threshold",double,"");
+BBTK_OUTPUT(mySampleBoxWithVTK,Out,"Output image",vtkImageData*,"");
BBTK_END_DESCRIBE_BLACK_BOX(mySampleBoxWithVTK);
}
class /*CREA_EXPORT*/ myFierceClass2
{
public :
- myFierceClass2() : X(0.0), Y(0.0), Percent(0.0) {};
+ myFierceClass2() : X(0.0), Y(0.0), Result(0.0) {};
myFierceClass2(int a, int b) : X (a), Y(b) {};
~myFierceClass2(){};
void SetX (double x);
}
-myFierceClass3vtkPipeline::myFierceClass3vtkPipeline()
+myFierceClass3vtkPipeline::~myFierceClass3vtkPipeline()
{
filterThreshold->Delete();
filterGaussian->Delete();
{
public :
myFierceClass3vtkPipeline();
- myFierceClass3vtkPipeline();
+ ~myFierceClass3vtkPipeline();
void SetImage(vtkImageData * img);
void SetThresholdBetween(double l,double u);
void Execute();