A.I.M.S


aims::GraphManip Class Reference

Various manipulations on graphs. More...

#include <aims/graph/graphmanip.h>

Public Types

typedef BucketMap< Void > *(* CreateBucketFunc )(GraphObject *, const std::string &)
 

Public Member Functions

std::vector< int > attributeColor (const Graph &graph, const std::string &att)
 

Static Public Member Functions

static Motion talairach (const Graph &g)
 extract Talairach transformation (graph -> Talairach) More...
 
static void storeTalairach (Graph &g, const Motion &m)
 stores Talairach transformation in graph More...
 
static bool buckets2Volume (Graph &g)
 converts internal representations of graph nodes from buckets to volume More...
 
static bool volume2Buckets (Graph &g, CreateBucketFunc f=0)
 converts internal representations of graph nodes from volume to buckets. More...
 
static GraphElementCodegraphElementCode (Graph &, const std::string &syntax, const std::string &id)
 
static GraphElementCodegraphElementCodeByAtt (Graph &, const std::string &syntax, const std::string &attrib)
 
template<typename T >
static void storeAims (Graph &graph, GraphObject *vertex, const std::string &attribute, carto::rc_ptr< T > obj)
 This template function stores the given object in the given Vertex / Edge of the graph and takes care of IO information to maintain in the graph. More...
 
template<typename T >
static GraphgraphFromVolume (const AimsData< T > &vol, T background=0, std::map< T, std::string > *trans=0)
 builds a ROI graph from a volume of labels More...
 
template<typename T >
static void graphFromVolume (const AimsData< T > &vol, Graph &g, T background=0, std::map< T, std::string > *trans=0, bool automaticBackgroundSearch=true)
 builds a ROI graph from a volume of labels More...
 
static void setAttributeColor (Graph &graph, const std::string &att, const AimsRGB &)
 
static void setAttributeColor (Graph &graph, const std::string &att, const AimsRGBA &)
 
static void setAttributeColor (Graph &graph, const std::string &att, const std::vector< int > &)
 
static void completeGraph (Graph &)
 Completes folds graph information. More...
 
static GraphmergeGraph (const std::string &, Graph &, Graph &, bool mergeMesh=true, bool invNormal=false)
 
static void printGraphElementTable (const Graph &, std::ostream &ostr=std::cout)
 
static std::string defaultExtensionForObjectType (const std::string &otype, const std::string &dtype)
 

Detailed Description

Various manipulations on graphs.

Definition at line 123 of file graphmanip.h.

Member Typedef Documentation

typedef BucketMap<Void>*(* aims::GraphManip::CreateBucketFunc)(GraphObject *, const std::string &)

Definition at line 127 of file graphmanip.h.

Member Function Documentation

std::vector<int> aims::GraphManip::attributeColor ( const Graph graph,
const std::string &  att 
)
static bool aims::GraphManip::buckets2Volume ( Graph g)
static

converts internal representations of graph nodes from buckets to volume

Returns
false if it fails: if all buckets have not been read from disk
static void aims::GraphManip::completeGraph ( Graph )
static

Completes folds graph information.

Adds missing information to sulcal nodes, like meshes surface...

static std::string aims::GraphManip::defaultExtensionForObjectType ( const std::string &  otype,
const std::string &  dtype 
)
static

Referenced by storeAims().

static GraphElementCode& aims::GraphManip::graphElementCode ( Graph ,
const std::string &  syntax,
const std::string &  id 
)
static
static GraphElementCode& aims::GraphManip::graphElementCodeByAtt ( Graph ,
const std::string &  syntax,
const std::string &  attrib 
)
static

Referenced by storeAims().

template<typename T >
static Graph* aims::GraphManip::graphFromVolume ( const AimsData< T > &  vol,
background = 0,
std::map< T, std::string > *  trans = 0 
)
static

builds a ROI graph from a volume of labels

template<typename T >
static void aims::GraphManip::graphFromVolume ( const AimsData< T > &  vol,
Graph g,
background = 0,
std::map< T, std::string > *  trans = 0,
bool  automaticBackgroundSearch = true 
)
static

builds a ROI graph from a volume of labels

static Graph* aims::GraphManip::mergeGraph ( const std::string &  ,
Graph ,
Graph ,
bool  mergeMesh = true,
bool  invNormal = false 
)
static
static void aims::GraphManip::printGraphElementTable ( const Graph ,
std::ostream &  ostr = std::cout 
)
static
static void aims::GraphManip::setAttributeColor ( Graph graph,
const std::string &  att,
const AimsRGB  
)
static
static void aims::GraphManip::setAttributeColor ( Graph graph,
const std::string &  att,
const AimsRGBA  
)
static
static void aims::GraphManip::setAttributeColor ( Graph graph,
const std::string &  att,
const std::vector< int > &   
)
static
template<typename T >
void aims::GraphManip::storeAims ( Graph graph,
GraphObject vertex,
const std::string &  attribute,
carto::rc_ptr< T >  obj 
)
static

This template function stores the given object in the given Vertex / Edge of the graph and takes care of IO information to maintain in the graph.

More precisely, it calls GraphObject::setProperty and fills the GraphElementTable accordingly in the graph

Definition at line 46 of file graphmanip_d.h.

References aims::GraphElementCode::attribute, aims::GraphElementCode::dataType, defaultExtensionForObjectType(), aims::GraphElementCode::global_filename, aims::GraphElementCode::global_index_attribute, graphElementCodeByAtt(), aims::GraphElementCode::local_file_attribute, and aims::GraphElementCode::objectType.

Referenced by aims::Tex2Graph< T >::makeGraph().

static void aims::GraphManip::storeTalairach ( Graph g,
const Motion m 
)
static

stores Talairach transformation in graph

static Motion aims::GraphManip::talairach ( const Graph g)
static

extract Talairach transformation (graph -> Talairach)

static bool aims::GraphManip::volume2Buckets ( Graph g,
CreateBucketFunc  f = 0 
)
static

converts internal representations of graph nodes from volume to buckets.

Returns
false if it fails: if all volumes have not been read from disk

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