Have you looked at the images in freeview to verify that they both look ok (eg, one is not all 1s or 0s or missing half the brain or misoriented)? Can you try to run it with the unmasked data as a test?
On 7/4/2022 4:24 PM, Andrew Beaudin wrote:
External Email - Use Caution
Hello Freesurfer Community, Apologies for the duplicate message, but there was an issue with my previous message where the first part was removed.
I am trying to use mri_robust_template (with its default 6 DOF registration) outside of the Freesurfer longitudinal pipeline to generate within-participant T1 templates from 2 time points. Unfortunately, I am coming up against a 'MyMatrix::RotationMean input(s) not rotation' error on images acquired on our GE 3T Discovery 750 system, but not our colleagues' Seimens 3T Prisma images. I have pasted the output from the --debug flag below (3rd row from bottom is the MyMatrix::RotationMean message).
Briefly: - the images I am using are skull-stripped niftis. - I am running Freesurfer 6.0 (freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c) on a WSL2 Ubuntu 18.04 installation. - the call is: mri_robust_template --mov 2001A_T1o_brain.nii.gz 2001B_T1o_brain.nii.mgz --lta 2001A2template.lta 2001B2template.lta --average 1 --template 2001_template.nii.gz --satit
- I have tried the following with no success:
- using the --iscale flag - same result as shown below.
- using --inittp 0 - results in a 'Segmentation fault'
- using --average 0 - same result as shown below
- using Freesurfer v7.2 - same result as below
- running mri_robust_template call on Catalina and Big Sur systems
with FS v6.0 - same result as below.
Currently, the only way to get mri_robust_template to work with our GE images is to run it with the --affine flag. I would prefer to use the rigid body registration but am at a loss for why these images are failing using the rigid body registration is failing. Any help/insights/recommendations are greatly appreciated.
Thank you very much.
Andrew
Andrew Beaudin, PhD | Postdoctoral Scholar University of Calgary | Cumming School of Medicine Department of Clinical Neurosciences HSC Rm 2935J, 3330 Hospital Drive N.W. | Calgary, AB | T2N 4N1 Phone: (403) 210-6273
DEBUG REPORT:
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $
--mov: Using 2001A_T1o_brain.nii.gz as movable/source volume. --mov: Using 2001B_T1o_brain.nii.gz as movable/source volume. Total: 2 input volumes --lta: Will output LTA transforms --average: Using method 1 for template computation. --template: Using 2001_template.nii.gz as template output volume. --satit: Will estimate SAT iteratively! --debug: Will output debug info and files! reading source '2001A_T1o_brain.nii.gz'... converting source '2001A_T1o_brain.nii.gz' to bspline ... MRItoBSpline degree 3 reading source '2001B_T1o_brain.nii.gz'... converting source '2001B_T1o_brain.nii.gz' to bspline ... MRItoBSpline degree 3 Will use TP 2 as random initial target (seed 108242 ).
MultiRegistration::initializing Xforms (init 2 , maxres 0 , iterate 5 , epsit 0.01 ) :
MultiRegistration Parameters
Outdir: ./ TransOnly: false Rigid: true Robust: true Satit: true Iscale: false IscaleOnly: false NoMulti: false SubsampleSize: -1 HighIt: -1 FixVoxel: false KeepType: true Average: 1 DoublePrec: false BackupWeights: false SampleType: 5 CRASCenter: false Debug: 1
[init] ========================= TP 1 to TP 2
Register TP 1 ( 2001A_T1o_brain.nii.gz ) to TP 2 ( 2001B_T1o_brain.nii.gz )
Registration::setSourceAndTarget(MRI s, MRI t, keeptype = TRUE ) Type Source : 3 Type Target : 3 keeping type Mov: (1, 1, 1)mm and dim (176, 256, 256) Dst: (1, 1, 1)mm and dim (176, 256, 256) Asserting both images: 1mm isotropic - no Mov reslice necessary - no Dst reslice necessary
Registration::findSaturation - computing centroids - computing initial transform -- using translation info - Get Gaussian Pyramid Limits ( min size: 16 max size: -1 ) - Build Gaussian Pyramid ( Limits min steps: 0 max steps: 3 ) - Build Gaussian Pyramid ( Limits min steps: 0 max steps: 3 )
- Max Resolution used: 2 -- gpS ( 44 , 64 , 64 ) -- gpT ( 44 , 64 , 64 ) - running loop to estimate saturation parameter: -- Iteration: 1 trying sat: 16 min sat: 16 ( 0.729941 ), max sat: 0 ( -1 ), sat diff: -16, (wlimit=0.16) -- Iteration: 2 trying sat: 32 min sat: 32 ( 0.713406 ), max sat: 0 ( -1 ), sat diff: -32, (wlimit=0.16) -- Iteration: 3 trying sat: 64 min sat: 64 ( 0.692689 ), max sat: 0 ( -1 ), sat diff: -64, (wlimit=0.16) -- Iteration: 4 trying sat: 128 min sat: 128 ( 0.666858 ), max sat: 0 ( -1 ), sat diff: -128, (wlimit=0.16) -- Iteration: 5 trying sat: 256 min sat: 256 ( 0.637119 ), max sat: 0 ( -1 ), sat diff: -256, (wlimit=0.16) -- Iteration: 6 trying sat: 512 min sat: 512 ( 0.591624 ), max sat: 0 ( -1 ), sat diff: -512, (wlimit=0.16) -- Iteration: 7 trying sat: 1024 min sat: 1024 ( 0.550606 ), max sat: 0 ( -1 ), sat diff: -1024, (wlimit=0.16) -- Iteration: 8 trying sat: 2048 min sat: 2048 ( 0.485668 ), max sat: 0 ( -1 ), sat diff: -2048, (wlimit=0.16) -- Iteration: 9 trying sat: 4096 min sat: 4096 ( 0.370434 ), max sat: 0 ( -1 ), sat diff: -4096, (wlimit=0.16) -- Iteration: 10 trying sat: 8192 min sat: 8192 ( 0.19981 ), max sat: 0 ( -1 ), sat diff: -8192, (wlimit=0.16) -- Iteration: 11 trying sat: 16384 min sat: 8192 ( 0.19981 ), max sat: 16384 ( 0.0606314 ), sat diff: 8192, (wlimit=0.16) -- Iteration: 12 trying sat: 12288 min sat: 8192 ( 0.19981 ), max sat: 12288 ( 0.103499 ), sat diff: 4096, (wlimit=0.16) -- Iteration: 13 trying sat: 10240 min sat: 8192 ( 0.19981 ), max sat: 10240 ( 0.142423 ), sat diff: 2048, (wlimit=0.16) -- Iteration: 14 trying sat: 9216 min sat: 9216 ( 0.16727 ), max sat: 10240 ( 0.142423 ), sat diff: 1024, (wlimit=0.16) -- Iteration: 15 trying sat: 9728 min sat: 9216 ( 0.16727 ), max sat: 9728 ( 0.155264 ), sat diff: 512, (wlimit=0.16) -- Iteration: 16 trying sat: 9472 min sat: 9472 ( 0.160488 ), max sat: 9728 ( 0.155264 ), sat diff: 256, (wlimit=0.16) -- Iteration: 17 trying sat: 9600 min sat: 9472 ( 0.160488 ), max sat: 9600 ( 0.157199 ), sat diff: 128, (wlimit=0.16) -- Iteration: 18 trying sat: 9536 min sat: 9472 ( 0.160488 ), max sat: 9536 ( 0.159131 ), sat diff: 64, (wlimit=0.16) -- Iteration: 19 trying sat: 9504 min sat: 9472 ( 0.160488 ), max sat: 9504 ( 0.159604 ), sat diff: 32, (wlimit=0.16) -- Iteration: 20 trying sat: 9488 min sat: 9472 ( 0.160488 ), max sat: 9488 ( 0.159903 ), sat diff: 16, (wlimit=0.16) -- Iteration: 21 trying sat: 9480 min sat: 9480 ( 0.160034 ), max sat: 9488 ( 0.159903 ), sat diff: 8, (wlimit=0.16) -- Iteration: 22 trying sat: 9484 min sat: 9484 ( 0.160123 ), max sat: 9488 ( 0.159903 ), sat diff: 4, (wlimit=0.16) -- Iteration: 23 trying sat: 9486 min sat: 9484 ( 0.160123 ), max sat: 9486 ( 0.159831 ), sat diff: 2, (wlimit=0.16) -- Iteration: 24 trying sat: 9485 min sat: 9484 ( 0.160123 ), max sat: 9485 ( 0.159908 ), sat diff: 1, (wlimit=0.16) -- Iteration: 25 trying sat: 9484.5 - final SAT: 9485 ( it: 25 , weight check 0.159908 <= 0.16 )
Registration::computeMultiresRegistration - computing centroids - computing initial transform -- using translation info - Get Gaussian Pyramid Limits ( min size: 16 max size: -1 ) - initial transform: Ti = [ ... 1.0000000000000 0 0 -2.0251428914711 0 1.0000000000000 0 6.0311902437196 0 0 1.0000000000000 2.8105113695639 0 0 0 1.0000000000000 ]
- initial iscale: Ii =1
Resolution: 3 S( 22 32 32 ) T( 22 32 32 ) Iteration(f): 1 -- diff. to prev. transform: 2.97694 Iteration(f): 2 -- diff. to prev. transform: 0.0903233 Iteration(f): 3 -- diff. to prev. transform: 0.0191757 Iteration(f): 4 -- diff. to prev. transform: 0.0116139 Iteration(f): 5 -- diff. to prev. transform: 0.00140989 <= 0.01 :-)
Resolution: 2 S( 44 64 64 ) T( 44 64 64 ) Iteration(f): 1 -- diff. to prev. transform: 1.81202 Iteration(f): 2 -- diff. to prev. transform: 0.199033 Iteration(f): 3 -- diff. to prev. transform: 0.00925469 <= 0.01 :-)
Resolution: 1 S( 88 128 128 ) T( 88 128 128 ) Iteration(f): 1 -- diff. to prev. transform: 1.02247 Iteration(f): 2 -- diff. to prev. transform: 0.0229168 Iteration(f): 3 -- diff. to prev. transform: 0.000719712 <= 0.01 :-)
Resolution: 0 S( 176 256 256 ) T( 176 256 256 ) Iteration(f): 1 -- diff. to prev. transform: 0.664624 Iteration(f): 2 -- diff. to prev. transform: 0.0108463 Iteration(f): 3 -- diff. to prev. transform: 0.000585613 <= 0.01 :-)
- final transform: Tf = [ ... 0.9994709868827 -0.0113151175724 -0.0304912199489 4.8530791096303 0.0126622658755 0.9989355014916 0.0443568583483 2.1370162587100 0.0299568590234 -0.0447194809223 0.9985503265352 5.4716006804225 0 0 0 1.0000000000000 ]
- final iscale: If = 1 CentroidT = [ 86.5860705940972 104.6067830299094 138.6676688710562 1.0000000000000 ]
CentroidSinT = [ 88.1595712077722 107.7558909090270 139.3780739549505 1.0000000000000 ]
Centroid = [ 87.3728209009347 106.1813369694682 139.0228714130033 1.0000000000000 ]
MyMatrix::RotationMean input(s) not rotation meant = [ -1.2248131651588 1.2892456671960 3.1420193014715 ]
Input rotation's max deviation from rotation is: 0.000393411
*Andrew Beaudin, PhD* | Postdoctoral Scholar University of Calgary | Cumming School of Medicine Department of Clinical Neurosciences HSC Rm 2935J, 3330 Hospital Drive N.W. | Calgary, AB | T2N 4N1 Phone: (403) 210-6273
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer