ViSP  2.9.0
vpMbtXmlParser.h
1 /****************************************************************************
2  *
3  * $Id: vpMbtXmlParser.h 4582 2014-01-14 14:02:46Z ayol $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Load XML parameters of the Model based tracker (using edges).
36  *
37  * Authors:
38  * Nicolas Melchior
39  * Romain Tallonneau
40  * Eric Marchand
41  * Aurelien Yol
42  *
43  *****************************************************************************/
44 
50 #ifndef vpMbtXmlParser_HH
51 #define vpMbtXmlParser_HH
52 
53 #include <visp/vpConfig.h>
54 
55 #ifdef VISP_HAVE_XML2
56 
57 #include <libxml/xmlmemory.h> /* Fonctions de la lib XML. */
58 
59 #include <visp/vpMbXmlParser.h>
60 #include <visp/vpMe.h>
61 
70 class VISP_EXPORT vpMbtXmlParser: virtual public vpMbXmlParser
71 {
72 protected:
75 
76  typedef enum{
85  mu1,
86  mu2,
90  last
91  } dataToParseMb;
92 
93 
94 public:
95 
97  virtual ~vpMbtXmlParser();
98 
99  void getMe(vpMe& _ecm) const { _ecm = this->m_ecm;}
100 
101 
102  void parse(const char * filename);
103 
104  virtual void readMainClass(xmlDocPtr doc, xmlNodePtr node);
105  void read_ecm (xmlDocPtr doc, xmlNodePtr node);
106  void read_sample (xmlDocPtr doc, xmlNodePtr node);
107  void read_mask (xmlDocPtr doc, xmlNodePtr node);
108  void read_range (xmlDocPtr doc, xmlNodePtr node);
109  void read_contrast (xmlDocPtr doc, xmlNodePtr node);
110 
111  void setMovingEdge(const vpMe &_ecm){ m_ecm = _ecm; }
112 
113  void writeMainClass(xmlNodePtr node);
114 
115 protected:
116  void init();
117 
118 };
119 
120 #endif
121 
122 #endif /* NMBTXMLPARSER_H_ */
123 
124 
125 
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)
Contains predetermined masks for sites and holds moving edges tracking parameters.
Definition: vpMe.h:70
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:67
void parse(const char *filename)
void setMovingEdge(const vpMe &_ecm)