X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkImageGaussianSmooth2.cxx;h=4998bf90b5a673b7d1484c7b78142754aaf23720;hb=043ad5f6e44170fbd8e67868bdb6861e48a544b2;hp=0d9040b84c9dbcd479175a8f5bef3584288a5485;hpb=f65c6059e8f78f82537349d6467441c8993ef596;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkImageGaussianSmooth2.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkImageGaussianSmooth2.cxx index 0d9040b..4998bf9 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkImageGaussianSmooth2.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkImageGaussianSmooth2.cxx @@ -30,7 +30,12 @@ void ImageGaussianSmooth2::Process() if (bbGetInputIn()!=NULL) { - if (gaussiansmooth==NULL) { gaussiansmooth=vtkImageGaussianSmooth::New(); } + if (gaussiansmooth!=NULL) + { + gaussiansmooth->Delete(); + gaussiansmooth = NULL; + } + gaussiansmooth=vtkImageGaussianSmooth::New(); gaussiansmooth->SetInputData( bbGetInputIn() ); gaussiansmooth->SetStandardDeviation( bbGetInputStdDevX() , bbGetInputStdDevY() , bbGetInputStdDevZ() ); gaussiansmooth->Modified();