SiGraph: sulcal graphs


sigraph::FoldLabelsTranslator Class Reference

Table de correspondance entre labels réels (des graphes de sillons) et labels modèles (des graphes modèles). More...

#include <si/fold/labelsTranslator.h>

Inheritance diagram for sigraph::FoldLabelsTranslator:
Collaboration diagram for sigraph::FoldLabelsTranslator:

Public Member Functions

 FoldLabelsTranslator ()
 
 FoldLabelsTranslator (const std::string &filename)
 
 FoldLabelsTranslator (const MGraph &mg, const std::string &filename="")
 
 ~FoldLabelsTranslator ()
 
void readLabels (const std::string &filename)
 Initialise la table à partir d'un fichier.
 
void makeFromModel (const MGraph &mg, const std::string &filename)
 Initializes table from a file AND a model graph.
 
void translate (CGraph &gr, const std::string &ilabel="name", const std::string &olabel="name", const std::string &altilabel="") const
 Change les labels d'un graphe.
 
std::string lookupLabel (std::string label) const
 

Protected Member Functions

bool readJFM95 (const std::string &filename)
 
bool readHierarchy (const std::string &filename)
 
bool readSelection (const std::string &filename)
 
bool makeFromModelJFM95 (const MGraph &mg, const std::string &filename)
 
bool makeFromModelHierarchy (const MGraph &mg, const std::string &filename)
 

Detailed Description

Table de correspondance entre labels réels (des graphes de sillons) et labels modèles (des graphes modèles).

\ Elle permet de passer des graphes exemples dans la nomenclature du modèle avant de travailler avec.

Definition at line 26 of file labelsTranslator.h.

Constructor & Destructor Documentation

◆ FoldLabelsTranslator() [1/3]

sigraph::FoldLabelsTranslator::FoldLabelsTranslator ( )
inline

Definition at line 29 of file labelsTranslator.h.

◆ FoldLabelsTranslator() [2/3]

sigraph::FoldLabelsTranslator::FoldLabelsTranslator ( const std::string & filename)
inline

Definition at line 30 of file labelsTranslator.h.

References readLabels().

◆ FoldLabelsTranslator() [3/3]

sigraph::FoldLabelsTranslator::FoldLabelsTranslator ( const MGraph & mg,
const std::string & filename = "" )
inline

Definition at line 33 of file labelsTranslator.h.

References makeFromModel().

◆ ~FoldLabelsTranslator()

sigraph::FoldLabelsTranslator::~FoldLabelsTranslator ( )
inline

Definition at line 37 of file labelsTranslator.h.

Member Function Documentation

◆ lookupLabel()

std::string sigraph::FoldLabelsTranslator::lookupLabel ( std::string label) const

◆ makeFromModel()

void sigraph::FoldLabelsTranslator::makeFromModel ( const MGraph & mg,
const std::string & filename )

Initializes table from a file AND a model graph.

Correspondances are read in the file and translations lead to labels existing in the model. The labels file is either in Jeff's format (JFM95) or in hierarchy format (Aims/Anatomist format)

Referenced by FoldLabelsTranslator().

◆ makeFromModelHierarchy()

bool sigraph::FoldLabelsTranslator::makeFromModelHierarchy ( const MGraph & mg,
const std::string & filename )
protected

◆ makeFromModelJFM95()

bool sigraph::FoldLabelsTranslator::makeFromModelJFM95 ( const MGraph & mg,
const std::string & filename )
protected

◆ readHierarchy()

bool sigraph::FoldLabelsTranslator::readHierarchy ( const std::string & filename)
protected

◆ readJFM95()

bool sigraph::FoldLabelsTranslator::readJFM95 ( const std::string & filename)
protected

◆ readLabels()

void sigraph::FoldLabelsTranslator::readLabels ( const std::string & filename)

Initialise la table à partir d'un fichier.

Ce fichier est soit une hiérarchie de noms (format Aims/Anatomist), soit un fichier de traduction au format Jeff (JFM95) (en général, "sillons_modele.def" )

Referenced by FoldLabelsTranslator().

◆ readSelection()

bool sigraph::FoldLabelsTranslator::readSelection ( const std::string & filename)
protected

◆ translate()

void sigraph::FoldLabelsTranslator::translate ( CGraph & gr,
const std::string & ilabel = "name",
const std::string & olabel = "name",
const std::string & altilabel = "" ) const

Change les labels d'un graphe.

Parameters
ilabelattribut contenant les labels initiaux
olabelattribut contenant les labels changés
altilabelalternate input label (used if ilabel is absent)

The documentation for this class was generated from the following file: