Re: [Freesurfer] How to avoid overlaps between volume labels?
Thank you all for your suggestions. I binarized my labels, used mri_concat --max, then re-binarize the volumes. It worked great. Thanks again, Yuko Yotsumoto On Jun 7, 2012, at 6:58 AM, Douglas Greve wrote: It depends on how graceful you want to be with resolving the overlap. One simple way would be the following: 1. Change the binary values in B.mgz to 2 and C.mgz to 3 (A.mgz is already 1). This can be done with mri_binarize 2. mri_concat A.mgz B.mgz C.mgz --max-index --o D.mgz D.mgz will have a value of 1 where A=1 but not B or C a value of 2 where B=1 but not C (regardless of A) a value of 3 where C=1 (regardless of A and B) This allows you to set some priority between A, B, and C 3. You can then re-binarize to get three new masks You can probably accomplish the same kind of thing with mri_mask as Bruce suggests. doug On 6/6/12 2:00 PM, Bruce Fischl wrote: or use mri_mask. Or binarize to 2,4,8 etc.. them and add them, then replace the unique overlap values with something else On Wed, 6 Jun 2012, Joshua Lee wrote: Well you could mri_binarize the three volumes, then subtract regions using fslmaths from the FSL suite. Of course this would create gaps between your formerly adjacent regions. Joshua - Joshua Lee Graduate Student Center for Mind and Brain Department of Psychology University of California, Davis On Tue, Jun 5, 2012 at 11:46 PM, Yuko Yotsumotoyuk...@gmail.com wrote: Hello, With FreeSurfer v4.5, I have three functionally localized surface labels (A.label, B.label, C.label), and converted this label to volume by using mri_label2vol with --proj. I now have three volume labels, A.mgz, B.mgz, and C.mgz. Because these three labels are adjacent to each other, [A.mgz and B.mgz] and [B.mgz and C.mgz] share many voxels, and [A.mgz and C.mgz] also share a small number of voxels, while there is no overlap in the surface labels. I'd like to make these volume labels independent by somehow creating boundary into the volume so that each volume labels never share any voxels. What would be the best way to do so? Is there anything I can do using a command line? Best, Yuko Yotsumoto ___ 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 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
Re: [Freesurfer] How to avoid overlaps between volume labels?
Well you could mri_binarize the three volumes, then subtract regions using fslmaths from the FSL suite. Of course this would create gaps between your formerly adjacent regions. Joshua - Joshua Lee Graduate Student Center for Mind and Brain Department of Psychology University of California, Davis On Tue, Jun 5, 2012 at 11:46 PM, Yuko Yotsumoto yuk...@gmail.com wrote: Hello, With FreeSurfer v4.5, I have three functionally localized surface labels (A.label, B.label, C.label), and converted this label to volume by using mri_label2vol with --proj. I now have three volume labels, A.mgz, B.mgz, and C.mgz. Because these three labels are adjacent to each other, [A.mgz and B.mgz] and [B.mgz and C.mgz] share many voxels, and [A.mgz and C.mgz] also share a small number of voxels, while there is no overlap in the surface labels. I'd like to make these volume labels independent by somehow creating boundary into the volume so that each volume labels never share any voxels. What would be the best way to do so? Is there anything I can do using a command line? Best, Yuko Yotsumoto ___ 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 mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] How to avoid overlaps between volume labels?
or use mri_mask. Or binarize to 2,4,8 etc.. them and add them, then replace the unique overlap values with something else On Wed, 6 Jun 2012, Joshua Lee wrote: Well you could mri_binarize the three volumes, then subtract regions using fslmaths from the FSL suite. Of course this would create gaps between your formerly adjacent regions. Joshua - Joshua Lee Graduate Student Center for Mind and Brain Department of Psychology University of California, Davis On Tue, Jun 5, 2012 at 11:46 PM, Yuko Yotsumoto yuk...@gmail.com wrote: Hello, With FreeSurfer v4.5, I have three functionally localized surface labels (A.label, B.label, C.label), and converted this label to volume by using mri_label2vol with --proj. I now have three volume labels, A.mgz, B.mgz, and C.mgz. Because these three labels are adjacent to each other, [A.mgz and B.mgz] and [B.mgz and C.mgz] share many voxels, and [A.mgz and C.mgz] also share a small number of voxels, while there is no overlap in the surface labels. I'd like to make these volume labels independent by somehow creating boundary into the volume so that each volume labels never share any voxels. What would be the best way to do so? Is there anything I can do using a command line? Best, Yuko Yotsumoto ___ 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 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
Re: [Freesurfer] How to avoid overlaps between volume labels?
It depends on how graceful you want to be with resolving the overlap. One simple way would be the following: 1. Change the binary values in B.mgz to 2 and C.mgz to 3 (A.mgz is already 1). This can be done with mri_binarize 2. mri_concat A.mgz B.mgz C.mgz --max-index --o D.mgz D.mgz will have a value of 1 where A=1 but not B or C a value of 2 where B=1 but not C (regardless of A) a value of 3 where C=1 (regardless of A and B) This allows you to set some priority between A, B, and C 3. You can then re-binarize to get three new masks You can probably accomplish the same kind of thing with mri_mask as Bruce suggests. doug On 6/6/12 2:00 PM, Bruce Fischl wrote: or use mri_mask. Or binarize to 2,4,8 etc.. them and add them, then replace the unique overlap values with something else On Wed, 6 Jun 2012, Joshua Lee wrote: Well you could mri_binarize the three volumes, then subtract regions using fslmaths from the FSL suite. Of course this would create gaps between your formerly adjacent regions. Joshua - Joshua Lee Graduate Student Center for Mind and Brain Department of Psychology University of California, Davis On Tue, Jun 5, 2012 at 11:46 PM, Yuko Yotsumotoyuk...@gmail.com wrote: Hello, With FreeSurfer v4.5, I have three functionally localized surface labels (A.label, B.label, C.label), and converted this label to volume by using mri_label2vol with --proj. I now have three volume labels, A.mgz, B.mgz, and C.mgz. Because these three labels are adjacent to each other, [A.mgz and B.mgz] and [B.mgz and C.mgz] share many voxels, and [A.mgz and C.mgz] also share a small number of voxels, while there is no overlap in the surface labels. I'd like to make these volume labels independent by somehow creating boundary into the volume so that each volume labels never share any voxels. What would be the best way to do so? Is there anything I can do using a command line? Best, Yuko Yotsumoto ___ 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 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 mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] How to avoid overlaps between volume labels?
Hi Yuko I think you can use multiple label tags when using mri_label2vol like below: mri_label2vol --subject $subject_name --hemi $hemi --label $label1 --label $label2 --label $label3 --temp $template --o $output --fillthresh 0.3 --proj frac 0 1 0.1 --identity The output volume would have non-zero voxels, marked with three different values. Best Cheol Cheol Han, Ph.D Computational Neuroscience and Neuroinformatics Department of Brain and Cognitive Sciences Seoul National University Korea ___ 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.