How did you create that image? You can use mri_cor2label to extract the labels from aparc+aseg (it will take values > 255) doug
On 08/04/2014 01:16 PM, Krieger, Donald N. wrote: > > Thanks Doug, > > Got it. > > I've attached a sample image on which I've drawn transformed vectors from: > > 1.rh.cortex.label (red) > > 2.rh.V2.label_orig (blue) > > 3.rh.V2.label_white (yellow) > > 4.rh.V2.label_pial (aqua) > > I used mri_annotation2label to extract vectors from the aparc and BA > annotation files. > > I used mri_info to extract the tkr2scanner transform from aparc+aseg.mgz . > > You can see that the cut through the mri volume on which the dots are > drawn is slightly off. > > It would be helpful to hear if you think there is something else I > should check. > > The registration of dots with the white/gray matter boundary is > comparable for axial slices 2 cm apart top to bottom. > > For each label, I now need to extract vectors which fill the specified > volume, gray or white. > > It looks like this information is present in mri/filled.mgz but I have > not found a way which I understand to extract vectors from a .mgz volume. > > mri_cor2label appears to work but it uses –id labelid which I haven’t > been able to puzzle out. > > The documentation states that labelid ranges from 0-255 so it’s not > the same as that present in FreeSurferColorLUT.txt . > > Can you please explain this or put me out of my misery by telling me > mri_cor2label is not the tool to use. > > Finally, when I load aparc+aseg.mgz in freeview, subcortical > structures are clearly segmented including the cerebellum, basal > ganglia, etc. > > How do I extract these vectors into .label files? > > There is no aseg.annot in the label directory and none of the .annot > files yield .label files for these structures. > > Do I need to run something else which is not included by default in > recon-all to generate this file or is there some other route to get there? > > Regards, > > Don > > Don Krieger, Ph.D. > > Department of Neurological Surgery > > University of Pittsburgh > > (412)648-9654 Office > > (412)521-4431 Cell/Text > > > -----Original Message----- > > > From: freesurfer-boun...@nmr.mgh.harvard.edu [mailto:freesurfer- > > > boun...@nmr.mgh.harvard.edu] On Behalf Of Douglas N Greve > > > Sent: Friday, August 01, 2014 4:05 PM > > > To: freesurfer@nmr.mgh.harvard.edu > > > Subject: Re: [Freesurfer] FW: YANQ follow-up > > > > > > > > > Hi Don, try looking at this page for more info on our coordinate systems > > > > > > https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems > > > > > > > > > On 08/01/2014 10:47 AM, Bruce Fischl wrote: > > > > Hi Don > > > > > > > > the -rt nearest switch is for mri_convert. I'll leave the rest of the > > > > questions for Doug :) Bruce On Fri, 1 Aug 2014, Krieger, Donald N. > > > > wrote: > > > > > > > >> > > > >> Thanks for posting back so quickly, Bruce, and for the direction. > > > >> > > > >> > > > >> > > > >> Just to clarify, here is the command which I am using so you can see > > > >> the types of files on which I am operating. > > > >> > > > >> The working directory is ${FREESURFER_HOME}/subjects/bert . > > > >> > > > >> I'm putting each switch on a separate line: > > > >> > > > >> > > > >> > > > >> mri_label2label > > > >> > > > >> --s Sub125 > > > >> > > > >> --srclabel label/rh.cortex.label > > > >> > > > >> --trglabel testLabels/rh.cortext.label > > > >> > > > >> --xfm mri/transforms/talairach.xfm > > > >> > > > >> --xfm-invert > > > >> > > > >> --regmethod volume > > > >> > > > >> > > > >> > > > >> I plotted the output vectors for a single 1 mm slice using my tools. > > > >> > > > >> This is shown in the left panel of the attached jpg. > > > >> > > > >> The right panel shows the same vectors translated by hand to "fit." > > > >> > > > >> The size and shape are close so this appears to be in the right > > > >> direction. > > > >> > > > >> > > > >> > > > >> I would like to find the freesurfer coords --> MRI coords transform > > > >> and try it in place of talairach.xfm . > > > >> > > > >> I assume that the inverse of talairach.xfm is not the correct > > > >> transform to get from freesurfer --> MRI coordinates. > > > >> > > > >> Is there a way to extract the correct transform? It must have existed > > > >> early in the "recon-all" run and must also be accessible to > > > >> mri_convert -rl ... > > > >> > > > >> > > > >> > > > >> I tried --nt as you suggested but my version of mri_label2label > > > >> (stable5) > > > >> does not recognize it. > > > >> > > > >> I tried --regmethod surface --hemi rh and found that it gives > identical > > > >> results whether using --xfm-invert or not ! > > > >> > > > >> > > > >> > > > >> Regards, > > > >> > > > >> > > > >> > > > >> Don > > > >> > > > >> > > > >> > > > >> Don Krieger, Ph.D. > > > >> > > > >> Department of Neurological Surgery > > > >> > > > >> University of Pittsburgh > > > >> > > > >> (412)648-9654 Office > > > >> > > > >> (412)521-4431 Cell/Text > > > >> > > > >> > > > >> > > > >> > -----Original Message----- > > > >> > > > >> > From: freesurfer-boun...@nmr.mgh.harvard.edu > <mailto:freesurfer-boun...@nmr.mgh.harvard.edu> [mailto:freesurfer- > > > >> > > > >> > boun...@nmr.mgh.harvard.edu > <mailto:boun...@nmr.mgh.harvard.edu>] On Behalf Of Bruce Fischl > > > >> > > > >> > Sent: Friday, August 01, 2014 9:29 AM > > > >> > > > >> > To: Freesurfer support list > > > >> > > > >> > Subject: Re: [Freesurfer] FW: YANQ follow-up > > > >> > > > >> > > > > >> > > > >> > Hi Don > > > >> > > > >> > > > > >> > > > >> > try mri_label2label. Also, the if you are transforming label > volumes > > > >> > > > >> > you need to use nearest neighbor interpolation, so include the -rt > > > >> nearest > > > >> switch. > > > >> > > > >> > > > > >> > > > >> > cheers > > > >> > > > >> > Bruce > > > >> > > > >> > On Fri, 1 Aug 2014, Krieger, Donald N. wrote: > > > >> > > > >> > > > > >> > > > >> > > > > > >> > > > >> > > Hi All, > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > I am still in need of finding the tool sequence to generate > an ASCII > > > >> > > > >> > > file containing (1) voxel RAS coordinates (2) for a specific > label > > > >> > > > >> > > (3) using the original MRI coordinates rather than freesurfer > > > >> coordinates. > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > mri_convert -rl rawavg.mgz <input vol> <output vol> > > > >> > > > >> > > > > > >> > > > >> > > does generate a new output volume containing the “labelled” > voxels > > > >> > > > >> > > contained in <input vol> . I can tell because this volume > shows up > > > >> > > > >> > > more or less correctly in freeview although the color mapping > > > >> > > > >> > > appears to have changed or perhaps freeview is doing some kind of > > > >> “fill” > > > >> > > > >> > > operation differently depending on the loaded volume. I assume > > > >> > > > >> > > these are in the coordinates for rawavg.mgz but cannot tell for > > > >> sure. > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > I need to generate a list of these voxel coordinates from <output > > > >> > > > >> > > vol> to check and for my work. > > > >> > > > >> > > > > > >> > > > >> > > (1) Do I need to generate a new annotation file from <output vol> > > > >> > > > >> > > and then use mri_annotation2label to get there? I have not been > > > >> > > > >> > > able to find the tool sequence which generates the .annot files. > > > >> > > > >> > > > > > >> > > > >> > > (2) An alternative appears to be mri_label2label with –xfm > > > >> > > > >> > > xfmfile and possibly including --xfm-invert . I did get this > > > >> > > > >> > > command to complete successfully using > mri/transforms/talaraich.xfm > > > >> > > > >> > > but I presume this is not the correct transform. > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Thanks and best regards, > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Don > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Don Krieger, Ph.D. > > > >> > > > >> > > > > > >> > > > >> > > Department of Neurological Surgery > > > >> > > > >> > > > > > >> > > > >> > > University of Pittsburgh > > > >> > > > >> > > > > > >> > > > >> > > (412)648-9654 Office > > > >> > > > >> > > > > > >> > > > >> > > (412)521-4431 Cell/Text > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > From: Krieger, Donald N. > > > >> > > > >> > > Sent: Thursday, July 31, 2014 9:36 AM > > > >> > > > >> > > To: freesurfer@nmr.mgh.harvard.edu > <mailto:freesurfer@nmr.mgh.harvard.edu> > > > >> > > > >> > > Subject: YANQ follow-up > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Thanks again for the pointer, Bruce. > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > You wrote: > > > >> > > > >> > > > > > >> > > > >> > > … mri_convert -rl rawavg.mgz <input vol> <output vol> > > > >> > > > >> > > > > > >> > > > >> > > which does produce an output volume from which I now need to > > > extract > > > >> > > > >> > > RAS voxel coordinates. > > > >> > > > >> > > > > > >> > > > >> > > A pointer to a keyboard command would be most welcome. > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Of interest is the difference between the color mappings for the > > > >> > > > >> > > input and output volumes in freeview. > > > >> > > > >> > > > > > >> > > > >> > > When using the lookup table in freeview they are quite different > > > >> > > > >> > > whereas in grayscale they are almost identical. > > > >> > > > >> > > > > > >> > > > >> > > I wonder if this is contributing to my difficulty in finding > a tool > > > >> > > > >> > > to extract the voxel coordinates. > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Thanks again. > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Regards, > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Don > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > Don Krieger, Ph.D. > > > >> > > > >> > > > > > >> > > > >> > > Department of Neurological Surgery > > > >> > > > >> > > > > > >> > > > >> > > University of Pittsburgh > > > >> > > > >> > > > > > >> > > > >> > > (412)648-9654 Office > > > >> > > > >> > > > > > >> > > > >> > > (412)521-4431 Cell/Text > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > > > >> > > > >> > > > >> > > > >> > > > >> > > > > > > > > > > > > _______________________________________________ > > > > Freesurfer mailing list > > > > Freesurfer@nmr.mgh.harvard.edu <mailto: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 <mailto: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 > <http://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 <mailto: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 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