]> Creatis software - clitk.git/commitdiff
Put mMesh in smart pointer
authorsrit <srit>
Fri, 25 Mar 2011 17:35:52 +0000 (17:35 +0000)
committersrit <srit>
Fri, 25 Mar 2011 17:35:52 +0000 (17:35 +0000)
common/clitkDicomRT_ROI.cxx
common/clitkDicomRT_ROI.h

index 48099e0dfa2eee6c924b7cf91d5ad719c1bfb7a5..0219b4aea9763c32cf05891630a2162fad38c2ef 100644 (file)
@@ -200,7 +200,9 @@ void clitk::DicomRT_ROI::ComputeMesh()
     append->AddInput(mListOfContours[i]->GetMesh());
   }
   append->Update();
-  mMesh = append->GetOutput();
+  mMesh = vtkSmartPointer<vtkPolyData>::New();
+  mMesh->DeepCopy(append->GetOutput());
   mMeshIsUpToDate = true;
 }
 //--------------------------------------------------------------------
index d69ec1e9461100f161e3efaed1e05a5374797149..b05b9d65e9a51bd70a81ecba65683becff3eeccd 100644 (file)
@@ -69,7 +69,7 @@ protected:
   int mNumber;
   std::vector<double> mColor;
   std::vector<DicomRT_Contour::Pointer> mListOfContours;
-  vtkPolyData * mMesh;
+  vtkSmartPointer<vtkPolyData> mMesh;
   bool mMeshIsUpToDate;
   vvImage::Pointer mImage;
   double mBackgroundValue;