You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello,freesurfer
Previously, rh.white and rh.aparc.2009s.annot were used to generate vertex_id
and vertex_label,
'
surface = Surface.read_triangular('rh.white')
surface.load_annotation_file('rh.aparc.a2009s.annot')
with open("rhlabels.txt","w") as f:
for vertex_index, vertex in enumerate(surface.vertices):
vertex_label_index = surface.annotation.vertex_label_index[vertex_index]
vertex_label = surface.annotation.labels[vertex_label_index]
#print(vertex_index, vertex, vertex_label)
#f.write("vertex_index:{} vertexlabel:{} \n".format(vertex_index,
vertex_label))
f.write("vertex_index:{} vertex_label:{}\n".format(vertex_index,
vertex_label))
'
the output:vertex_index:0 vertexlabel:Label(name=S_precentral-sup-part, index=70, color=#1514c8)
after some algorthm: vertex_index:0 label_index=71
and the label_index obtained after a certain algorithm was updated to replace the vertex_labe_index in rh.aparc.2009s.annot, and then load the result with freeview. But I don't know how to replace the vertex_label_index value in .annot file?
The text was updated successfully, but these errors were encountered:
hello,freesurfer
Previously, rh.white and rh.aparc.2009s.annot were used to generate vertex_id
and vertex_label,
'
surface = Surface.read_triangular('rh.white')
surface.load_annotation_file('rh.aparc.a2009s.annot')
with open("rhlabels.txt","w") as f:
for vertex_index, vertex in enumerate(surface.vertices):
vertex_label_index = surface.annotation.vertex_label_index[vertex_index]
vertex_label = surface.annotation.labels[vertex_label_index]
#print(vertex_index, vertex, vertex_label)
#f.write("vertex_index:{} vertexlabel:{} \n".format(vertex_index,
vertex_label))
f.write("vertex_index:{} vertex_label:{}\n".format(vertex_index,
vertex_label))
'
the output:vertex_index:0 vertexlabel:Label(name=S_precentral-sup-part, index=70, color=#1514c8)
after some algorthm: vertex_index:0 label_index=71
and the label_index obtained after a certain algorithm was updated to replace the vertex_labe_index in rh.aparc.2009s.annot, and then load the result with freeview. But I don't know how to replace the vertex_label_index value in .annot file?
The text was updated successfully, but these errors were encountered: