}
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);
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/ctorres/work/creatools/creainstall/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/BaseViewerInfo.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:BaseViewerInfo
+PACKAGENAME:toolsbbtk
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+widget
+-4.241406:-138.577542:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:2
+COMPLEX_PORT
+Image
+-85.916642:51.532520:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+TitleAtribute
+38.925088:53.676472:-900.000000
+FIN_COMPLEX_PORT
+BOXES:6
+BOX
+toolsbbtk:SaveMHD-Button:Box00
+ISEXEC:FALSE
+-147.441101:-6.241300:-900.000000
+-101.866101:-16.241300:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+-42.571926:-8.714791:-900.000000
+18.068074:-18.714791:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:Box03
+ISEXEC:FALSE
+-123.552316:-70.325491:-900.000000
+-65.992316:-80.325491:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box04
+ISEXEC:FALSE
+-8.153133:-99.950253:-900.000000
+37.421867:-109.950253:-900.000000
+PORT
+Orientation:"h"
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box09
+ISEXEC:FALSE
+-91.353292:33.000764:-900.000000
+-20.178292:23.000764:-900.000000
+FIN_BOX
+BOX
+toolsbbtk:ImageVtkPropertiesWidget:Box10
+ISEXEC:FALSE
+-102.944756:-25.781758:-900.000000
+-31.769756:-35.781758:-900.000000
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+Box00:Widget:Box03:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box04:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box04:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Image:Image:Box09:In
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box00:In
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box10:in
+NumberOfControlPoints:0
+CONNECTION
+Box10:widget:Box03:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box09:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+TitleAtribute:TitleAtribute:Box04:WinTitle
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/ctorres/work/creatools/creainstall/creatools_source/bbtk/packages/toolsbbtk/bbs/boxes/BaseViewerInfo.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include toolsbbtk
+include creaMaracasVisu
+include wx
+include vtk
+
+define BaseViewerInfo toolsbbtk
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new SaveMHD-Button Box00
+
+new ViewerNV Box02
+
+new LayoutTab Box03
+
+new LayoutSplit Box04
+ set Box04.Orientation "h"
+
+new vtkImageDataPointerRelay Box09
+
+new ImageVtkPropertiesWidget Box10
+
+
+connect Box00.Widget Box03.Widget1
+connect Box02.Widget Box04.Widget2
+connect Box03.Widget Box04.Widget1
+connect Box09.Out Box00.In
+connect Box09.Out Box10.in
+connect Box10.widget Box03.Widget2
+connect Box09.Out Box02.In
+
+# Complex input ports
+input Image Box09.In " "
+input TitleAtribute Box04.WinTitle " "
+
+# Complex output ports
+output widget Box04.Widget " "
+
+
+endefine
--- /dev/null
+# ----------------------------------
+# - 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:<VOID>
+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
--- /dev/null
+# ----------------------------------
+# - 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 "<VOID>"
+
+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
void ConcatImages::Process()
{
int dim[3];
+ int curDim[3];
int nbComponents;
int scalarType;
int nb = (unsigned int)bbGetInputIn().size();
- int consistentNb(nb);
+// int consistentNb(nb);
+ int newSizeZ;
if (nb == 0) {
// ??? JPR
}
bbGetInputIn()[0]->GetDimensions(dim);
- if (dim[2] > 1 || nb == 1) // dim[2] > 1 : Hopeless for vtk : the first file contains already a 3D object
+ if ( nb == 1) // dim[2] > 1 : Hopeless for vtk : the first file contains already a 3D object
// nb == 1 : only one image, nothing to do.
{
mConcat->Delete();
mConcat = bbGetInputIn()[0];
//mConcat->PrintSelf(std::cout, vtkIndent(2));
- }
- else
- {
+ } else {
// We suppose *all* the images within the directory are consistent (same sizeS, same pixel Type?...)
vtkImageData * firstImage = bbGetInputIn()[0];
mConcat->SetSpacing(firstImage->GetSpacing());
- firstImage->GetDimensions(dim);
+ firstImage->GetDimensions(dim);
+ newSizeZ=0;
// brute way to perform an ultra-mini consistency check :
// First image is supposed to be the reference image,
// any unconsistent image is just discarted...
for(int i=0; i<nb; i++)
{
- if ( !CheckConsistency(firstImage, dim, nbComponents, scalarType))
- consistentNb--;
- }
- dim[2]=consistentNb;
+//EED 2013 oct 29
+//EED if ( !CheckConsistency(firstImage, dim, nbComponents, scalarType))
+//EED consistentNb--;
+
+ if ( CheckConsistency(bbGetInputIn()[i], dim, nbComponents, scalarType))
+ {
+ bbGetInputIn()[i]->GetDimensions(curDim);
+ newSizeZ = newSizeZ + curDim[2];
+ } // if
+
+ } // for
+
+ dim[2]=newSizeZ;
+
+
mConcat->SetDimensions(dim);
mConcat->SetExtent(0, dim[0]-1, 0, dim[1]-1, 0, dim[2]-1);
mConcat->AllocateScalars();
mConcat->Update();
- int index_image, index_lignes, index_colonnes, index_components;
-
+ int index_image;
+
+ int blocksize;
+ int scalarSize=bbGetInputIn()[0]->GetScalarSize();
+ char *pImage = (char*)mConcat->GetScalarPointer();
+ char *sourcePointer;
+
+//EED int index_lignes, index_colonnes, index_components;
+
+
for(index_image=0; index_image<nb; index_image++)
{
if (!CheckConsistency(bbGetInputIn()[index_image], dim, nbComponents, scalarType))
- continue; // discard unconsistent image !
- for(index_lignes=0; index_lignes<dim[0];index_lignes++)
- {
- for(index_colonnes=0; index_colonnes<dim[1];index_colonnes++)
- {
- for(index_components=0; index_components<nbComponents;index_components++)
- {
- mConcat->SetScalarComponentFromDouble(index_lignes, index_colonnes, index_image, index_components,(bbGetInputIn()[index_image])->GetScalarComponentAsDouble(index_colonnes,index_lignes,0,index_components));
- }
- }
- }
- }
- }
+ {
+ continue; // discard unconsistent image !
+ }
+ bbGetInputIn()[index_image]->GetDimensions(curDim);
+ blocksize = curDim[0]*curDim[1]*curDim[2]*nbComponents*scalarSize;
+ sourcePointer = (char*)bbGetInputIn()[index_image]->GetScalarPointer();
+ memcpy(pImage, sourcePointer,blocksize);
+ pImage = pImage+blocksize;
+
+//EED 2013 oct 29
+//EED for(index_lignes=0; index_lignes<dim[0];index_lignes++)
+//EED {
+//EED for(index_colonnes=0; index_colonnes<dim[1];index_colonnes++)
+//EED {
+//EED for(index_components=0; index_components<nbComponents;index_components++)
+//EED {
+//EED mConcat->SetScalarComponentFromDouble(index_lignes, index_colonnes, index_image, index_components,(bbGetInputIn()[index_image])->GetScalarComponentAsDouble(index_colonnes,index_lignes,0,index_components));
+//EED } // components
+//EED } // colonnes
+//EED } // lignes
+
+
+ } // if CheckConsistency
+ } /// for index_image
+
// Devrait etre dans bbUserFinalizeProcessing() ? On n'y entre jamais // JPR
bbSetOutputOut(mConcat);
}
assert (curImage);
if (scalarType != curImage->GetScalarType( ) )
+ {
return false;
-
+ }
+
if (nbComponents != curImage->GetNumberOfScalarComponents() )
+ {
return false;
-
+ }
+
int curDim[3];
curImage->GetDimensions(curDim);
if ( (curDim[0] =! dim[0]) || (curDim[1] =! dim[1]) )
+ {
return false;
+ }
return true;
}
--- /dev/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)
+//=====
+#include "bbvtkGetVtkImageVectorSize.h"
+#include "bbvtkPackage.h"
+
+namespace bbvtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,GetVtkImageVectorSize)
+BBTK_BLACK_BOX_IMPLEMENTATION(GetVtkImageVectorSize,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 GetVtkImageVectorSize::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')
+
+ bbSetOutputVectorSize( bbGetInputIn().size() );
+
+}
+//=====
+// 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 GetVtkImageVectorSize::bbUserSetDefaultValues()
+{
+
+// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
+// Here we initialize the input 'In' to 0
+
+// bbSetInputIn(0);
+
+}
+//=====
+// 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 GetVtkImageVectorSize::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 GetVtkImageVectorSize::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbvtk
+
+
--- /dev/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)
+//=====
+#ifndef __bbvtkGetVtkImageVectorSize_h_INCLUDED__
+#define __bbvtkGetVtkImageVectorSize_h_INCLUDED__
+#include "bbvtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include "vtkImageData.h"
+
+namespace bbvtk
+{
+
+class bbvtk_EXPORT GetVtkImageVectorSize
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(GetVtkImageVectorSize,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,std::vector<vtkImageData*>);
+ BBTK_DECLARE_OUTPUT(VectorSize,int);
+ 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(GetVtkImageVectorSize,bbtk::AtomicBlackBox);
+BBTK_NAME("GetVtkImageVectorSize");
+BBTK_AUTHOR("Eduardo DAVILA");
+BBTK_DESCRIPTION("eduardo.davila@creatis.insa-lyon.fr -");
+BBTK_CATEGORY("std");
+
+ BBTK_INPUT(GetVtkImageVectorSize,In,"vtkImageData std::vector",std::vector<vtkImageData*>,"");
+
+ BBTK_OUTPUT(GetVtkImageVectorSize,VectorSize,"Size of the vtkImageData vector",int,"");
+
+BBTK_END_DESCRIBE_BLACK_BOX(GetVtkImageVectorSize);
+//=====
+// 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 // __bbvtkGetVtkImageVectorSize_h_INCLUDED__
+
--- /dev/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)
+//=====
+#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
+
+
--- /dev/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)
+//=====
+#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__
+
--- /dev/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)
+//=====
+#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
+
+
--- /dev/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)
+//=====
+#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__
+
ope->SetInput1((vtkDataObject*)bbGetInputIn1());
- ope->SetConstantK(bbGetInputInConstant());
- ope->SetConstantC(bbGetInputInConstant());
+ ope->SetConstantK( bbGetInputInConstant() );
+// ope->SetConstantC(bbGetInputInConstant());
switch (bbGetInputOperation())
{
break;
case 1:
-//EED Borrame crearPredeterminado();
- ope->SetInput2((vtkDataSet*) constante);
- ope->SetOperationToSubtract();
+ ope->SetConstantK( -1.0 * bbGetInputInConstant() );
+ ope->SetOperationToAddConstant();
break;
case 2:
- ope->SetInput2((vtkDataSet*) constante);
- ope->SetOperationToMultiply();
+ ope->SetOperationToMultiplyByK();
+printf("EED UnaryOperations::Process() 2 \n");
break;
case 3:
-
- ope->SetOperationToDivide();
+ ope->SetConstantK( 1.0/bbGetInputInConstant() );
+ ope->SetOperationToMultiplyByK();
+printf("EED UnaryOperations::Process() 3 \n");
break;
case 4:
ope->SetOperationToInvert();
break;
- case 9:
- ope->SetOperationToAbsoluteValue();
- break;
case 5:
ope->SetOperationToSin();
ope->SetOperationToLog();
break;
+ case 9:
+ ope->SetOperationToAbsoluteValue();
+ break;
/* EED 21Juin 2011 Borrame
--- /dev/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)
+//=====
+#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
+
+
--- /dev/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)
+//=====
+#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__
+
--- /dev/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)
+//=====
+#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
+
+
--- /dev/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)
+//=====
+#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__
+
--- /dev/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)
+//=====
+#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
+
+
--- /dev/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)
+//=====
+#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__
+