Hi Andrew,
Sorry for the late response. I’m able to reproduce your error.
I have included Martin to the communication. He is the author of the program. He is going to take a look at your data.
Best,
Yujing
From: Andrew Beaudin <abeaudin@ucalgary.ca>
Sent: Friday, November 25, 2022 3:25 PM
To: Huang, Yujing <YHUANG43@mgh.harvard.edu>; Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: RE: [Freesurfer] Fwd: mri_robust_template - MyMatrix::RotationMean Error
External Email - Use Caution
Hi Huang,
Thank you very much for your help with this. Apologies for the delay.
You should be able to retrieve sample images from the following link (expires on Dec. 2). I have also included a brief word document at the link that includes some
details of the nifti images.
The command call I am using 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
However, while troubleshooting I have also tried the following with no success:
1) using the --iscale flag - same MyMatrix::RotationMean Error (see below for log)
2) using --inittp 0 - results in a 'Segmentation fault'
3) using --average 0 - same MyMatrix::RotationMean Error
4) using Freesurfer v7.2 - same MyMatrix::RotationMean Error
5) running mri_robust_template call on Catalina and Big Sur systems with FS v6.0 - same MyMatrix::RotationMean Error.
Again, thank you for the help….and please let me know if your need any additional information or anything clarified.
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
From: Huang, Yujing <YHUANG43@mgh.harvard.edu>
Sent: November 22, 2022 7:32 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Cc: Andrew Beaudin <abeaudin@ucalgary.ca>
Subject: RE: [Freesurfer] Fwd: mri_robust_template - MyMatrix::RotationMean Error
|
[△EXTERNAL] |
Hi Andrew,
Can you send us some data to debug? The link has expired. Also, the command line that you are having trouble with.
Thanks.
Yujing
From:
freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu>
On Behalf Of Andrew Beaudin
Sent: Wednesday, June 29, 2022 10:45 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Fwd: mri_robust_template - MyMatrix::RotationMean Error
External Email - Use Caution
Hello Freesurfer Community,
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 (and attached as text file - line 188 is the MyMatrix message). If helpful,
images can be download from the following link:
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://uofc-my.sharepoint.com/:f:/g/personal/abeaudin_ucalgary_ca/EmL7JGE0J-BHpnRfqArO3OMBlcD4VPqRkUZKfsmKGeL2SQ?e=lcovfR
Briefly:
- the images are skull-stripped niftis and 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:
1) using the --iscale flag - same result as shown below.
2) using --inittp 0 - results in a 'Segmentation fault'
3) using --average 0 - same result as shown below
4) using Freesurfer v7.2 - same result as below
5) 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
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 Mass General Brigham Compliance
HelpLine at MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be
https://www.massgeneralbrigham.org/complianceline .
Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving
this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.