]> Creatis software - clitk.git/blobdiff - common/vvImage.cxx
used vtksmartpointer for vtkimagedata
[clitk.git] / common / vvImage.cxx
index 4675cf5b661453428bd561d81bbc623c75be092c..821de16ebb35c34067b2488ba93be5161ba9599f 100644 (file)
@@ -296,7 +296,7 @@ void vvImage::UpdateReslice()
 //--------------------------------------------------------------------
 vtkImageData * CopyAndCastToFloatFrom(vtkImageData * input)
 {
-  vtkImageData * p = vtkImageData::New();
+  vtkSmartPointer<vtkImageData>  p = vtkSmartPointer<vtkImageData>::New();
   p->SetExtent(input->GetExtent ()); // Only first ! could not be 4D
   p->SetScalarTypeToFloat();
   p->AllocateScalars();