]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkImageGaussianSmooth2.cxx
#3499 boxes ImageGaussianSmooth2 MarchingCubes2
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkImageGaussianSmooth2.cxx
index 0d9040b84c9dbcd479175a8f5bef3584288a5485..4998bf90b5a673b7d1484c7b78142754aaf23720 100644 (file)
@@ -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();