2 #include "bbcreaVtkImageContinuousErode3D.h"
3 #include "bbcreaVtkPackage.h"
5 #include "vtkImageContinuousErode3D.h"
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageContinuousErode3D)
12 BBTK_BLACK_BOX_IMPLEMENTATION(ImageContinuousErode3D,bbtk::AtomicBlackBox);
14 void ImageContinuousErode3D::Process()
16 if (bbGetInputImage()!=NULL)
18 vtkImageData* result = erodeFilterRecursive(bbGetInputImage(), bbGetInputRepetitions(), bbGetInputX(),bbGetInputY(),bbGetInputZ());
19 bbSetOutputOut(result);
25 vtkImageData* ImageContinuousErode3D::erodeFilterRecursive(vtkImageData* image, int repetitions, double x, double y, double z)
27 printf("EED ImageContinuousErode3D::erodeFilterRecursive 1\n");
28 vtkImageContinuousErode3D *erodeFilter = vtkImageContinuousErode3D ::New();
29 //EED 2017-01-01 Migration VTK7
30 #if VTK_MAJOR_VERSION <= 5
31 erodeFilter->SetInput (image);
33 erodeFilter->SetInputData(image);
35 erodeFilter->SetKernelSize(x, y, z);
36 erodeFilter->Modified();
37 printf("EED ImageContinuousErode3D::erodeFilterRecursive 2\n");
38 erodeFilter->Update();
39 printf("EED ImageContinuousErode3D::erodeFilterRecursive 3\n");
42 printf("EED ImageContinuousErode3D::erodeFilterRecursive 4\n");
43 return erodeFilter->GetOutput();
45 return erodeFilterRecursive(erodeFilter->GetOutput(), repetitions-1, x, y, z);
49 void ImageContinuousErode3D::bbUserSetDefaultValues()
54 bbSetInputRepetitions(0);
57 // 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)
59 void ImageContinuousErode3D::bbUserInitializeProcessing()
63 // 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)
65 void ImageContinuousErode3D::bbUserFinalizeProcessing()
70 // EO namespace bbcreaVtk