Hello all, Is there a way to expand a GM label into the white matter by n voxels?
Corinna
There is not a single command to do it, but you could do something like
mri_binarize --i aparc+aseg.mgz --wm --o wmmask.mgz # mask of white matter mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17 mri_binarize --i seg.mgz --match 17 --dilate 2 --o mask17.dil2.mgz # mask of seg 17 dilated by 2 voxels fscalc wmmask.mgz and mask17.dil2.mgz --o mask17.dil2.wm.mgz # seg 17 inside WM mri_concat mask17.mgz mask17.dil2.wm.mgz --sum --o mask17+wm.mgz # seg 17 plus dilation into WM
doug
On 11/04/2013 11:38 AM, Corinna Bauer wrote:
Hello all, Is there a way to expand a GM label into the white matter by n voxels?
Corinna
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
ok thanks, I'll give that a try. I would have to do that for each of the segmentations of interest and I get the number from the LUT?
On Mon, Nov 4, 2013 at 11:47 AM, Douglas N Greve greve@nmr.mgh.harvard.eduwrote:
There is not a single command to do it, but you could do something like
mri_binarize --i aparc+aseg.mgz --wm --o wmmask.mgz # mask of white matter mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17 mri_binarize --i seg.mgz --match 17 --dilate 2 --o mask17.dil2.mgz # mask of seg 17 dilated by 2 voxels fscalc wmmask.mgz and mask17.dil2.mgz --o mask17.dil2.wm.mgz # seg 17 inside WM mri_concat mask17.mgz mask17.dil2.wm.mgz --sum --o mask17+wm.mgz # seg 17 plus dilation into WM
doug
On 11/04/2013 11:38 AM, Corinna Bauer wrote:
Hello all, Is there a way to expand a GM label into the white matter by n voxels?
Corinna
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 greve@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.
Yes. As Bruce mentioned you can also use the program that creates the wmparc (mri_aparc2aseg). You can look in the recon-all.log file for the command line (there will be two in there, one to create aparc+aseg and one to create wmparc). You can run this command with --wmparc-dmax to set the maximum distance from cortex to dilate the voxels. Make sure to name the output something other than wmparc.mgz so you don't overwrite what is there. When it is done, there will be a WM label for each cortical label. Is this what you want? It won't do this for subcortical structures. doug
On 11/04/2013 12:25 PM, Corinna Bauer wrote:
ok thanks, I'll give that a try. I would have to do that for each of the segmentations of interest and I get the number from the LUT?
On Mon, Nov 4, 2013 at 11:47 AM, Douglas N Greve <greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
There is not a single command to do it, but you could do something like mri_binarize --i aparc+aseg.mgz --wm --o wmmask.mgz # mask of white matter mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17 mri_binarize --i seg.mgz --match 17 --dilate 2 --o mask17.dil2.mgz # mask of seg 17 dilated by 2 voxels fscalc wmmask.mgz and mask17.dil2.mgz --o mask17.dil2.wm.mgz # seg 17 inside WM mri_concat mask17.mgz mask17.dil2.wm.mgz --sum --o mask17+wm.mgz # seg 17 plus dilation into WM doug On 11/04/2013 11:38 AM, Corinna Bauer wrote: > Hello all, > Is there a way to expand a GM label into the white matter by n voxels? > > Corinna > > > _______________________________________________ > 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 greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 <tel:617-724-2358> Fax: 617-726-7422 <tel:617-726-7422> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://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.
I think that the first option you provided is more along the lines of what I'm looking for. Thanks
Corinna
On Mon, Nov 4, 2013 at 5:37 PM, Douglas N Greve greve@nmr.mgh.harvard.eduwrote:
Yes. As Bruce mentioned you can also use the program that creates the wmparc (mri_aparc2aseg). You can look in the recon-all.log file for the command line (there will be two in there, one to create aparc+aseg and one to create wmparc). You can run this command with --wmparc-dmax to set the maximum distance from cortex to dilate the voxels. Make sure to name the output something other than wmparc.mgz so you don't overwrite what is there. When it is done, there will be a WM label for each cortical label. Is this what you want? It won't do this for subcortical structures. doug
On 11/04/2013 12:25 PM, Corinna Bauer wrote:
ok thanks, I'll give that a try. I would have to do that for each of the segmentations of interest and I get the number from the LUT?
On Mon, Nov 4, 2013 at 11:47 AM, Douglas N Greve < greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
There is not a single command to do it, but you could do something like mri_binarize --i aparc+aseg.mgz --wm --o wmmask.mgz # mask of white matter mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17 mri_binarize --i seg.mgz --match 17 --dilate 2 --o mask17.dil2.mgz # mask of seg 17 dilated by 2 voxels fscalc wmmask.mgz and mask17.dil2.mgz --o mask17.dil2.wm.mgz # seg 17 inside WM mri_concat mask17.mgz mask17.dil2.wm.mgz --sum --o mask17+wm.mgz # seg 17 plus dilation into WM doug On 11/04/2013 11:38 AM, Corinna Bauer wrote: > Hello all, > Is there a way to expand a GM label into the white matter by n voxels? > > Corinna > > > _______________________________________________ > 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 greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 <tel:617-724-2358> Fax: 617-726-7422 <tel:617-726-7422> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://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.eduhttps://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.-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@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/
Hi Doug, I don't see anywhere a seg.mgz.
mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17
Corinna
On Tue, Nov 5, 2013 at 11:38 AM, Corinna Bauer corinnab83@gmail.com wrote:
I think that the first option you provided is more along the lines of what I'm looking for. Thanks
Corinna
On Mon, Nov 4, 2013 at 5:37 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu
wrote:
Yes. As Bruce mentioned you can also use the program that creates the wmparc (mri_aparc2aseg). You can look in the recon-all.log file for the command line (there will be two in there, one to create aparc+aseg and one to create wmparc). You can run this command with --wmparc-dmax to set the maximum distance from cortex to dilate the voxels. Make sure to name the output something other than wmparc.mgz so you don't overwrite what is there. When it is done, there will be a WM label for each cortical label. Is this what you want? It won't do this for subcortical structures. doug
On 11/04/2013 12:25 PM, Corinna Bauer wrote:
ok thanks, I'll give that a try. I would have to do that for each of the segmentations of interest and I get the number from the LUT?
On Mon, Nov 4, 2013 at 11:47 AM, Douglas N Greve < greve@nmr.mgh.harvard.edu mailto:greve@nmr.mgh.harvard.edu> wrote:
There is not a single command to do it, but you could do something like mri_binarize --i aparc+aseg.mgz --wm --o wmmask.mgz # mask of white matter mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17 mri_binarize --i seg.mgz --match 17 --dilate 2 --o mask17.dil2.mgz # mask of seg 17 dilated by 2 voxels fscalc wmmask.mgz and mask17.dil2.mgz --o mask17.dil2.wm.mgz # seg17 inside WM mri_concat mask17.mgz mask17.dil2.wm.mgz --sum --o mask17+wm.mgz # seg 17 plus dilation into WM
doug On 11/04/2013 11:38 AM, Corinna Bauer wrote: > Hello all, > Is there a way to expand a GM label into the white matter by n voxels? > > Corinna > > > _______________________________________________ > 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 greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 <tel:617-724-2358> Fax: 617-726-7422 <tel:617-726-7422> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://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.-- Douglas N. Greve, Ph.D. MGH-NMR Center greve@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/
just use aseg or aparc+aseg. btw 17 = left hippocampus
On 11/18/2013 12:41 PM, Corinna Bauer wrote:
Hi Doug, I don't see anywhere a seg.mgz.
mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17
Corinna
On Tue, Nov 5, 2013 at 11:38 AM, Corinna Bauer <corinnab83@gmail.com mailto:corinnab83@gmail.com> wrote:
I think that the first option you provided is more along the lines of what I'm looking for. Thanks Corinna On Mon, Nov 4, 2013 at 5:37 PM, Douglas N Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> wrote: Yes. As Bruce mentioned you can also use the program that creates the wmparc (mri_aparc2aseg). You can look in the recon-all.log file for the command line (there will be two in there, one to create aparc+aseg and one to create wmparc). You can run this command with --wmparc-dmax to set the maximum distance from cortex to dilate the voxels. Make sure to name the output something other than wmparc.mgz so you don't overwrite what is there. When it is done, there will be a WM label for each cortical label. Is this what you want? It won't do this for subcortical structures. doug On 11/04/2013 12:25 PM, Corinna Bauer wrote: ok thanks, I'll give that a try. I would have to do that for each of the segmentations of interest and I get the number from the LUT? On Mon, Nov 4, 2013 at 11:47 AM, Douglas N Greve <greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>>> wrote: There is not a single command to do it, but you could do something like mri_binarize --i aparc+aseg.mgz --wm --o wmmask.mgz # mask of white matter mri_binarize --i seg.mgz --match 17 --o mask17.mgz # mask of seg 17 mri_binarize --i seg.mgz --match 17 --dilate 2 --o mask17.dil2.mgz # mask of seg 17 dilated by 2 voxels fscalc wmmask.mgz and mask17.dil2.mgz --o mask17.dil2.wm.mgz # seg 17 inside WM mri_concat mask17.mgz mask17.dil2.wm.mgz --sum --o mask17+wm.mgz # seg 17 plus dilation into WM doug On 11/04/2013 11:38 AM, Corinna Bauer wrote: > Hello all, > Is there a way to expand a GM label into the white matter by n voxels? > > Corinna > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu> <mailto: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 greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> <mailto:greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu>> Phone Number: 617-724-2358 <tel:617-724-2358> <tel:617-724-2358 <tel:617-724-2358>> Fax: 617-726-7422 <tel:617-726-7422> <tel:617-726-7422 <tel:617-726-7422>> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting> <http://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> <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> <mailto: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. -- Douglas N. Greve, Ph.D. MGH-NMR Center greve@nmr.mgh.harvard.edu <mailto:greve@nmr.mgh.harvard.edu> Phone Number: 617-724-2358 <tel:617-724-2358> Fax: 617-726-7422 <tel:617-726-7422> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting <http://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@nmr.mgh.harvard.edu