[Neuroimaging] [PySurfer][Nibabel] Write annot from roi display

Michael Waskom mwaskom at stanford.edu
Thu Apr 14 19:19:26 EDT 2016


One thought is that the annot labels are likely expected to be integers,
whereas if you're adapting the script to show statistical values in each
parcel, they're probably floats. That could be causing issues.

On Thu, Apr 14, 2016 at 3:27 PM, Kirstie Whitaker <kw401 at cam.ac.uk> wrote:

> Hi Michael,
>
> Sorry for not being clear.
>
> They're exactly as defined in the Display ROIs example that I linked to.
>
> There aren't any error messages when writing out the file, I just can't
> load it up in freeview. I'll send a screenshot from freeview tomorrow
> morning. (I'm on my iPhone now.) Is there anything else that would be good
> to know?
>
> Kx
>
> Sent from my iPhone, please excuse any typos or excessive brevity
>
> On 14 Apr 2016, at 23:19, Michael Waskom <mwaskom at stanford.edu> wrote:
>
> Hi Kirstie,
>
> What do the vtx_data, ctab, and names that you are passing look like?
>
> Best,
> Michael
>
> On Thu, Apr 14, 2016 at 2:57 PM, Kirstie Whitaker <kw401 at cam.ac.uk> wrote:
>
>> Hi Pysurfer and Nibabel teams,
>>
>> I have some code that is heavily stolen from the Display ROI values
>> <https://pysurfer.github.io/examples/plot_parc_values.html> pysurfer
>> example.
>>
>> I'd like to be able to overlay the same ROI information in BrainNet
>> <https://www.nitrc.org/projects/bnv/> (as they allow plotting a network
>> on top of a freesurfer image and because my colleague already uses it!) and
>> so I tried to use the write_annot
>> <http://nipy.org/nibabel/reference/nibabel.freesurfer.html#write-annot>
>> command in nibabel.
>>
>> The command was (at the end of the example linked above)
>>
>> nib.freesurfer.io.write_annot('output.annot', vtx_data, ctab, names)
>>
>> Unfortunately this file does not load up in freeview. I have a feeling
>> that's because I'm passing the wrong information to the write_annot command.
>>
>> Any suggestions on what to do?
>>
>> Thank you!
>> Kx
>>
>> --
>> Kirstie Whitaker, PhD
>> Research Associate
>>
>> Department of Psychiatry
>> University of Cambridge
>>
>> *Mailing Address*
>> Brain Mapping Unit
>> Department of Psychiatry
>> Sir William Hardy Building
>> Downing Street
>> Cambridge CB2 3EB
>>
>> *Phone: *+44 7583 535 307
>> *Website:* www.kirstiewhitaker.com
>>
>> _______________________________________________
>> Neuroimaging mailing list
>> Neuroimaging at python.org
>> https://mail.python.org/mailman/listinfo/neuroimaging
>>
>>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20160414/48a6122a/attachment.html>


More information about the Neuroimaging mailing list