No. I'd write a script to do it

On 02/12/2018 12:17 PM, Michiko H. wrote:
> Hi Doug,
>
> Thanks - this is extremely helpful!
>
> With regard to the first command: mri_binarize --replace 1001 3001 --i 
> aparc+aseg+2mm.masked.nii.gz --o aparc+aseg+2mm.masked.merged.nii.gz
> Since I'd like to replace every cortical label with its corresponding 
> WM label on both hemispheres, is there a more efficient way of doing 
> this rather than having to manually write '--replace 10xx 30xx' 
> repetitively?
>
> Thanks very much again!
> M.
>
> On Fri, Feb 9, 2018 at 12:53 PM, Douglas Greve 
> <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>
>
>
>     On 2/6/18 5:26 PM, Michiko H. wrote:
>>     Hi Doug,
>>
>>     That's very helpful, thank you! I have 2 follow-up questions though:
>>
>>     1. Is it possible to merge the cortical label (e.g. label 1001
>>     ctx-lh-bankssts) with its corresponding label that extends into
>>     the WM (e.g. label 3001 wm-lh-bankssts)? I'm not completely sure
>>     but this may/may not give better results when tracking between
>>     labels as nodes.
>     You can use something like
>     mri_binarize --replaceonly 1001 3001 --i
>     aparc+aseg+2mm.masked.nii.gz --o aparc+aseg+2mm.masked.merged.nii.gz
>>
>>     2. Is it possible to include the subcortical structures in the
>>     final masked image?
>     Yes, use mri_binarize --i aparc+aseg+2mm.nii.gz --match 10 11 12
>     ... --o aparc+aseg+2mm.subcort.nii.gz
>     where 10 11 12 is a list of the ids of the subcortical structures
>     you want
>     Then
>     fscalc aparc+aseg+2mm.subcort.nii.gz add
>     aparc+aseg+2mm.masked.nii.gz -o both.nii.gz
>
>
>>
>>     Thank you so much!
>>     Michiko
>>
>>     On Mon, Feb 5, 2018 at 12:30 PM, Douglas Greve
>>     <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>
>>         You mean you want to remove everything but the WM labels? You
>>         can do it in two steps:
>>
>>         1. Create a mask of the wm labels:
>>
>>         mri_binarize --i aparc+aseg+2mm.nii.gz --min 2999.5 --max
>>         4035.5 --o wm.mask.nii.gz
>>
>>         2. Mask the wmparc:
>>
>>         mri_mask aparc+aseg+2mm.nii.gz wm.mask.nii.gz
>>         aparc+aseg+2mm.masked.nii.gz
>>
>>
>>
>>
>>         On 2/4/18 5:28 PM, Michiko H. wrote:
>>>         Hi Freesurfer experts,
>>>
>>>         I am wondering if it is possible to remove the original
>>>         labels after extending the parcellation by 2mm into the WM
>>>         for tractography? I don't wish to have tractography run on
>>>         both sets of labels considering the algorithm would take
>>>         into account the streamlines terminating at nodes defined by
>>>         the labels so it doesn't quite make sense to count
>>>         streamlines terminating at both the original label
>>>         separately from the new label extending into the WM.
>>>
>>>         I used the following command for growing the parcellation
>>>         into WM:
>>>
>>>         mri_aparc2aseg --s subj --annot aparc --wmparc-dmax 2
>>>         --labelwm --hypo-as-wm --o
>>>         $SUBJECTS_DIR/$subj/mri/aparc+aseg+2mm.nii.gz
>>>
>>>
>>>         Would appreciate help and suggestions!
>>>
>>>
>>>         Thanks,
>>>
>>>         Michiko.
>>>
>>>
>>>
>>>         _______________________________________________
>>>         Freesurfer mailing list
>>>         Freesurfer@nmr.mgh.harvard.edu
>>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>         <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer>
>>
>>
>>         _______________________________________________
>>         Freesurfer mailing list
>>         Freesurfer@nmr.mgh.harvard.edu
>>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>         <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
>>         <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
>>     <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>     https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>     <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer>
>
>
>     _______________________________________________
>     Freesurfer mailing list
>     Freesurfer@nmr.mgh.harvard.edu <mailto:Freesurfer@nmr.mgh.harvard.edu>
>     https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>     <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
>     <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

Reply via email to