Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpMbtXmlParser.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Load XML parameters of the Model based tracker (using edges).
32  *
33  * Authors:
34  * Nicolas Melchior
35  * Romain Tallonneau
36  * Eric Marchand
37  * Aurelien Yol
38  *
39  *****************************************************************************/
40 
46 #ifndef vpMbtXmlParser_HH
47 #define vpMbtXmlParser_HH
48 
49 #include <visp3/core/vpConfig.h>
50 
51 #ifdef VISP_HAVE_XML2
52 
53 #include <libxml/xmlmemory.h> /* Fonctions de la lib XML. */
54 
55 #include <visp3/mbt/vpMbXmlParser.h>
56 #include <visp3/me/vpMe.h>
57 
66 class VISP_EXPORT vpMbtXmlParser: virtual public vpMbXmlParser
67 {
68 protected:
69  typedef enum{
78  mu1,
79  mu2,
82  last
83  } dataToParseMb;
84 
87 
88 
89 public:
93  virtual ~vpMbtXmlParser();
94 
95  void getMe(vpMe& _ecm) const { _ecm = this->m_ecm;}
96 
97  void parse(const char * filename);
98 
99  virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node);
100  void read_ecm (xmlDocPtr doc, xmlNodePtr node);
101  void read_sample (xmlDocPtr doc, xmlNodePtr node);
102  void read_sample_deprecated (xmlDocPtr doc, xmlNodePtr node);
103  void read_mask (xmlDocPtr doc, xmlNodePtr node);
104  void read_range (xmlDocPtr doc, xmlNodePtr node);
105  void read_contrast (xmlDocPtr doc, xmlNodePtr node);
106 
107  void setMovingEdge(const vpMe &_ecm){ m_ecm = _ecm; }
108 
109  void writeMainClass(xmlNodePtr node);
111 
112 protected:
115  void init();
117 
118 
119 };
120 
121 #endif
122 
123 #endif /* NMBTXMLPARSER_H_ */
124 
125 
126 
Parse an Xml file to extract configuration parameters of a mbtConfig object.Data parser for the model...
void getMe(vpMe &_ecm) const
virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node)
Definition: vpMe.h:59
vpMe m_ecm
Moving edges parameters.
void writeMainClass(xmlNodePtr node)
Parse an Xml file to extract configuration parameters of a mbtConfig object.Data parser for the model...
Definition: vpMbXmlParser.h:63
void parse(const char *filename)
void setMovingEdge(const vpMe &_ecm)