1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
3 Main authors : XX XX XX
6 - University of LYON http://www.universite-lyon.fr/
7 - Léon Bérard cancer center http://www.centreleonberard.fr
8 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
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.
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
18 =========================================================================*/
20 #ifndef CLITKDICOMRT_CONTOUR_H
21 #define CLITKDICOMRT_CONTOUR_H
23 #include "clitkCommon.h"
25 #if GDCM_MAJOR_VERSION == 2
28 #include <gdcmSQItem.h>
30 #include <vtkPoints.h>
31 #include <vtkPolyData.h>
32 #include <vtkSmartPointer.h>
33 #include <vtkMatrix4x4.h>
37 //--------------------------------------------------------------------
38 class DicomRT_Contour : public itk::LightObject{
41 typedef DicomRT_Contour Self;
42 typedef itk::SmartPointer<Self> Pointer;
45 void Print(std::ostream & os = std::cout) const;
47 #if GDCM_MAJOR_VERSION == 2
48 bool Read(gdcm::Item * item);
49 void UpdateDicomItem();
51 bool Read(gdcm::SQItem * item);
54 vtkPolyData * GetMesh();
55 void SetMesh(vtkPolyData * mesh);
56 vtkPoints * GetPoints() {return mData;}
57 double GetZ() const {return mZ;}
58 void SetTransformMatrix(vtkMatrix4x4* matrix);
62 void ComputeMeshFromDataPoints();
63 void ComputeDataPointsFromMesh();
64 unsigned int mNbOfPoints;
66 vtkSmartPointer<vtkPoints> mData;
67 vtkSmartPointer<vtkPolyData> mMesh;
68 vtkSmartPointer<vtkPoints> mPoints;
69 vtkSmartPointer<vtkMatrix4x4> mTransformMatrix;
71 ///Z location of the contour
74 #if GDCM_MAJOR_VERSION == 2
84 //--------------------------------------------------------------------
88 } // end namespace clitk
89 #endif // CLITKDICOMRT_CONTOUR_H