]> Creatis software - clitk.git/blob - common/clitkDicomRT_Contour.h
From gdcm 1.x to gdcm 2.0
[clitk.git] / common / clitkDicomRT_Contour.h
1 /*=========================================================================
2   Program:         vv http://www.creatis.insa-lyon.fr/rio/vv
3   Main authors :   XX XX XX
4
5   Authors belongs to: 
6   - University of LYON           http://www.universite-lyon.fr/
7   - Léon Bérard cancer center    http://oncora1.lyon.fnclcc.fr
8   - CREATIS CNRS laboratory      http://www.creatis.insa-lyon.fr
9
10   This software is distributed WITHOUT ANY WARRANTY; without even
11   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12   PURPOSE.  See the copyright notices for more information.
13
14   It is distributed under dual licence
15   - BSD       http://www.opensource.org/licenses/bsd-license.php
16   - CeCILL-B  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17
18   =========================================================================*/
19
20 #ifndef CLITKDICOMRT_CONTOUR_H
21 #define CLITKDICOMRT_CONTOUR_H
22
23 #include "clitkCommon.h" 
24 #include <gdcm.h>
25 #include <gdcmSQItem.h>
26 #include <vtkPoints.h>
27 #include <vtkPolyData.h>
28 #include <vtkSmartPointer.h>
29
30 namespace clitk {
31
32 //--------------------------------------------------------------------
33 class DicomRT_Contour : public itk::LightObject{
34   
35 public:
36   typedef DicomRT_Contour Self;
37   typedef itk::SmartPointer<Self> Pointer;
38   itkNewMacro(Self);
39
40   void Print(std::ostream & os = std::cout) const;
41   bool Read(gdcm::SQItem * item);
42   vtkPolyData * GetMesh();
43   vtkPoints * GetPoints() {return mData;}
44   double GetZ() const {return mZ;}
45   
46 protected:
47   void ComputeMesh();
48   unsigned int mNbOfPoints;
49   std::string mType;
50   vtkSmartPointer<vtkPoints> mData;
51   vtkSmartPointer<vtkPolyData> mMesh;
52   vtkSmartPointer<vtkPoints> mPoints;
53   bool mMeshIsUpToDate;
54   ///Z location of the contour
55   double mZ;
56
57 private:
58   DicomRT_Contour();
59   ~DicomRT_Contour();
60 };
61 //--------------------------------------------------------------------
62
63
64
65 } // end namespace clitk
66 #endif // CLITKDICOMRT_CONTOUR_H
67