]> Creatis software - bbtk.git/commitdiff
#3158 BBTK Bug New Normal Create - Image Box Reset vtkImageData in Process
authorEduardo DAVILA <davila@localhost.localdomain>
Tue, 12 Dec 2017 22:12:58 +0000 (23:12 +0100)
committerEduardo DAVILA <davila@localhost.localdomain>
Tue, 12 Dec 2017 22:12:58 +0000 (23:12 +0100)
packages/vtk/src/bbvtkCreateImage.cxx

index 8940726e583c6a4db8f7bd65b424e890b2fc5413..c5f71b5fa96406085fd4901905d020c7d9025e90 100644 (file)
@@ -97,10 +97,11 @@ void CreateImage::Process()
                spc[2]=1;
        }
 //EED 2017-12-7
-       if (imageoutput==NULL) 
+       if (imageoutput!=NULL) 
        {
-               imageoutput = vtkImageData::New();
-       }
+               imageoutput->Delete();
+       }       
+       imageoutput = vtkImageData::New();
        imageoutput->Initialize();
        imageoutput->SetScalarType( outputformat );     
        imageoutput->SetSpacing( spc );