Re: [Freesurfer] creating custom color table annotation file
Dear Freesurfer experts, Last week I asked a question about altering annotation and color tables so that I could plot groups of vertices that covaried together. I have figured out the solution to this, if anyone else is trying to do this too. You can read in an annotation file with the read_annotation.m function in Matlab. You can then edit the color table (a structure in Matlab) and then save the newly edited annotation file using write_annotation.m. I came across a couple of interesting issues when I was editing the colors and I was wondering if anyone knew the answers to them. 1. It looks like Freesurfer ultimately uses the decimal value for the specified color that is in the “label” variable. For example, if you wanted an all white brain, you would put in “16777215” in 163843 rows in 1 column in the variable “labels.” If you edit colortable.table, though this does not seem to affect anything. What is the purpose of corlortable.table if the label file overrides anything you put in the colortable.table? 2. I also noticed that the R G B values for colortable.table are backwards. To specify the correct color you have to enter it B G R. Does anyone know why this is the case? 3. Along those same lines, you need to enter the decimal color that is in the B G R order, not in R G B order. For example, if you enter 255, Freesurfer displays this as red, not blue. From what I researched, the correct decimal value for blue is 255. To get Freesurfer to display blue, you actually need to enter in 16711680, which is traditionally red. Why is this? I find it to be quite confusing. Perhaps these issues have already been discussed on the listserve, and if they have, could someone direct me to the discussion. I’ve looking through the archives extensively. Thank you so much for any suggestions you may have. Maria On Fri, May 16, 2014 at 4:02 PM, Maria Jalbrzikowski mjalbrzikow...@gmail.com wrote: Dear Freesurfer experts, I would like to get your help. I extracted cortical thickness values from each vertex from each of my individual subjects (example: path/subject_id/surf/lh.thickness.fsaverage.mgh). I then ran a covariance analysis over the whole group and identified modules or groups of vertices that covary together. The modules are given the names of colors. I end up with a module (color) assigned to each vertex. I now want to visualize this data (so I can if these module reflect specific neuroanatomical structures), but I'm not sure about how to do this. Does anyone know how to do this? I tried to make a new color table, with my different module colors as the structures. I don't know how to then incorporate this information so that I can view it. I've read the tutorials on the label and annotation files, but I have only become more confused. If anyone can help me with this problem, I'd be very greatful! Thank you, Maria -- Maria Jalbrzikowski, Ph.D. Department of Psychiatry Biobehavioral Sciences University of California, Los Angeles -- Maria Jalbrzikowski, Ph.D. Department of Psychiatry Biobehavioral Sciences University of California, Los Angeles ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] creating custom color table annotation file
Hi Maria I think we didn't realize there was any standard. As I remember, we do: r 16 + g 8 + b and stuff them into a 32 bit quantity cheers Bruce On Wed, 21 May 2014, Maria Jalbrzikowski wrote: Dear Freesurfer experts, Last week I asked a question about altering annotation and color tables so that I could plot groups of vertices that covaried together. I have figured out the solution to this, if anyone else is trying to do this too. You can read in an annotation file with the read_annotation.m function in Matlab. You can then edit the color table (a structure in Matlab) and then save the newly edited annotation file using write_annotation.m. I came across a couple of interesting issues when I was editing the colors and I was wondering if anyone knew the answers to them. 1. It looks like Freesurfer ultimately uses the decimal value for the specified color that is in the “label” variable. For example, if you wanted an all white brain, you would put in “16777215” in 163843 rows in 1 column in the variable “labels.” If you edit colortable.table, though this does not seem to affect anything. What is the purpose of corlortable.table if the label file overrides anything you put in the colortable.table? 2. I also noticed that the R G B values for colortable.table are backwards. To specify the correct color you have to enter it B G R. Does anyone know why this is the case? 3. Along those same lines, you need to enter the decimal color that is in the B G R order, not in R G B order. For example, if you enter 255, Freesurfer displays this as red, not blue. From what I researched, the correct decimal value for blue is 255. To get Freesurfer to display blue, you actually need to enter in 16711680, which is traditionally red. Why is this? I find it to be quite confusing. Perhaps these issues have already been discussed on the listserve, and if they have, could someone direct me to the discussion. I’ve looking through the archives extensively. Thank you so much for any suggestions you may have. Maria On Fri, May 16, 2014 at 4:02 PM, Maria Jalbrzikowski mjalbrzikow...@gmail.com wrote: Dear Freesurfer experts, I would like to get your help. I extracted cortical thickness values from each vertex from each of my individual subjects (example: path/subject_id/surf/lh.thickness.fsaverage.mgh). I then ran a covariance analysis over the whole group and identified modules or groups of vertices that covary together. The modules are given the names of colors. I end up with a module (color) assigned to each vertex. I now want to visualize this data (so I can if these module reflect specific neuroanatomical structures), but I'm not sure about how to do this. Does anyone know how to do this? I tried to make a new color table, with my different module colors as the structures. I don't know how to then incorporate this information so that I can view it. I've read the tutorials on the label and annotation files, but I have only become more confused. If anyone can help me with this problem, I'd be very greatful! Thank you, Maria -- Maria Jalbrzikowski, Ph.D. Department of Psychiatry Biobehavioral Sciences University of California, Los Angeles -- Maria Jalbrzikowski, Ph.D. Department of Psychiatry Biobehavioral Sciences University of California, Los Angeles ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] creating custom color table annotation file
You can try mris_label2annot. An alternative is to create the annoation in matlab and then use write_annotation.m (you might use read_annotation.m just to get the structure right) doug On 05/16/2014 07:02 PM, Maria Jalbrzikowski wrote: Dear Freesurfer experts, I would like to get your help. I extracted cortical thickness values from each vertex from each of my individual subjects (example: path/subject_id/surf/lh.thickness.fsaverage.mgh). I then ran a covariance analysis over the whole group and identified modules or groups of vertices that covary together. The modules are given the names of colors. I end up with a module (color) assigned to each vertex. I now want to visualize this data (so I can if these module reflect specific neuroanatomical structures), but I'm not sure about how to do this. Does anyone know how to do this? I tried to make a new color table, with my different module colors as the structures. I don't know how to then incorporate this information so that I can view it. I've read the tutorials on the label and annotation files, but I have only become more confused. If anyone can help me with this problem, I'd be very greatful! Thank you, Maria -- Maria Jalbrzikowski, Ph.D. Department of Psychiatry Biobehavioral Sciences University of California, Los Angeles ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer -- Douglas N. Greve, Ph.D. MGH-NMR Center gr...@nmr.mgh.harvard.edu Phone Number: 617-724-2358 Fax: 617-726-7422 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2 www.nmr.mgh.harvard.edu/facility/filedrop/index.html Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/ ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
[Freesurfer] creating custom color table annotation file
Dear Freesurfer experts, I would like to get your help. I extracted cortical thickness values from each vertex from each of my individual subjects (example: path/subject_id/surf/lh.thickness.fsaverage.mgh). I then ran a covariance analysis over the whole group and identified modules or groups of vertices that covary together. The modules are given the names of colors. I end up with a module (color) assigned to each vertex. I now want to visualize this data (so I can if these module reflect specific neuroanatomical structures), but I'm not sure about how to do this. Does anyone know how to do this? I tried to make a new color table, with my different module colors as the structures. I don't know how to then incorporate this information so that I can view it. I've read the tutorials on the label and annotation files, but I have only become more confused. If anyone can help me with this problem, I'd be very greatful! Thank you, Maria -- Maria Jalbrzikowski, Ph.D. Department of Psychiatry Biobehavioral Sciences University of California, Los Angeles ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.