]> Creatis software - clitk.git/commitdiff
Rolled back to version without smart pointers for vtkImageData.
authorsrit <srit>
Tue, 31 Aug 2010 11:15:13 +0000 (11:15 +0000)
committersrit <srit>
Tue, 31 Aug 2010 11:15:13 +0000 (11:15 +0000)
common/vvImage.cxx
common/vvImage.h

index 53346a3ba7f0ceeadb208f6432715cb99f42a861..4675cf5b661453428bd561d81bbc623c75be092c 100644 (file)
@@ -58,10 +58,8 @@ vvImage::~vvImage()
 //--------------------------------------------------------------------
 void vvImage::Reset()
 {
-  for (unsigned int i = 0; i < mVtkImages.size(); i++) {  
+  for (unsigned int i = 0; i < mVtkImages.size(); i++)
     mVtkImageReslice[i]->GetInput()->Delete();
-    mVtkImageReslice[i]->Delete();
-  }
 
   mVtkImages.resize(0);
   mVtkImageReslice.resize(0);
@@ -236,7 +234,7 @@ const std::vector<vtkImageData*>& vvImage::GetVTKImages()
 //--------------------------------------------------------------------
 
 //--------------------------------------------------------------------
-vtkSmartPointer<vtkImageData> vvImage::GetFirstVTKImageData()
+vtkImageData* vvImage::GetFirstVTKImageData()
 {
   return mVtkImages[0];
 }
@@ -298,7 +296,7 @@ void vvImage::UpdateReslice()
 //--------------------------------------------------------------------
 vtkImageData * CopyAndCastToFloatFrom(vtkImageData * input)
 {
-  vtkSmartPointer<vtkImageData>  p = vtkSmartPointer<vtkImageData>::New();
+  vtkImageData * p = vtkImageData::New();
   p->SetExtent(input->GetExtent ()); // Only first ! could not be 4D
   p->SetScalarTypeToFloat();
   p->AllocateScalars();
index 29573cd029795f3cb7a4f3ab33b33fd9bcb36086..07987c78cda75b16c5d40d3c5f3949643dc083e8 100644 (file)
@@ -42,7 +42,7 @@ public :
   void SetImage(std::vector<vtkImageData*> images);
   void AddImage(vtkImageData* image);
   const std::vector<vtkImageData*>& GetVTKImages();
-  vtkSmartPointer<vtkImageData> GetFirstVTKImageData();
+  vtkImageData* GetFirstVTKImageData();
   int GetNumberOfDimensions() const;
   int GetNumberOfSpatialDimensions();
   void GetScalarRange(double* range);