Page 1 of 1

graph display properties

Posted: Thu Sep 13, 2012 11:10 am
by guillaume
Hello,

is it possible to add a new property to display onto a graph (graph display properties in anatomist)?
I would like to visualize e.g. the posterior probabilities from the SPAM recognition process or a p-value that I would have computed for each sulcal piece.

It seems to me that there should be an interaction with a given hierarchy so It may not be so easy...
...but I guess it is possible, as with brainvisa: "yes, we can!"

cheers
gui

Re: graph display properties

Posted: Thu Sep 13, 2012 1:05 pm
by riviere
Hi Guillaume,

It is completely possible to add properties in a graph, but just the graph .arg format does not write/read unlnown properties.
You can either set the properties in a script and view the graph on the fly in pyanatomist, or modify your graph.stx file to add IO for your new properties.
Alternately you can use siCsvMapGraph.py which does more or less what you seem to need: take values from a CSV file, map then on graph nodes, and display them in anatomist.

Denis

Re: graph display properties

Posted: Thu Sep 13, 2012 2:11 pm
by guillaume
Hi Denis,

one more time thank you for your fast answer!

As you said, siCsvMapGraph.py seems doing the job I want.
I tried it with a *_proba.csv resulting from the SPAM recognition and it works fine.

However, I have one more question concerning the csv input:

I see that the *_proba.csv looks like:

nodes likelihood
12 4.173395
8 4.190664
... ...

which means that we give one value per node in the graph.
Would it be possible to give as input a csv that would look like the following?
F.C.L.a._left 4.173395
S.C._left 4.190664

Or in other words: where could I find a csv file example?

many thanks
gui

Re: graph display properties

Posted: Fri Sep 14, 2012 2:59 pm
by riviere
Hi Guillaume,
Yes, we still need a tool to integrate probas at sulcus level. That's something we wanted to do with Matthieu for several yearts but never took time to do it...
Denis

Re: graph display properties

Posted: Thu Mar 10, 2016 8:40 pm
by f4bry
Hi,

siCsvMapGraph.py is very useful!

Would be possible to change the default palette in siCsvMapGraph.py , or to select a palette with a kind of 'siCsvMapGraph.py -palette-option', assigning also the min/max values?
And, in my case there are always some 'unknown' objects that I have to delete manually. Is it possible to not load these abojects?

Thank you!
Fab

Re: graph display properties

Posted: Fri Mar 11, 2016 12:50 am
by riviere
HI,
It could be done, an option could be added...
Denis

Re: graph display properties

Posted: Fri Mar 11, 2016 10:35 pm
by f4bry
Hi,

I changed the default palette by adding the following command at the line ~330

Code: Select all

palette=a.getPalette("Yellow-red-fusion")
and then

Code: Select all

      if isinstance( palette, a.APalette ):
        ag.setPalette( palette ,minVal=0.18, maxVal=0.72, absoluteMode=True)
at line ~343

Thanks!
Fab