Re: [Freesurfer] registrations
why not just use the aseg? it has been cleaned up with the surfaces, so it should represent everything inside the pial surface pretty well. On 3/2/2020 4:52 PM, Octavian Lie wrote: > External Email - Use Caution > > Dear Bruce & All, > > Sure, I wanted some advice from the greats before registering pre and > posteresection (intrasubject) scans. > I tried both registrations on several patient data, bbregister clearly > superior to mri_robust_register (used with orig/mgz) for both > postresection T1 or T2 registration to FS output, even when using a > mask for the resection volume with the latter. > The best results were using one hemisphere option (the > healthy/nonresected one), and the default or init-fsl for > initialization (init-spm and init-rr failed often), smth like > bbregister --s subj --mov T1postop.nii --lta register_hemiR.lta --o > T1bbr_hemiR_fsl.nii --t1 --rh-only --init-fsl > > My last question relates to creating a binary mask from pial surfaces, > but to include mesial temporal structures (amygdala, hippocampus). I > tried the following, but the mris_fill process is killed (OOM) after I > upgraded to ubuntu 18.04. Is there another, more straightforward > solution for the mask? > Thank you, > Octavian > > mris_fill -c -r 1 surf/rh.pial mri/rh.pial.filled.mgz & \ > mris_fill -c -r 1 surf/lh.pial mri/lh.pial.filled.mgz & \ > mri_concat --combine --i mri/rh.pial.filled.mgz --i > mri/lh.pial.filled.mgz --o mri/pial.filled.mgz > cd ./mri ; \ > mri_binarize --i aseg.mgz --match 5 --match 9 --match 10 --match 14 > --match 17 --match 18 --match 19\ > --match 25 --match 31 --match 44 --match 48 --match 49 --match 53 > --match 54 --match 55 --match 57\ > --match 63 --match 86 --match 96 --match 97 --match 105 --match 106 > --match 114 --match 115\ > --match 195 --match 199 --match 203 --match 204 --match 205 --match > 216 --match 222 --match 225\ > --match 507 --match 557 --match 1200 --match 1201 --match 1205 > --match 1206 --match 2200 --match 2201\ > --match 2205 --match 2206 --o hippoamy.mask.mgz & \ > fscalc pial.filled.mgz add hippoamy.mask.mgz -o epimask.mgz > > > > > > > > On Sun, Feb 23, 2020 at 8:51 PM Bruce Fischl > wrote: >> Hi Octavian >> >> 1. Not sure - you should try them. If you have reasonable surfaces I >> think bbreg lets you specify masks to ignore, which should be giant help >> in this scenario. On the other hand, mri_robust_register does this >> automatically. They are both relatively fast so why not try and see? >> >> 2. Same answer as before. mri_robust_register has flags to tell it to use >> an inter-modal similarity function, but you can also tell bbregister it is >> a T2 and it should do a good job (and implicitly register to the T1 since >> it is already aligned with the surface). >> >> 3. I'm not sure what you mean - can you explain further? >> >> cheers >> Bruce >> >> >> >> On Sun, >> 23 Feb 2020, Octavian Lie wrote: >> >>> External Email - Use Caution >>> >>> Dear All, >>> >>> I need to register: >>> 1. T1.mgz to a T1 postresection volume (no contrast), with large >>> resection. Which one should I use, mri_robust_register, or bbregister, >>> if the latter, which is the better initiator (nmi, spm, fsl)? >>> >>> 2. T1.mgz to a 3D FLAIR SPACE sequence (outside of the flair space >>> recon-all flag), which FS registration tool should I use? >>> >>> 3. I then need to mask the coregistered T1 postresection with a T1.mgz mask. >>> >>> I would appreciate commands (either names, or full command lines), >>> please advise. >>> >>> Thank you, >>> Octavian >>> >>> ___ >>> 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 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] registrations
External Email - Use Caution Dear Bruce & All, Sure, I wanted some advice from the greats before registering pre and posteresection (intrasubject) scans. I tried both registrations on several patient data, bbregister clearly superior to mri_robust_register (used with orig/mgz) for both postresection T1 or T2 registration to FS output, even when using a mask for the resection volume with the latter. The best results were using one hemisphere option (the healthy/nonresected one), and the default or init-fsl for initialization (init-spm and init-rr failed often), smth like bbregister --s subj --mov T1postop.nii --lta register_hemiR.lta --o T1bbr_hemiR_fsl.nii --t1 --rh-only --init-fsl My last question relates to creating a binary mask from pial surfaces, but to include mesial temporal structures (amygdala, hippocampus). I tried the following, but the mris_fill process is killed (OOM) after I upgraded to ubuntu 18.04. Is there another, more straightforward solution for the mask? Thank you, Octavian mris_fill -c -r 1 surf/rh.pial mri/rh.pial.filled.mgz & \ mris_fill -c -r 1 surf/lh.pial mri/lh.pial.filled.mgz & \ mri_concat --combine --i mri/rh.pial.filled.mgz --i mri/lh.pial.filled.mgz --o mri/pial.filled.mgz cd ./mri ; \ mri_binarize --i aseg.mgz --match 5 --match 9 --match 10 --match 14 --match 17 --match 18 --match 19\ --match 25 --match 31 --match 44 --match 48 --match 49 --match 53 --match 54 --match 55 --match 57\ --match 63 --match 86 --match 96 --match 97 --match 105 --match 106 --match 114 --match 115\ --match 195 --match 199 --match 203 --match 204 --match 205 --match 216 --match 222 --match 225\ --match 507 --match 557 --match 1200 --match 1201 --match 1205 --match 1206 --match 2200 --match 2201\ --match 2205 --match 2206 --o hippoamy.mask.mgz & \ fscalc pial.filled.mgz add hippoamy.mask.mgz -o epimask.mgz On Sun, Feb 23, 2020 at 8:51 PM Bruce Fischl wrote: > > Hi Octavian > > 1. Not sure - you should try them. If you have reasonable surfaces I > think bbreg lets you specify masks to ignore, which should be giant help > in this scenario. On the other hand, mri_robust_register does this > automatically. They are both relatively fast so why not try and see? > > 2. Same answer as before. mri_robust_register has flags to tell it to use > an inter-modal similarity function, but you can also tell bbregister it is > a T2 and it should do a good job (and implicitly register to the T1 since > it is already aligned with the surface). > > 3. I'm not sure what you mean - can you explain further? > > cheers > Bruce > > > > On Sun, > 23 Feb 2020, Octavian Lie wrote: > > >External Email - Use Caution > > > > Dear All, > > > > I need to register: > > 1. T1.mgz to a T1 postresection volume (no contrast), with large > > resection. Which one should I use, mri_robust_register, or bbregister, > > if the latter, which is the better initiator (nmi, spm, fsl)? > > > > 2. T1.mgz to a 3D FLAIR SPACE sequence (outside of the flair space > > recon-all flag), which FS registration tool should I use? > > > > 3. I then need to mask the coregistered T1 postresection with a T1.mgz mask. > > > > I would appreciate commands (either names, or full command lines), > > please advise. > > > > Thank you, > > Octavian > > > > ___ > > 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] registrations
I think most of these questions are for Doug and Martin, but why don't you try them both and see if either works out of the box? I would not use the brain.mgz or T1.mgz as they are aggressively normalized, unless you have run both the preop and postop scans through recon-all. You'll want the "same" images pre and post. Both should have or not have the skull and such. cheers Bruce On Sat, 29 Feb 2020, Octavian Lie wrote: >External Email - Use Caution > > Dear Bruce, thank you for your replies. > > I planned using this line for intrasubject pre to postop > (postresection) MRI T1 registration > 1. with mri_robust_register: > > mri_robust_register --mov postop.mgz --dst preop.mgz --lta > posttopre.lta --mapmov posttopre.mgz --weights posttopre-weights.mgz > --iscale --satit -- maskmov itksnap_rezvol.nii > > 2. with bbregister > bbregister --s sbj --mov postop.mgz --init-fsl --reg register.lta --o > posttopre.mgz --t1 > > Here are follow-up questions and clarifications: > 1. With bb register, I do not see an optional flag to accommodate a > custom mask volume, such as a mask of the resection volume; if this is > true, then one is not required, please advise > 2. If one wants to try mri_robust_register for pre to postop MRI > alignment, which pre volume from the FS recon pipeline would be > indicated for best results? T1.mgz, brain.mgz, or another? > 3. With bbregister, which of the several init options (coreg, header, > spm, or fsl) are recommended (I have all external packages installed, > so that is not an issue), or there is no rule? > 4. With mri_robust_register, since the vol of resection is small > (sublobar, at most lobar) in size, does a mask of the resection volume > for 6 DOF registration improve registration? Or the mask refers more > to more partial volumes such as slices, or hemi alignment, as in > example 3 here > (https://surfer.nmr.mgh.harvard.edu/fswiki/mri_robust_register)? > 5. A very rookie question: if one has to use a resection volume mask, > do the inside-resection voxels have to be 1, and all outside 0, or the > other way around? > 6. I then need to mask the coregistered postop volume (posttopre.mgz) > with a mask derived from FS preop pipeline, to include all cerebrum > (ribbon.mgz) (no cerebellum) but also mesial temporal structures > hippocampus/amygdala etc; is there such a mask in the recon pipeline, > or it has to be constructed? > Thank you, > OL > > On Sun, Feb 23, 2020 at 8:51 PM Bruce Fischl > wrote: >> >> Hi Octavian >> >> 1. Not sure - you should try them. If you have reasonable surfaces I >> think bbreg lets you specify masks to ignore, which should be giant help >> in this scenario. On the other hand, mri_robust_register does this >> automatically. They are both relatively fast so why not try and see? >> >> 2. Same answer as before. mri_robust_register has flags to tell it to use >> an inter-modal similarity function, but you can also tell bbregister it is >> a T2 and it should do a good job (and implicitly register to the T1 since >> it is already aligned with the surface). >> >> 3. I'm not sure what you mean - can you explain further? >> >> cheers >> Bruce >> >> >> >> On Sun, >> 23 Feb 2020, Octavian Lie wrote: >> >>>External Email - Use Caution >>> >>> Dear All, >>> >>> I need to register: >>> 1. T1.mgz to a T1 postresection volume (no contrast), with large >>> resection. Which one should I use, mri_robust_register, or bbregister, >>> if the latter, which is the better initiator (nmi, spm, fsl)? >>> >>> 2. T1.mgz to a 3D FLAIR SPACE sequence (outside of the flair space >>> recon-all flag), which FS registration tool should I use? >>> >>> 3. I then need to mask the coregistered T1 postresection with a T1.mgz mask. >>> >>> I would appreciate commands (either names, or full command lines), >>> please advise. >>> >>> Thank you, >>> Octavian >>> >>> ___ >>> 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 > > > ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] registrations
External Email - Use Caution Dear Bruce, thank you for your replies. I planned using this line for intrasubject pre to postop (postresection) MRI T1 registration 1. with mri_robust_register: mri_robust_register --mov postop.mgz --dst preop.mgz --lta posttopre.lta --mapmov posttopre.mgz --weights posttopre-weights.mgz --iscale --satit -- maskmov itksnap_rezvol.nii 2. with bbregister bbregister --s sbj --mov postop.mgz --init-fsl --reg register.lta --o posttopre.mgz --t1 Here are follow-up questions and clarifications: 1. With bb register, I do not see an optional flag to accommodate a custom mask volume, such as a mask of the resection volume; if this is true, then one is not required, please advise 2. If one wants to try mri_robust_register for pre to postop MRI alignment, which pre volume from the FS recon pipeline would be indicated for best results? T1.mgz, brain.mgz, or another? 3. With bbregister, which of the several init options (coreg, header, spm, or fsl) are recommended (I have all external packages installed, so that is not an issue), or there is no rule? 4. With mri_robust_register, since the vol of resection is small (sublobar, at most lobar) in size, does a mask of the resection volume for 6 DOF registration improve registration? Or the mask refers more to more partial volumes such as slices, or hemi alignment, as in example 3 here (https://surfer.nmr.mgh.harvard.edu/fswiki/mri_robust_register)? 5. A very rookie question: if one has to use a resection volume mask, do the inside-resection voxels have to be 1, and all outside 0, or the other way around? 6. I then need to mask the coregistered postop volume (posttopre.mgz) with a mask derived from FS preop pipeline, to include all cerebrum (ribbon.mgz) (no cerebellum) but also mesial temporal structures hippocampus/amygdala etc; is there such a mask in the recon pipeline, or it has to be constructed? Thank you, OL On Sun, Feb 23, 2020 at 8:51 PM Bruce Fischl wrote: > > Hi Octavian > > 1. Not sure - you should try them. If you have reasonable surfaces I > think bbreg lets you specify masks to ignore, which should be giant help > in this scenario. On the other hand, mri_robust_register does this > automatically. They are both relatively fast so why not try and see? > > 2. Same answer as before. mri_robust_register has flags to tell it to use > an inter-modal similarity function, but you can also tell bbregister it is > a T2 and it should do a good job (and implicitly register to the T1 since > it is already aligned with the surface). > > 3. I'm not sure what you mean - can you explain further? > > cheers > Bruce > > > > On Sun, > 23 Feb 2020, Octavian Lie wrote: > > >External Email - Use Caution > > > > Dear All, > > > > I need to register: > > 1. T1.mgz to a T1 postresection volume (no contrast), with large > > resection. Which one should I use, mri_robust_register, or bbregister, > > if the latter, which is the better initiator (nmi, spm, fsl)? > > > > 2. T1.mgz to a 3D FLAIR SPACE sequence (outside of the flair space > > recon-all flag), which FS registration tool should I use? > > > > 3. I then need to mask the coregistered T1 postresection with a T1.mgz mask. > > > > I would appreciate commands (either names, or full command lines), > > please advise. > > > > Thank you, > > Octavian > > > > ___ > > 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] registrations
Hi Octavian 1. Not sure - you should try them. If you have reasonable surfaces I think bbreg lets you specify masks to ignore, which should be giant help in this scenario. On the other hand, mri_robust_register does this automatically. They are both relatively fast so why not try and see? 2. Same answer as before. mri_robust_register has flags to tell it to use an inter-modal similarity function, but you can also tell bbregister it is a T2 and it should do a good job (and implicitly register to the T1 since it is already aligned with the surface). 3. I'm not sure what you mean - can you explain further? cheers Bruce On Sun, 23 Feb 2020, Octavian Lie wrote: >External Email - Use Caution > > Dear All, > > I need to register: > 1. T1.mgz to a T1 postresection volume (no contrast), with large > resection. Which one should I use, mri_robust_register, or bbregister, > if the latter, which is the better initiator (nmi, spm, fsl)? > > 2. T1.mgz to a 3D FLAIR SPACE sequence (outside of the flair space > recon-all flag), which FS registration tool should I use? > > 3. I then need to mask the coregistered T1 postresection with a T1.mgz mask. > > I would appreciate commands (either names, or full command lines), > please advise. > > Thank you, > Octavian > > ___ > 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