From 94fffd8047ebf65f45cd5b4c4516790c235fb809 Mon Sep 17 00:00:00 2001 From: srit Date: Fri, 25 Mar 2011 17:35:52 +0000 Subject: [PATCH] Put mMesh in smart pointer --- common/clitkDicomRT_ROI.cxx | 4 +++- common/clitkDicomRT_ROI.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/clitkDicomRT_ROI.cxx b/common/clitkDicomRT_ROI.cxx index 48099e0..0219b4a 100644 --- a/common/clitkDicomRT_ROI.cxx +++ b/common/clitkDicomRT_ROI.cxx @@ -200,7 +200,9 @@ void clitk::DicomRT_ROI::ComputeMesh() append->AddInput(mListOfContours[i]->GetMesh()); } append->Update(); - mMesh = append->GetOutput(); + + mMesh = vtkSmartPointer::New(); + mMesh->DeepCopy(append->GetOutput()); mMeshIsUpToDate = true; } //-------------------------------------------------------------------- diff --git a/common/clitkDicomRT_ROI.h b/common/clitkDicomRT_ROI.h index d69ec1e..b05b9d6 100644 --- a/common/clitkDicomRT_ROI.h +++ b/common/clitkDicomRT_ROI.h @@ -69,7 +69,7 @@ protected: int mNumber; std::vector mColor; std::vector mListOfContours; - vtkPolyData * mMesh; + vtkSmartPointer mMesh; bool mMeshIsUpToDate; vvImage::Pointer mImage; double mBackgroundValue; -- 2.47.1