How to spool graphe+ mesh data to anatomist from a script?

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
PeterK
Posts: 45
Joined: Fri Mar 05, 2004 3:18 pm

How to spool graphe+ mesh data to anatomist from a script?

Post by PeterK »

I hope there is a very simply solution to what I'm trying to do e.g. to replace the "Show Fold Graph Viewer" with a command-line interface. My issue is that our bvisa database is gargantual and this takes toll on just trying to do a quick view as there is a lot of database querying going on.

Now, I can load the mesh and graph directly into the anatomist along with the nomenclature file. However, when I drop the mesh + graph in the 3D viewer, only the mesh is displayed. The sulcal nodes will only displayed if clicked on or if selected from the viewer window. How does brainvisa interface "activates" all the sulcal nodes to be displayed in the viewer? Is there a way to do from outside the main shell? E.g. ideally I'd like you call a script with the location of the mesh file and the graphe file and have anatomist display it for me.
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: How to spool graphe+ mesh data to anatomist from a script?

Post by riviere »

Hi Peter,
Yes, graphs by default don't show anything in 3D views because we often want to display just a part of them on several subjects, but there are several ways to display all nodes.
- in a python script, use addObjects() with the keyword argument "add_children", or "add_graph_nodes", or "add_graph_relations":

Code: Select all

import anatomist.api as ana
a = ana.Anatomist()
graph = a.loadObject( 'graphfile.arg' )
w = a.createWindow( '3D' )
w.addObjects( ag, add_graph_nodes=True )
see also the python docs and examples.
- if directly using the low-level .ana commands, use the same option in AddObject command:

Code: Select all

*BEGIN TREE EXECUTE
*BEGIN TREE AddObject
objects 1
windows 2
add_graph_nodes 1
*END
*END
- otherwise, formerly we used selection commands to do it (select "brain" and "unknown", then unselect all)

(you can run .ana scripts, and now even python scripts (in the latest release 3.1.6) via the "open" button/menu or LoadObject command.)

Denis
PeterK
Posts: 45
Joined: Fri Mar 05, 2004 3:18 pm

Re: How to spool graphe+ mesh data to anatomist from a script?

Post by PeterK »

Thanks Denis! I'll try that out!
Post Reply