External Email - Use Caution
Hi FreeSurfer experts,
I am trying to run write_annonation program in MATLAB and getting following error:
[v, L, ct] = read_annotation('lh.Yeo2011_7Networks_N1000.annot'); ct.table(1:6,1:3) = 1; write_annotation('lh_Yeo2011_DMN',v,L,ct);
Error using fwrite Invalid file identifier. Use fopen to generate a valid file identifier.
Error in write_annotation (line 55) count = fwrite(fp, int32(length(label)), 'int');
I would really appreciate any help in resolving this issue.
Thanks !
Does it work if you take out that change to ct.table?
On 7/15/2020 3:34 AM, Martin Juneja wrote:
External Email - Use Caution
Hi FreeSurfer experts,
I am trying to run write_annonation program in MATLAB and getting following error:
[v, L, ct] = read_annotation('lh.Yeo2011_7Networks_N1000.annot'); ct.table(1:6,1:3) = 1; write_annotation('lh_Yeo2011_DMN',v,L,ct);
Error using fwrite Invalid file identifier. Use fopen to generate a valid file identifier.
Error in write_annotation (line 55) count = fwrite(fp, int32(length(label)), 'int');
I would really appreciate any help in resolving this issue.
Thanks !
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
External Email - Use Caution
I tried reading and writing lh.aparc.annot of bert, and it works ONLY if you change the output filename by adding a file extension.
Try
write_annotation('lh_Yeo2011_DMN.annot',v,L,ct);
Tim
On July 15, 2020 at 3:56 PM "Douglas N. Greve" dgreve@mgh.harvard.edu wrote:
Does it work if you take out that change to ct.table?
On 7/15/2020 3:34 AM, Martin Juneja wrote:
External Email - Use Caution
Hi FreeSurfer experts,
I am trying to run write_annonation program in MATLAB and getting following error:
[v, L, ct] = read_annotation('lh.Yeo2011_7Networks_N1000.annot'); ct.table(1:6,1:3) = 1; write_annotation('lh_Yeo2011_DMN',v,L,ct);
Error using fwrite Invalid file identifier. Use fopen to generate a valid file identifier.
Error in write_annotation (line 55) count = fwrite(fp, int32(length(label)), 'int');
I would really appreciate any help in resolving this issue.
Thanks !
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu