External Email - Use Caution
Hi Doug,
I am following up your reply to this issue as I am still trying to find a
solution to this issue. For your questions - yes, I reviewed the images in
freeview (and fsleyes) and there are no obvious issues with them (i.e., neither
are missing any part of the brain and both are decent T1 images). I also tried
using the unmasked (whole head) images, but the same MyMatrix error happens.
The --debug output is pasted below and attached as a text file. If it will
help, I can share a couple of participant images from our GE scanner.
Interestingly, while including the -affine flag works for some participants,
for others I get "MatrixLog Error: Result too imaginary to ignore!" error.
Any help/recommendations are greatly appreciated.
Thanks
Andrew
----
Andrew Beaudin, PhD | Research Associate
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
mri_robust_template --mov 2001A_T1.nii.gz 2001B_T1.nii.gz --lta
2001A2template.lta 2001B2template.lta --average 1 --template
2001_template.nii.gz --satit --debug
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $
--mov: Using 2001A_T1.nii.gz as movable/source volume.
--mov: Using 2001B_T1.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_T1.nii.gz'...
converting source '2001A_T1.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '2001B_T1.nii.gz'...
converting source '2001B_T1.nii.gz' to bspline ...
MRItoBSpline degree 3
Will use TP 1 as random initial target (seed 113817 ).
MultiRegistration::initializing Xforms (init 1 , 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 2 to TP 1 ==============================
Register TP 2 ( 2001B_T1.nii.gz )
to TP 1 ( 2001A_T1.nii.gz )
Registration::setSourceAndTarget(MRI s, MRI t, keeptype = TRUE )
Type Source : 4 Type Target : 4 keeping type
Mov: (1, 1, 1)mm and dim (256, 256, 176)
Dst: (1, 1, 1)mm and dim (256, 256, 176)
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 ( 64 , 64 , 44 )
-- gpT ( 64 , 64 , 44 )
- running loop to estimate saturation parameter:
-- Iteration: 1 trying sat: 16
min sat: 0 ( -1 ), max sat: 16 ( 0.0798945 ), sat diff: 16,
(wlimit=0.16)
-- Iteration: 2 trying sat: 8
min sat: 8 ( 0.17712 ), max sat: 16 ( 0.0798945 ), sat diff: 8,
(wlimit=0.16)
-- Iteration: 3 trying sat: 12
min sat: 8 ( 0.17712 ), max sat: 12 ( 0.109687 ), sat diff: 4,
(wlimit=0.16)
-- Iteration: 4 trying sat: 10
min sat: 8 ( 0.17712 ), max sat: 10 ( 0.138304 ), sat diff: 2,
(wlimit=0.16)
-- Iteration: 5 trying sat: 9
min sat: 8 ( 0.17712 ), max sat: 9 ( 0.154011 ), sat diff: 1,
(wlimit=0.16)
-- Iteration: 6 trying sat: 8.5
- final SAT: 9 ( it: 6 , weight check 0.154011 <= 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 -1.2743032370447
0 1.0000000000000 0 6.3477877176776
0 0 1.0000000000000 1.3765177143265
0 0 0 1.0000000000000 ]
- initial iscale: Ii =1
Resolution: 3 S( 32 32 22 ) T( 32 32 22 )
Iteration(f): 1
-- diff. to prev. transform: 4.3252
Iteration(f): 2
-- diff. to prev. transform: 0.226503
Iteration(f): 3
-- diff. to prev. transform: 0.0809929
Iteration(f): 4
-- diff. to prev. transform: 0.0448288
Iteration(f): 5
-- diff. to prev. transform: 0.0306485 max it: 5 reached!
Resolution: 2 S( 64 64 44 ) T( 64 64 44 )
Iteration(f): 1
-- diff. to prev. transform: 1.21431
Iteration(f): 2
-- diff. to prev. transform: 0.153379
Iteration(f): 3
-- diff. to prev. transform: 0.108256
Iteration(f): 4
-- diff. to prev. transform: 0.0849185
Iteration(f): 5
-- diff. to prev. transform: 0.0709608 max it: 5 reached!
Resolution: 1 S( 128 128 88 ) T( 128 128 88 )
Iteration(f): 1
-- diff. to prev. transform: 0.803945
Iteration(f): 2
-- diff. to prev. transform: 0.19292
Iteration(f): 3
-- diff. to prev. transform: 0.124963
Iteration(f): 4
-- diff. to prev. transform: 0.0841509
Iteration(f): 5
-- diff. to prev. transform: 0.0593591 max it: 5 reached!
Resolution: 0 S( 256 256 176 ) T( 256 256 176 )
Iteration(f): 1
-- diff. to prev. transform: 1.56407
Iteration(f): 2
-- diff. to prev. transform: 0.1626
Iteration(f): 3
-- diff. to prev. transform: 0.0426001
Iteration(f): 4
-- diff. to prev. transform: 0.0296054
Iteration(f): 5
-- diff. to prev. transform: 0.0229654 max it: 5 reached!
- final transform:
Tf = [ ...
0.9991201336644 -0.0403162432589 0.0115567744604 13.1803922948678
0.0399069838938 0.9986352667380 0.0336903051890 -5.3133887637339
-0.0128992690853 -0.0331994662113 0.9993655008556 6.0924108135986
0 0 0 1.0000000000000 ]
- final iscale: If = 1
**********************************************************
*
* WARNING: Registration did not converge in 5 steps!
* Problem might be ill posed.
* Please inspect output manually!
*
**********************************************************
CentroidT = [ 144.3744389157496 140.7612889458485 89.5924668508406
1.0000000000000 ]
CentroidSinT = [ 154.3014274378032 137.7010981446322 87.9111681965244
1.0000000000000 ]
Centroid = [ 149.3379331767764 139.2311935452403 88.7518175236825
1.0000000000000 ]
* WARNING: TP 2 to 1 did not converge !!
meant = [ 1.1453379004720 -1.3465092209200 -3.1182479079224 ]
Input rotation's max deviation from rotation is: 0.000393412
MyMatrix::RotationMean input(s) not rotation
mri_robust_template --mov 2001A_T1.nii.gz 2001B_T1.nii.gz --lta
2001A2template.lta 2001B2template.lta --average 1 --template
2001_template.nii.gz --satit --debug
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $
--mov: Using 2001A_T1.nii.gz as movable/source volume.
--mov: Using 2001B_T1.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_T1.nii.gz'...
converting source '2001A_T1.nii.gz' to bspline ...
MRItoBSpline degree 3
reading source '2001B_T1.nii.gz'...
converting source '2001B_T1.nii.gz' to bspline ...
MRItoBSpline degree 3
Will use TP 1 as random initial target (seed 113817 ).
MultiRegistration::initializing Xforms (init 1 , 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 2 to TP 1 ==============================
Register TP 2 ( 2001B_T1.nii.gz )
to TP 1 ( 2001A_T1.nii.gz )
Registration::setSourceAndTarget(MRI s, MRI t, keeptype = TRUE )
Type Source : 4 Type Target : 4 keeping type
Mov: (1, 1, 1)mm and dim (256, 256, 176)
Dst: (1, 1, 1)mm and dim (256, 256, 176)
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 ( 64 , 64 , 44 )
-- gpT ( 64 , 64 , 44 )
- running loop to estimate saturation parameter:
-- Iteration: 1 trying sat: 16
min sat: 0 ( -1 ), max sat: 16 ( 0.0798945 ), sat diff: 16,
(wlimit=0.16)
-- Iteration: 2 trying sat: 8
min sat: 8 ( 0.17712 ), max sat: 16 ( 0.0798945 ), sat diff: 8,
(wlimit=0.16)
-- Iteration: 3 trying sat: 12
min sat: 8 ( 0.17712 ), max sat: 12 ( 0.109687 ), sat diff: 4,
(wlimit=0.16)
-- Iteration: 4 trying sat: 10
min sat: 8 ( 0.17712 ), max sat: 10 ( 0.138304 ), sat diff: 2,
(wlimit=0.16)
-- Iteration: 5 trying sat: 9
min sat: 8 ( 0.17712 ), max sat: 9 ( 0.154011 ), sat diff: 1,
(wlimit=0.16)
-- Iteration: 6 trying sat: 8.5
- final SAT: 9 ( it: 6 , weight check 0.154011 <= 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 -1.2743032370447
0 1.0000000000000 0 6.3477877176776
0 0 1.0000000000000 1.3765177143265
0 0 0 1.0000000000000 ]
- initial iscale: Ii =1
Resolution: 3 S( 32 32 22 ) T( 32 32 22 )
Iteration(f): 1
-- diff. to prev. transform: 4.3252
Iteration(f): 2
-- diff. to prev. transform: 0.226503
Iteration(f): 3
-- diff. to prev. transform: 0.0809929
Iteration(f): 4
-- diff. to prev. transform: 0.0448288
Iteration(f): 5
-- diff. to prev. transform: 0.0306485 max it: 5 reached!
Resolution: 2 S( 64 64 44 ) T( 64 64 44 )
Iteration(f): 1
-- diff. to prev. transform: 1.21431
Iteration(f): 2
-- diff. to prev. transform: 0.153379
Iteration(f): 3
-- diff. to prev. transform: 0.108256
Iteration(f): 4
-- diff. to prev. transform: 0.0849185
Iteration(f): 5
-- diff. to prev. transform: 0.0709608 max it: 5 reached!
Resolution: 1 S( 128 128 88 ) T( 128 128 88 )
Iteration(f): 1
-- diff. to prev. transform: 0.803945
Iteration(f): 2
-- diff. to prev. transform: 0.19292
Iteration(f): 3
-- diff. to prev. transform: 0.124963
Iteration(f): 4
-- diff. to prev. transform: 0.0841509
Iteration(f): 5
-- diff. to prev. transform: 0.0593591 max it: 5 reached!
Resolution: 0 S( 256 256 176 ) T( 256 256 176 )
Iteration(f): 1
-- diff. to prev. transform: 1.56407
Iteration(f): 2
-- diff. to prev. transform: 0.1626
Iteration(f): 3
-- diff. to prev. transform: 0.0426001
Iteration(f): 4
-- diff. to prev. transform: 0.0296054
Iteration(f): 5
-- diff. to prev. transform: 0.0229654 max it: 5 reached!
- final transform:
Tf = [ ...
0.9991201336644 -0.0403162432589 0.0115567744604 13.1803922948678
0.0399069838938 0.9986352667380 0.0336903051890 -5.3133887637339
-0.0128992690853 -0.0331994662113 0.9993655008556 6.0924108135986
0 0 0 1.0000000000000 ]
- final iscale: If = 1
**********************************************************
*
* WARNING: Registration did not converge in 5 steps!
* Problem might be ill posed.
* Please inspect output manually!
*
**********************************************************
CentroidT = [ 144.3744389157496 140.7612889458485 89.5924668508406
1.0000000000000 ]
CentroidSinT = [ 154.3014274378032 137.7010981446322 87.9111681965244
1.0000000000000 ]
Centroid = [ 149.3379331767764 139.2311935452403 88.7518175236825
1.0000000000000 ]
* WARNING: TP 2 to 1 did not converge !!
meant = [ 1.1453379004720 -1.3465092209200 -3.1182479079224 ]
Input rotation's max deviation from rotation is: 0.000393412
MyMatrix::RotationMean input(s) not rotation
_______________________________________________
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 Mass General Brigham
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline
<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.