From: srit Date: Fri, 25 Mar 2011 17:35:52 +0000 (+0000) Subject: Put mMesh in smart pointer X-Git-Tag: v1.2.0~111 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=94fffd8047ebf65f45cd5b4c4516790c235fb809;p=clitk.git Put mMesh in smart pointer --- 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;