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 vtkImageContinuousErode3D *erodeFilter = vtkImageContinuousErode3D ::New();
28 //EED 2017-01-01 Migration VTK7
29 #if VTK_MAJOR_VERSION <= 5
30 erodeFilter->SetInput (image);
32 erodeFilter->SetInputData(image);
34 erodeFilter->SetKernelSize(x, y, z);
35 erodeFilter->Modified();
36 erodeFilter->Update();
39 return erodeFilter->GetOutput();
41 return erodeFilterRecursive(erodeFilter->GetOutput(), repetitions-1, x, y, z);
45 void ImageContinuousErode3D::bbUserSetDefaultValues()
50 bbSetInputRepetitions(0);
53 // 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)
55 void ImageContinuousErode3D::bbUserInitializeProcessing()
59 // 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)
61 void ImageContinuousErode3D::bbUserFinalizeProcessing()
66 // EO namespace bbcreaVtk