34 #ifndef AIMS_GRAPH_GRAPHMANIP_H
35 #define AIMS_GRAPH_GRAPHMANIP_H
50 class AffineTransformation3d;
57 template<
typename T>
class BucketMap;
102 typedef std::map<std::string, std::map<std::string,GraphElementCode> >
115 template <
typename T>
117 template <
typename T>
119 template <
typename T>
129 (*CreateBucketFunc)(
GraphObject*,
const std::string & );
153 bool force_old_attributes=
false);
191 const std::string &
id );
194 const std::string & attrib );
202 const std::string & attribute,
205 template <
typename T>
209 std::map<T, std::string> *trans = 0 );
211 template <
typename T>
215 std::map<T,std::string> *trans = 0,
216 bool automaticBackgroundSearch =
true );
222 const std::vector<int> & );
224 const std::string & att );
236 bool mergeMesh =
true,
bool invNormal =
false);
238 std::ostream & ostr = std::cout );
241 const std::string & dtype );
261 return "GraphElementCode";
264 #define _TMP_ rc_ptr<std::map<std::string,std::map<std::string,aims::GraphElementCode> > >
Various manipulations on graphs.
static AffineTransformation3d getICBMTransform(const Graph &g)
Extract the transformation to the MNI ICBM152 space.
static void setAttributeColor(Graph &graph, const std::string &att, const std::vector< int > &)
static bool buckets2Volume(Graph &g)
converts internal representations of graph nodes from buckets to volume
static AffineTransformation3d talairach(const Graph &g)
Extract Talairach transformation (graph -> Talairach)
static void graphFromVolume(const carto::rc_ptr< carto::Volume< 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
BucketMap< Void > *(* CreateBucketFunc)(GraphObject *, const std::string &)
static bool volume2Buckets(Graph &g, CreateBucketFunc f=0)
converts internal representations of graph nodes from volume to buckets.
static void completeGraph(Graph &)
Completes folds graph information.
static AffineTransformation3d getICBM2009cTemplateTransform(const Graph &g)
Extract the transformation to the MNI ICBM152 space, shifted to the "most standard" field of view of ...
static Graph * graphFromVolume(const carto::rc_ptr< carto::Volume< T > > &vol, T background=0, std::map< T, std::string > *trans=0)
builds a ROI graph from a volume of labels
std::vector< int > attributeColor(const Graph &graph, const std::string &att)
static std::list< Edge * > getPath(const Vertex *from, const Vertex *to)
Get edges path from a vertex to another one.
static Graph * mergeGraph(const std::string &, Graph &, Graph &, bool mergeMesh=true, bool invNormal=false)
static void setAttributeColor(Graph &graph, const std::string &att, const AimsRGB &)
static bool hasOldTalairachTransform(const Graph &g)
Test if a Graph has the old Talairach attributes.
static void printGraphElementTable(const Graph &, std::ostream &ostr=std::cout)
static std::string defaultExtensionForObjectType(const std::string &otype, const std::string &dtype)
static GraphElementCode & graphElementCode(Graph &, const std::string &syntax, const std::string &id)
static void setAttributeColor(Graph &graph, const std::string &att, const AimsRGBA &)
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...
static void storeTalairach(Graph &g, const AffineTransformation3d &m, bool force_old_attributes=false)
Store Talairach transformation in graph.
static GraphElementCode & graphElementCodeByAtt(Graph &, const std::string &syntax, const std::string &attrib)
carto::PropertySet & getHeader(T &obj)
void insertElement(T &dest, int index, const T &src)
insert a sub-element in a container data (time bucket/mesh/texture, or volume of labels....
void adjustVoxelSize(T &, const T &)
utility function to copy voxel sizes from an object to another (if applicable)
void setHeaderInfo(T &obj, const carto::GenericObject &srcheader)
The class for EcatSino data write operation.
std::map< std::string, std::map< std::string, GraphElementCode > > GraphElementTable
GraphElementCode table, stored in graphs in attribute "aims_objects_table" (carto::rc_ptr<GraphElemen...
#define DECLARE_GENERIC_OBJECT_TYPE(T)
Describe how Aims objects are stored in graph objects.
std::string attribute
attribute found in graph objects, this attribute is a reference-counting pointer (carto::rc_ptr<T>) t...
std::string global_filename
std::string objectType
object type as in aims Finder: "Volume", "Bucket", "Mesh", ...
std::string syntax
syntactic attribute of attributed objects
GraphElementCode(const std::string &attrib, const std::string &ot, const std::string &dt, StorageType st)
GraphElementCode(const GraphElementCode &x)
std::string global_index_attribute
std::string id
ID for object: filename (globals) or attribute for filename (locals)
std::string dataType
data type as in Aims Finder: "S16", "U8", "FLOAT", ...
std::string local_file_attribute
std::string global_attribute
GraphElementCode & operator=(const GraphElementCode &x)