From: Eduardo DAVILA Date: Wed, 2 Oct 2013 05:42:24 +0000 (+0200) Subject: 2150 BBTK Feature New Normal New boxes in vtk package: MaskPoint ProbeFilter DataSetT... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6b52877d9aaa3f4b8d2eeff0b38e246adbd5ccf6;p=bbtk.git 2150 BBTK Feature New Normal New boxes in vtk package: MaskPoint ProbeFilter DataSetToDataObject ImageDataToDataObject PolyDataToDataObject --- diff --git a/packages/std/src/bbstdMagicBox.cxx b/packages/std/src/bbstdMagicBox.cxx index d8205fb..0bf4ed6 100644 --- a/packages/std/src/bbstdMagicBox.cxx +++ b/packages/std/src/bbstdMagicBox.cxx @@ -53,7 +53,9 @@ namespace bbstd } void MagicBox::DoProcess() { +printf("EED MagicBox::DoProcess Start\n"); bbSetOutputOut( bbGetInputIn() ); +printf("EED MagicBox::DoProcess End\n"); } BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,MagicBox); diff --git a/packages/vtk/bbs/boxes/MaskPoints_Interface.bbg b/packages/vtk/bbs/boxes/MaskPoints_Interface.bbg new file mode 100644 index 0000000..76982b7 --- /dev/null +++ b/packages/vtk/bbs/boxes/MaskPoints_Interface.bbg @@ -0,0 +1,76 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBG BlackBox Diagram file +# - /home/davila/Creatis/All/creatools_source/bbtk/packages/vtk/bbs/boxes/MaskPoints_Interface.bbg +# ---------------------------------- + +APP_START +CATEGORY: +DESCRIPTION:Description ?? +AUTHOR:Author ?? +COMPLEXBOX:TRUE +COMPLEXBOXNAME:MaskPoints_Interface +PACKAGENAME:vtk +COMPLEXOUTPUTS:3 +COMPLEX_PORT +Ratio +-57.416280:-31.995332:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +widget +-33.623274:-32.997143:-900.000000 +FIN_COMPLEX_PORT +COMPLEX_PORT +boxChange +-76.951591:-32.120558:-900.000000 +FIN_COMPLEX_PORT +COMPLEXINPUTS:0 +BOXES:3 +BOX +wx:Slider:Box00 +ISEXEC:FALSE +-46.396362:50.779284:-900.000000 +5.003638:40.779284:-900.000000 +PORT +In:"100" +PORT +Label:"true" +PORT +Max:"5000" +PORT +Min:"1" +PORT +ReactiveOnTrack:"true" +PORT +Title:"Ratio" +FIN_BOX +BOX +wx:LayoutLine:Box01 +ISEXEC:FALSE +-37.004386:28.113315:-900.000000 +20.555614:18.113315:-900.000000 +PORT +WinTitle:"MaskPoint controls" +FIN_BOX +BOX +wx:LayoutTab:Box02 +ISEXEC:FALSE +-37.129612:3.944630:-900.000000 +20.430388:-6.055370:-900.000000 +FIN_BOX +CONNECTIONS:5 +CONNECTION +Box01:Widget:Box02:Widget1 +NumberOfControlPoints:0 +CONNECTION +Box00:Out:Ratio:Ratio +NumberOfControlPoints:0 +CONNECTION +Box02:Widget:widget:widget +NumberOfControlPoints:0 +CONNECTION +Box00:BoxChange:boxChange:boxChange +NumberOfControlPoints:0 +CONNECTION +Box00:Widget:Box01:Widget1 +NumberOfControlPoints:0 +APP_END diff --git a/packages/vtk/bbs/boxes/MaskPoints_Interface.bbs b/packages/vtk/bbs/boxes/MaskPoints_Interface.bbs new file mode 100644 index 0000000..9669445 --- /dev/null +++ b/packages/vtk/bbs/boxes/MaskPoints_Interface.bbs @@ -0,0 +1,42 @@ +# ---------------------------------- +# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) +# - /home/davila/Creatis/All/creatools_source/bbtk/packages/vtk/bbs/boxes/MaskPoints_Interface.bbs +# ---------------------------------- + +include std +include itkvtk +include wx + +define MaskPoints_Interface vtk + +author "Author ??" +description "Description ??" + +category "" + +new Slider Box00 + set Box00.In "100" + set Box00.Label "true" + set Box00.Max "5000" + set Box00.Min "1" + set Box00.ReactiveOnTrack "true" + set Box00.Title "Ratio" + +new LayoutLine Box01 + set Box01.WinTitle "MaskPoint controls" + +new LayoutTab Box02 + + +connect Box01.Widget Box02.Widget1 +connect Box00.Widget Box01.Widget1 + +# Complex input ports + +# Complex output ports +output Ratio Box00.Out " " +output widget Box02.Widget " " +output boxChange Box00.BoxChange " " + + +endefine diff --git a/packages/vtk/src/bbvtkMaskPoint.cxx b/packages/vtk/src/bbvtkMaskPoint.cxx new file mode 100644 index 0000000..c192648 --- /dev/null +++ b/packages/vtk/src/bbvtkMaskPoint.cxx @@ -0,0 +1,80 @@ +//===== +// 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 "bbvtkMaskPoint.h" +#include "bbvtkPackage.h" +namespace bbvtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,MaskPoint) +BBTK_BLACK_BOX_IMPLEMENTATION(MaskPoint,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 MaskPoint::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') + +printf("EED MaskPoint::Process Start\n"); + maskpoints->SetInput( bbGetInputIn() ); + maskpoints->SetOnRatio( bbGetInputRatio() ); + maskpoints->RandomModeOn(); + maskpoints->SetMaximumNumberOfPoints(5000); + maskpoints->Update(); + bbSetOutputOut( maskpoints->GetOutput() ); +printf("EED MaskPoint::Process End\n"); +} +//===== +// 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 MaskPoint::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetInputIn(NULL); + 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 MaskPoint::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + maskpoints = vtkMaskPoints::New(); + + +} +//===== +// 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 MaskPoint::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + maskpoints->Delete(); +} + +} // EO namespace bbvtk + + diff --git a/packages/vtk/src/bbvtkMaskPoint.h b/packages/vtk/src/bbvtkMaskPoint.h new file mode 100644 index 0000000..6e0d094 --- /dev/null +++ b/packages/vtk/src/bbvtkMaskPoint.h @@ -0,0 +1,56 @@ +//===== +// 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 __bbvtkMaskPoint_h_INCLUDED__ +#define __bbvtkMaskPoint_h_INCLUDED__ +#include "bbvtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +#include "vtkImageData.h" +#include "vtkMaskPoints.h" +#include "vtkPolyData.h" + + +namespace bbvtk +{ + +class bbvtk_EXPORT MaskPoint + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(MaskPoint,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(Ratio,int); + BBTK_DECLARE_OUTPUT(Out,vtkPolyData*); + BBTK_PROCESS(Process); + void Process(); + + private: + vtkMaskPoints *maskpoints; + +//===== +// 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(MaskPoint,bbtk::AtomicBlackBox); +BBTK_NAME("MaskPoint"); +BBTK_AUTHOR("ED at InfoDev Creatis"); +BBTK_DESCRIPTION("vtkMaskPoint"); +BBTK_CATEGORY("empty"); + BBTK_INPUT(MaskPoint,In,"vtkImageData",vtkImageData*,""); + BBTK_INPUT(MaskPoint,Ratio,"Ratio",int,""); + BBTK_OUTPUT(MaskPoint,Out,"vtkPolyData",vtkPolyData*,""); +BBTK_END_DESCRIBE_BLACK_BOX(MaskPoint); +//===== +// 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 bbvtk + +#endif // __bbvtkMaskPoint_h_INCLUDED__ + diff --git a/packages/vtk/src/bbvtkProbeFilter.cxx b/packages/vtk/src/bbvtkProbeFilter.cxx new file mode 100644 index 0000000..4007cfb --- /dev/null +++ b/packages/vtk/src/bbvtkProbeFilter.cxx @@ -0,0 +1,84 @@ +//===== +// 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 "bbvtkProbeFilter.h" +#include "bbvtkPackage.h" +namespace bbvtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,ProbeFilter) +BBTK_BLACK_BOX_IMPLEMENTATION(ProbeFilter,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 ProbeFilter::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') + +printf("EED ProbeFilter::Process() Start\n"); + + + _probefilter->SetSource( bbGetInputSource() ); + _probefilter->SetInput( bbGetInputInput() ); + _probefilter->Update(); + bbSetOutputOut( _probefilter->GetOutput() ); + +printf("EED ProbeFilter::Process() End\n"); + +} +//===== +// 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 ProbeFilter::bbUserSetDefaultValues() +{ +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + +// bbSetInputInput(NULL); +// bbSetInputSource(NULL); +// 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 ProbeFilter::bbUserInitializeProcessing() +{ + +// THE INITIALIZATION METHOD BODY : +// Here does nothing +// but this is where you should allocate the internal/output pointers +// if any + + _probefilter = vtkProbeFilter::New(); + + +} +//===== +// 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 ProbeFilter::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + + _probefilter->Delete(); + +} +} +// EO namespace bbvtk + + diff --git a/packages/vtk/src/bbvtkProbeFilter.h b/packages/vtk/src/bbvtkProbeFilter.h new file mode 100644 index 0000000..53f1861 --- /dev/null +++ b/packages/vtk/src/bbvtkProbeFilter.h @@ -0,0 +1,54 @@ +//===== +// 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 __bbvtkProbeFilter_h_INCLUDED__ +#define __bbvtkProbeFilter_h_INCLUDED__ +#include "bbvtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +#include "vtkDataObject.h" +#include "vtkDataSet.h" +#include "vtkProbeFilter.h" + +namespace bbvtk +{ + +class bbvtk_EXPORT ProbeFilter + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(ProbeFilter,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(Input,vtkDataObject*); + BBTK_DECLARE_INPUT(Source,vtkDataObject*); + BBTK_DECLARE_OUTPUT(Out,vtkDataSet*); + BBTK_PROCESS(Process); + void Process(); + + private: + vtkProbeFilter *_probefilter; +//===== +// 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(ProbeFilter,bbtk::AtomicBlackBox); +BBTK_NAME("ProbeFilter"); +BBTK_AUTHOR("ED at InfoDev Creatis"); +BBTK_DESCRIPTION("vtkProbeFilter"); +BBTK_CATEGORY("empty"); + BBTK_INPUT(ProbeFilter,Input,"Input (example:vtkPolyData The BBTK_adaptor vtkPolyData to vtkDataObject exists.)",vtkDataObject*,""); + BBTK_INPUT(ProbeFilter,Source,"Source (example:vtkPolyData The BBTK_adaptor vtkPolyData to vtkDataObject exists.)",vtkDataObject*,""); + BBTK_OUTPUT(ProbeFilter,Out,"First output",vtkDataSet*,""); +BBTK_END_DESCRIBE_BLACK_BOX(ProbeFilter); +//===== +// 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 bbvtk + +#endif // __bbvtkProbeFilter_h_INCLUDED__ + diff --git a/packages/vtk/src/bbvtkvtkDataSetTovtkDataObject.cxx b/packages/vtk/src/bbvtkvtkDataSetTovtkDataObject.cxx new file mode 100644 index 0000000..4ebd199 --- /dev/null +++ b/packages/vtk/src/bbvtkvtkDataSetTovtkDataObject.cxx @@ -0,0 +1,70 @@ +//===== +// 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 "bbvtkvtkDataSetTovtkDataObject.h" +#include "bbvtkPackage.h" +namespace bbvtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,vtkDataSetTovtkDataObject) +BBTK_BLACK_BOX_IMPLEMENTATION(vtkDataSetTovtkDataObject,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 vtkDataSetTovtkDataObject::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() ); + +} +//===== +// 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 vtkDataSetTovtkDataObject::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetInputIn(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 vtkDataSetTovtkDataObject::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 vtkDataSetTovtkDataObject::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbvtk + + diff --git a/packages/vtk/src/bbvtkvtkDataSetTovtkDataObject.h b/packages/vtk/src/bbvtkvtkDataSetTovtkDataObject.h new file mode 100644 index 0000000..069f765 --- /dev/null +++ b/packages/vtk/src/bbvtkvtkDataSetTovtkDataObject.h @@ -0,0 +1,52 @@ +//===== +// 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 __bbvtkvtkDataSetTovtkDataObject_h_INCLUDED__ +#define __bbvtkvtkDataSetTovtkDataObject_h_INCLUDED__ +#include "bbvtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +#include "vtkDataObject.h" +#include "vtkDataSet.h" + +namespace bbvtk +{ + +class bbvtk_EXPORT vtkDataSetTovtkDataObject + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(vtkDataSetTovtkDataObject,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,vtkDataSet*); + BBTK_DECLARE_OUTPUT(Out,vtkDataObject*); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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(vtkDataSetTovtkDataObject,bbtk::AtomicBlackBox); +BBTK_NAME("vtkDataSetTovtkDataObject"); +BBTK_AUTHOR("Davila at InfoDev Creatis"); +BBTK_DESCRIPTION("vtk adaptor (vtk Object herency)"); +BBTK_CATEGORY("adaptor"); + + BBTK_DEFAULT_ADAPTOR(); + + BBTK_INPUT(vtkDataSetTovtkDataObject,In,"The vtk object vtkDataSet*",vtkDataSet*,""); + BBTK_OUTPUT(vtkDataSetTovtkDataObject,Out,"The vtk object vtkDataObject*",vtkDataObject*,""); + +BBTK_END_DESCRIBE_BLACK_BOX(vtkDataSetTovtkDataObject); +//===== +// 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 bbvtk + +#endif // __bbvtkvtkDataSetTovtkDataObject_h_INCLUDED__ + diff --git a/packages/vtk/src/bbvtkvtkImageDataToVtkDataObject.cxx b/packages/vtk/src/bbvtkvtkImageDataToVtkDataObject.cxx new file mode 100644 index 0000000..7ee3dd5 --- /dev/null +++ b/packages/vtk/src/bbvtkvtkImageDataToVtkDataObject.cxx @@ -0,0 +1,70 @@ +//===== +// 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 "bbvtkvtkImageDataToVtkDataObject.h" +#include "bbvtkPackage.h" +namespace bbvtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,vtkImageDataToVtkDataObject) +BBTK_BLACK_BOX_IMPLEMENTATION(vtkImageDataToVtkDataObject,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 vtkImageDataToVtkDataObject::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() ); + +} +//===== +// 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 vtkImageDataToVtkDataObject::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetInputIn(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 vtkImageDataToVtkDataObject::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 vtkImageDataToVtkDataObject::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbvtk + + diff --git a/packages/vtk/src/bbvtkvtkImageDataToVtkDataObject.h b/packages/vtk/src/bbvtkvtkImageDataToVtkDataObject.h new file mode 100644 index 0000000..207218e --- /dev/null +++ b/packages/vtk/src/bbvtkvtkImageDataToVtkDataObject.h @@ -0,0 +1,52 @@ +//===== +// 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 __bbvtkvtkImageDataToVtkDataObject_h_INCLUDED__ +#define __bbvtkvtkImageDataToVtkDataObject_h_INCLUDED__ +#include "bbvtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +#include "vtkDataObject.h" +#include "vtkImageData.h" + +namespace bbvtk +{ + +class bbvtk_EXPORT vtkImageDataToVtkDataObject + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(vtkImageDataToVtkDataObject,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_OUTPUT(Out,vtkDataObject*); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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(vtkImageDataToVtkDataObject,bbtk::AtomicBlackBox); +BBTK_NAME("vtkImageDataToVtkDataObject"); +BBTK_AUTHOR("Davila at InfoDev Creatis"); +BBTK_DESCRIPTION("vtk adaptor (vtk Object herency)"); +BBTK_CATEGORY("empty"); + + BBTK_DEFAULT_ADAPTOR(); + + BBTK_INPUT(vtkImageDataToVtkDataObject,In,"the vtkobject vtkImageData*",vtkImageData*,""); + BBTK_OUTPUT(vtkImageDataToVtkDataObject,Out,"the vtk object vtkDataObject*",vtkDataObject*,""); + +BBTK_END_DESCRIBE_BLACK_BOX(vtkImageDataToVtkDataObject); +//===== +// 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 bbvtk + +#endif // __bbvtkvtkImageDataToVtkDataObject_h_INCLUDED__ + diff --git a/packages/vtk/src/bbvtkvtkPolyDataTovtkDataObject.cxx b/packages/vtk/src/bbvtkvtkPolyDataTovtkDataObject.cxx new file mode 100644 index 0000000..ac2579a --- /dev/null +++ b/packages/vtk/src/bbvtkvtkPolyDataTovtkDataObject.cxx @@ -0,0 +1,70 @@ +//===== +// 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 "bbvtkvtkPolyDataTovtkDataObject.h" +#include "bbvtkPackage.h" +namespace bbvtk +{ + +BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,vtkPolyDataTovtkDataObject) +BBTK_BLACK_BOX_IMPLEMENTATION(vtkPolyDataTovtkDataObject,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 vtkPolyDataTovtkDataObject::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() ); +} +//===== +// 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 vtkPolyDataTovtkDataObject::bbUserSetDefaultValues() +{ + +// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX +// Here we initialize the input 'In' to 0 + bbSetInputIn(NULL); + 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 vtkPolyDataTovtkDataObject::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 vtkPolyDataTovtkDataObject::bbUserFinalizeProcessing() +{ + +// THE FINALIZATION METHOD BODY : +// Here does nothing +// but this is where you should desallocate the internal/output pointers +// if any + +} +} +// EO namespace bbvtk + + diff --git a/packages/vtk/src/bbvtkvtkPolyDataTovtkDataObject.h b/packages/vtk/src/bbvtkvtkPolyDataTovtkDataObject.h new file mode 100644 index 0000000..1e91d49 --- /dev/null +++ b/packages/vtk/src/bbvtkvtkPolyDataTovtkDataObject.h @@ -0,0 +1,52 @@ +//===== +// 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 __bbvtkvtkPolyDataTovtkDataObject_h_INCLUDED__ +#define __bbvtkvtkPolyDataTovtkDataObject_h_INCLUDED__ +#include "bbvtk_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + +#include "vtkDataObject.h" +#include "vtkPolyData.h" + +namespace bbvtk +{ + +class bbvtk_EXPORT vtkPolyDataTovtkDataObject + : + public bbtk::AtomicBlackBox +{ + BBTK_BLACK_BOX_INTERFACE(vtkPolyDataTovtkDataObject,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,vtkPolyData*); + BBTK_DECLARE_OUTPUT(Out,vtkDataObject*); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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(vtkPolyDataTovtkDataObject,bbtk::AtomicBlackBox); +BBTK_NAME("vtkPolyDataTovtkDataObject"); +BBTK_AUTHOR("ED at InfoDev Creatis"); +BBTK_DESCRIPTION("vtkPolydata to vtkDataObject(class parrent)"); +BBTK_CATEGORY("empty"); + + BBTK_DEFAULT_ADAPTOR(); + + BBTK_INPUT(vtkPolyDataTovtkDataObject,In,"Input",vtkPolyData*,""); + BBTK_OUTPUT(vtkPolyDataTovtkDataObject,Out,"Output",vtkDataObject*,""); + +BBTK_END_DESCRIBE_BLACK_BOX(vtkPolyDataTovtkDataObject); +//===== +// 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 bbvtk + +#endif // __bbvtkvtkPolyDataTovtkDataObject_h_INCLUDED__ +