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://oncora1.lyon.fnclcc.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"
24 #include "clitkDicomRT_Contour.h"
26 #include <gdcmSQItem.h>
27 #include <vtkPoints.h>
28 #include <vtkPolyData.h>
32 //--------------------------------------------------------------------
33 class DicomRT_Contour {
39 void Print(std::ostream & os = std::cout) const;
40 bool Read(gdcm::SQItem * item);
41 vtkPolyData * GetMesh();
45 unsigned int mNbOfPoints;
52 //--------------------------------------------------------------------
54 //--------------------------------------------------------------------
55 template<class ElementType>
56 ElementType parse_value(std::string str)
58 std::istringstream parser(str);
65 assert(!parser.fail());
69 template<class ElementType>
70 std::vector<ElementType> parse_string(std::string str,char delim) {
71 std::istringstream ss(str);
73 std::vector<ElementType> result;
74 while (getline(ss,token,delim))
76 result.push_back(parse_value<ElementType>(token));
80 //--------------------------------------------------------------------
83 } // end namespace clitk
84 #endif // CLITKDICOMRT_CONTOUR_H