From: srit Date: Tue, 31 Aug 2010 11:15:13 +0000 (+0000) Subject: Rolled back to version without smart pointers for vtkImageData. X-Git-Tag: v1.2.0~420 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f673a2b0d4521e9ca1ad1a08e2dd3a6614553fe3;p=clitk.git Rolled back to version without smart pointers for vtkImageData. --- 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);