From f673a2b0d4521e9ca1ad1a08e2dd3a6614553fe3 Mon Sep 17 00:00:00 2001 From: srit Date: Tue, 31 Aug 2010 11:15:13 +0000 Subject: [PATCH] Rolled back to version without smart pointers for vtkImageData. --- common/vvImage.cxx | 8 +++----- common/vvImage.h | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/common/vvImage.cxx b/common/vvImage.cxx index 53346a3..4675cf5 100644 --- a/common/vvImage.cxx +++ b/common/vvImage.cxx @@ -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& vvImage::GetVTKImages() //-------------------------------------------------------------------- //-------------------------------------------------------------------- -vtkSmartPointer vvImage::GetFirstVTKImageData() +vtkImageData* vvImage::GetFirstVTKImageData() { return mVtkImages[0]; } @@ -298,7 +296,7 @@ void vvImage::UpdateReslice() //-------------------------------------------------------------------- vtkImageData * CopyAndCastToFloatFrom(vtkImageData * input) { - vtkSmartPointer p = vtkSmartPointer::New(); + vtkImageData * p = vtkImageData::New(); p->SetExtent(input->GetExtent ()); // Only first ! could not be 4D p->SetScalarTypeToFloat(); p->AllocateScalars(); diff --git a/common/vvImage.h b/common/vvImage.h index 29573cd..07987c7 100644 --- a/common/vvImage.h +++ b/common/vvImage.h @@ -42,7 +42,7 @@ public : void SetImage(std::vector images); void AddImage(vtkImageData* image); const std::vector& GetVTKImages(); - vtkSmartPointer GetFirstVTKImageData(); + vtkImageData* GetFirstVTKImageData(); int GetNumberOfDimensions() const; int GetNumberOfSpatialDimensions(); void GetScalarRange(double* range); -- 2.47.1