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();
if ( (bbGetInputActive()==true) && (bbGetInputIn()!=NULL) )
{
- if (marchingcubes==NULL) { marchingcubes=vtkMarchingCubes::New(); }
+ if (marchingcubes!=NULL)
+ {
+ marchingcubes->Delete();
+ marchingcubes = NULL;
+ }
+ marchingcubes=vtkMarchingCubes::New();
marchingcubes->SetInputData( bbGetInputIn() );
marchingcubes->SetValue(0, bbGetInputValue() );