selecting graph nodes on multiple windows, via a hierarchy

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
User avatar
cedric clouchoux
Posts: 33
Joined: Tue Jul 06, 2004 2:54 pm
Location: BIC, MNI, Montreal

selecting graph nodes on multiple windows, via a hierarchy

Post by cedric clouchoux »

hi everyone ;-)
Let's talk about sulci in graphs/hierarchy/3d windows...
With anatomist, when you have several 3D windows (with tri and graphs in them), and a hierarchy on a browser, when you select a node (type = CorticalFoldArg) of the hierarchy, the corresponding sulci are selected in ALL the 3D windows.
In a "hand-made" anatomist module to create hierarchies from graphs, i'm building a hierarchy by selecting sulci in a 3D window. And i'd like that, when i select a node in the window, the corresponding nodes become highlighted in the others 3D windows.
This works when i click on a node of the hierarchy (i.e. sulci already added in the hie.). I think there will be a problem with what i want to do, because when i select a node in a 3D window, this one is not in a hier. yet...
I thought that a selection of the same node in different graphs/windows was only possible if you select it from a hierarchy (with the good GraphSyntax argument of course)
But maybe i could use something like TheAnatomist->All3DWindowsWithGraph or TheAnatomist->allGraphs ( ;-) sorry denis for this heresy...) to access and select nodes in other graphs. Or maybe someone could tell me where is the code, in perforce, talking about selecting elements by a hierarchy...
that's all!

cedric
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Hi Cédric,

Well, if you want to add the selected node name in the hierarchy you are building, it's easy: add it in the hierarchy (if the name doesn't exist yet), and select via the hierarchy (using the SelectByHierarchyCommand).
Now if you want to temporarily select nodes in all graphs without changing the current hierarchy, you'll have to do more manual things. Several possibilities:
A - parse the objects of all windows of the same group, and seach in each object being of type graph for elements with the same name (quite boring work)
B - temporariliy modify the hierarchy: add a hierarchy node, use it to select via the hierarchy, then delete the node immediately
C - create another, temporary, hierarchy with only one node, use it to select the graphs, then delete the temporary hierarchy
There is no other tool to easily do such a selection without the help of a hierarchy (hierarchies they have been created precisely to perform this job).
If I had to do it myself, I would choose solution C (or maybe B).

Denis
Post Reply