probably easiest to do in matlab: [v,M,mr] = load_mgh('aseg.mgz'); ind = find(v ~= 17 & v ~= 53 & v ~= 18 & v ~= 54) ; v(ind) = zeros(size(ind)); save_mgh(v, 'aseg.mtl.mgz', M,mr);
cheers Bruce On Thu, 24 May 2012, Martina Butt wrote: > Thanks for your help, Bruce! > > Unfortunately, this also leads to a mgz.file where hippocampus and amygdala > are "merged" together so that I can't see anymore what is hippocampus and > what is amygdala (both have same value). I tried some other things but > nothing appears to work. Any other suggestions? > > Many thanks, Martina > > Quoting Bruce Fischl <fis...@nmr.mgh.harvard.edu> on Thu, 24 May 2012 > 08:53:14 -0400 (EDT): > >> Hi Martina >> you can use mri_binarize --match 17 --match 18... to do this. >> >> cheers >> Bruce >> >> >> >> On Thu, 24 May 2012, Martina Papmeyer wrote: >> >>> Hello everyone, >>> >>> I guess that this might be a simple question but I couldn't find an >>> answer to my problem yet. >>> >>> I would like to extract and visualize four labels from my aseg.mgz >>> file for illustration purposes. I tried the following: >>> >>> mri_extract_label aseg.mgz 17 18 53 54 filename.mgz >>> >>> (the values correspond to left/right amygdala and left/right >>> hippocampus as specified in FreeSurferColorLUT.txt file) >>> >>> This command unfortunately combines all the four selected labels >>> together so that I can't differentiate amygdala and hippocampus >>> anymore when I load the filename.mgz file together with my >>> FreeSurferColorLUT.txt file in tkmedit. >>> >>> Is there any other FS tool I can use? >>> >>> Any form of help would be highly appreciated! >>> >>> Many thanks and all best wishes, Martina >>> >>> >> >> >> 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