--- /dev/null
+
+#include "bbcreaVtkImageContinuousDilate3D.h"
+#include "bbcreaVtkPackage.h"
+namespace bbcreaVtk
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageContinuousDilate3D)
+BBTK_BLACK_BOX_IMPLEMENTATION(ImageContinuousDilate3D,bbtk::AtomicBlackBox);
+
+void ImageContinuousDilate3D::Process()
+{
+ vtkImageData* result = dilateFilterRecursive(bbGetInputImage(), bbGetInputRepetitions(), bbGetInputX(),bbGetInputY(),bbGetInputZ());
+ bbSetOutputOut(result);
+}
+
+vtkImageData* ImageContinuousDilate3D::dilateFilterRecursive(vtkImageData* image, int repetitions, double x, double y, double z)
+{
+ vtkImageContinuousDilate3D *dilateFilter = vtkImageContinuousDilate3D ::New();
+ dilateFilter->SetInput (image);
+ dilateFilter->SetKernelSize(x, y, z);
+ dilateFilter->Modified();
+ dilateFilter->Update();
+ vtkImageData* resultRec;
+ if(repetitions == 0)
+ {
+ resultRec = dilateFilter->GetOutput();
+ return resultRec;
+ }
+ else {
+ vtkImageData* resultRec = dilateFilterRecursive(dilateFilter->GetOutput(), (repetitions-1), x, y, z);
+ }
+}
+
+void ImageContinuousDilate3D::bbUserSetDefaultValues()
+{
+
+
+}
+
+void ImageContinuousDilate3D::bbUserInitializeProcessing()
+{
+
+
+}
+
+void ImageContinuousDilate3D::bbUserFinalizeProcessing()
+{
+
+// THE FINALIZATION METHOD BODY :
+// Here does nothing
+// but this is where you should desallocate the internal/output pointers
+// if any
+
+}
+}
+// EO namespace bbcreaVtk
+
+
--- /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 __bbcreaVtkImageContinuousDilate3D_h_INCLUDED__
+#define __bbcreaVtkImageContinuousDilate3D_h_INCLUDED__
+#include "bbcreaVtk_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+#include "vtkImageData.h"
+#include "vtkImageContinuousDilate3D.h"
+#include "vtkSmartPointer.h"
+
+namespace bbcreaVtk
+{
+
+class bbcreaVtk_EXPORT ImageContinuousDilate3D
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(ImageContinuousDilate3D,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(X,double);
+ BBTK_DECLARE_INPUT(Y,double);
+ BBTK_DECLARE_INPUT(Z,double);
+ BBTK_DECLARE_INPUT(Repetitions,int);
+ BBTK_DECLARE_INPUT(Image,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+ vtkImageData* dilateFilterRecursive(vtkImageData* image, int repetitions, double x, double y, double z);
+//=====
+// 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(ImageContinuousDilate3D,bbtk::AtomicBlackBox);
+BBTK_NAME("ImageContinuousDilate3D");
+BBTK_AUTHOR("Carlos Torres");
+BBTK_DESCRIPTION("No Description.");
+BBTK_CATEGORY("empty");
+BBTK_INPUT(ImageContinuousDilate3D,X,"X",double,"");
+BBTK_INPUT(ImageContinuousDilate3D,Y,"Y",double,"");
+BBTK_INPUT(ImageContinuousDilate3D,Z,"Z",double,"");
+BBTK_INPUT(ImageContinuousDilate3D,Repetitions,"Repetitions",int,"");
+BBTK_INPUT(ImageContinuousDilate3D,Image,"Image input",vtkImageData*,"");
+BBTK_OUTPUT(ImageContinuousDilate3D,Out,"Image output",vtkImageData*,"");
+BBTK_END_DESCRIBE_BLACK_BOX(ImageContinuousDilate3D);
+//=====
+// 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 bbcreaVtk
+
+#endif // __bbcreaVtkImageContinuousDilate3D_h_INCLUDED__
+