]> Creatis software - clitk.git/blobdiff - common/clitkDicomRT_Contour.h
Attempt to remove some leaks. DicomRT_Contour, DicomRT_ROI and DicomRT_StructureSet...
[clitk.git] / common / clitkDicomRT_Contour.h
index 940f25a7371e609d3b0186d054958e566ecd52fc..8596702eeb84edb2f3e086601b968c3e23cc1449 100644 (file)
 
 namespace clitk {
 
-  //--------------------------------------------------------------------
-  class DicomRT_Contour {
-    
-  public:
-    DicomRT_Contour();
-    ~DicomRT_Contour();
-
-    void Print(std::ostream & os = std::cout) const;
-    bool Read(gdcm::SQItem * item);
-    vtkPolyData * GetMesh();
-    vtkPoints * GetPoints() {return mData;}
-    double GetZ() const {return mZ;}
-    
-  protected:
-    void ComputeMesh();
-    unsigned int mNbOfPoints;
-    std::string mType;
-    vtkPoints * mData;
-    vtkPolyData * mMesh;
-    bool mMeshIsUpToDate;
-    ///Z location of the contour
-    double mZ;
-
-  };
-  //--------------------------------------------------------------------
+//--------------------------------------------------------------------
+class DicomRT_Contour : public itk::LightObject{
+  
+public:
+  typedef DicomRT_Contour Self;
+  typedef itk::SmartPointer<Self> Pointer;
+  itkNewMacro(Self);
+
+  void Print(std::ostream & os = std::cout) const;
+  bool Read(gdcm::SQItem * item);
+  vtkPolyData * GetMesh();
+  vtkPoints * GetPoints() {return mData;}
+  double GetZ() const {return mZ;}
+  
+protected:
+  void ComputeMesh();
+  unsigned int mNbOfPoints;
+  std::string mType;
+  vtkPoints * mData;
+  vtkPolyData * mMesh;
+  bool mMeshIsUpToDate;
+  ///Z location of the contour
+  double mZ;
+
+private:
+  DicomRT_Contour();
+  ~DicomRT_Contour();
+};
+//--------------------------------------------------------------------