SiGraph: sulcal graphs


topModel.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1998-2004 CEA
3 *
4 * This software and supporting documentation were developed by
5 * CEA/DSV/SHFJ
6 * 4 place du General Leclerc
7 * 91401 Orsay cedex
8 * France
9 *
10 */
11
12#ifndef SI_MODEL_TOPMODEL_H
13#define SI_MODEL_TOPMODEL_H
14
15
16#include <cartobase/object/attributed.h>
17#include <set>
18#include <string>
19
20class Tree;
21
22
23namespace sigraph
24{
25 class MGraph;
26
28 {
29 public:
30 TopModel( carto::AttributedObject* parent = 0 );
31 TopModel( const TopModel & tm );
32 virtual ~TopModel();
33 TopModel & operator = ( const TopModel & tm );
34
37 std::set<std::string> & significantLabels()
38 { return( _significantLabels ); }
39 const std::set<std::string> & significantLabels() const
40 { return( _significantLabels ); }
41 const std::string & voidLabel() const
42 { return( _voidLabel ); }
43 void setVoidLabel( const std::string & s )
44 { _voidLabel = s; }
45 virtual carto::AttributedObject* parentAO() { return( _parentAO ); }
46 virtual const carto::AttributedObject* parentAO() const
47 { return( _parentAO ); }
49 { _parentAO = newParent; }
50 void setMGraph( MGraph* mg ) { _mgraph = mg; }
51 const MGraph* mGraph() const { return _mgraph; }
52 MGraph* mGraph() { return _mgraph; }
53 double weight() const { return( _weight ); }
54 void setWeight( double w ) { _weight = w; }
57 virtual double confidenceFactor() const { return 1.; }
59
62 virtual void buildTree( Tree & tr ) const;
64
65 protected:
68 std::string _voidLabel;
70 std::set<std::string> _significantLabels;
73 double _weight;
76
77 private:
78 };
79
80
81 // inline
82
84 : _parentAO( parent ), _weight( 1. ), _mgraph( 0 )
85 {
86 }
87
88}
89
90#endif
91
92
Graph modèle (classe abstraite).
Definition mgraph.h:48
TopModel(carto::AttributedObject *parent=0)
Definition topModel.h:83
double weight() const
Definition topModel.h:53
const std::string & voidLabel() const
Definition topModel.h:41
virtual ~TopModel()
void setVoidLabel(const std::string &s)
Definition topModel.h:43
double _weight
Poids de l'élément dans le recuit.
Definition topModel.h:73
carto::AttributedObject * _parentAO
Definition topModel.h:71
void setMGraph(MGraph *mg)
Definition topModel.h:50
MGraph * _mgraph
Definition topModel.h:74
std::string _voidLabel
Label par défaut, qu'on attribue à tous les noeuds de label non reconnus.
Definition topModel.h:68
void setWeight(double w)
Definition topModel.h:54
std::set< std::string > & significantLabels()
Definition topModel.h:37
const std::set< std::string > & significantLabels() const
Definition topModel.h:39
const MGraph * mGraph() const
Definition topModel.h:51
virtual carto::AttributedObject * parentAO()
Definition topModel.h:45
TopModel & operator=(const TopModel &tm)
void setParentAO(carto::AttributedObject *newParent)
Definition topModel.h:48
MGraph * mGraph()
Definition topModel.h:52
virtual double confidenceFactor() const
confidence factor generally used to weight the model output (different from weight() which is another...
Definition topModel.h:57
virtual void buildTree(Tree &tr) const
std::set< std::string > _significantLabels
Liste des labels qui ont un sens pour le modèle.
Definition topModel.h:70
TopModel(const TopModel &tm)
virtual const carto::AttributedObject * parentAO() const
Definition topModel.h:46
SyntaxedObject< PropertySet > AttributedObject