Page 1 of 1

Graph Transfert Labels

Posted: Wed Nov 12, 2008 11:33 am
by François Leroy
Hi,

I cannot update a cortical fold graph "graph1.arg" by a modified graph version "graph2.arg".
"graph1" and "graph2" have all their fold labeled. "graph1" folds have proper names except for a set of folds, say foldA foldB and foldC.
I would like to update "graph1" by getting foldA foldB and foldC from "graph2", where these three folds are properly labelled.
Is there a way to do it, such as using the AimsGraphTransfertLabels command ?

I have tried the following : AimsGraphTransfertLabels -i graph1.arg -j graph2.arg -o graph3.arg.
However, when I look into the graph result "grap3.arg", foldA, B and C are not updated with graph2 names.
Is there a some command option to set to make it work ? Or should I use another AimsCommand?

Thanks for your help,
François

Re: Graph Transfert Labels

Posted: Wed Nov 12, 2008 11:53 am
by riviere
Hi François,

Hm, AimsGraphTransferLabels overrides existing labels with the ones from another graph, so it will not do what you want.
If I understand, both graphs have the same structure (same nodes/relations, they are only labelled differently).
AimsGraphMerge may do a part of what you need, but it would rather complete nodes with missing attributes (nodes with no label attribute for instance): in this case unnamed sulci should have no label attribute rather than "unknown". This means it would not work using the "name" attribute (for manual labelling) because this one is mandatory and cannot be missing.
Then I guess you will have to write a little program (or python script) to do that, I think it should be 15-20 lines of code...

Denis