#include "bbcreaVtkImageContinuousErode3D.h" #include "bbcreaVtkPackage.h" namespace bbcreaVtk { BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageContinuousErode3D) BBTK_BLACK_BOX_IMPLEMENTATION(ImageContinuousErode3D,bbtk::AtomicBlackBox); void ImageContinuousErode3D::Process() { vtkImageData* result = erodeFilterRecursive(bbGetInputImage(), bbGetInputRepetitions(), bbGetInputX(),bbGetInputY(),bbGetInputZ()); bbSetOutputOut(result); } vtkImageData* ImageContinuousErode3D::erodeFilterRecursive(vtkImageData* image, int repetitions, double x, double y, double z) { vtkImageContinuousErode3D *erodeFilter = vtkImageContinuousErode3D ::New(); erodeFilter->SetInput (image); erodeFilter->SetKernelSize(x, y, z); erodeFilter->Modified(); erodeFilter->Update(); vtkImageData* resultRec; if(repetitions == 0) { resultRec = erodeFilter->GetOutput(); return resultRec; } else { vtkImageData* resultRec = erodeFilterRecursive(erodeFilter->GetOutput(), (repetitions-1), x, y, z); } } void ImageContinuousErode3D::bbUserSetDefaultValues() { } //===== // 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 ImageContinuousErode3D::bbUserInitializeProcessing() { } //===== // 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 ImageContinuousErode3D::bbUserFinalizeProcessing() { } } // EO namespace bbcreaVtk