Sct_register_to_template spurious warning

SCT v4.3

Hi,

When running ‘sct_register_to_template’, e.g.:

sct_register_to_template -i sc_fmri.nii.gz -s frmi_seg.nii.gz -l fmri_label.nii.gz -c t2s -ref subject

The following “warning” appears, about halfway through the output:

Apply transformation and resample to destination space...
/home/sapgt4/sct_4.3/bin/isct_antsApplyTransforms -d 3 -i src_seg.nii -o src_seg_reg.nii -t warp_forward_0.txt -r dest_seg_RPI.nii -n NearestNeighbor # in /tmp/sct-20200722164906.795422-register-0mo9smr6
Copy affine matrix from destination space to make sure qform/sform are the same.
WARNING: the resulting image could have wrong apparent results. You should use an affine transformation as last transformation...

I assume this is irrelevant, as the resultant registration looks great.
I’ve not noticed the warning before, but it is quite possible it has always appeared!

So two questions:

  1. Am I doing something risky that requires a warning?
  2. Does this ‘warning’ need to appear as part of the ‘sct_register_to_template’ output?

Thanks in advance.

Hi @george_tackley,

I cannot reproduce these warnings with the testing data. First thing to verify: could you please copy/paste the output of:

fslhd sc_fmri
fslhd frmi_seg
fslhd fmri_label

** ORIGINAL POST NOW EDITED TO REFLECT OMISSION OUTLINED BELOW **

Hi @jcohenadad,

Thanks for the reply. Apologies, somehow I trimmed off the ‘-ref subject’ option from the call (which makes all the difference), it should have read:

sct_register_to_template -i sc_fmri.nii.gz -s fmri_seg.nii.gz -l fmri_label.nii.gz -c t2s -ref subject

Header info below.

BW
George

filename	sc_fmri.nii.gz
size of header	348
data_type	INT16
dim0		3
dim1		40
dim2		40
dim3		20
dim4		1
dim5		1
dim6		1
dim7		1
vox_units	mm
time_units	s
datatype	4
nbyper		2
bitpix		16
pixdim0		-1.000000
pixdim1		1.230769
pixdim2		1.230769
pixdim3		5.000000
pixdim4		1.000000
pixdim5		1.000000
pixdim6		1.000000
pixdim7		1.000000
vox_offset	6096
cal_max		0.000000
cal_min		0.000000
scl_slope	0.014905
scl_inter	488.402466
phase_dim	0
freq_dim	0
slice_dim	3
slice_name	Unknown
slice_code	0
slice_start	0
slice_end	19
slice_duration	0.000000
toffset		0.000000
intent		Unknown
intent_code	0
intent_name	
intent_p1	0.000000
intent_p2	0.000000
intent_p3	0.000000
qform_name	Scanner Anat
qform_code	1
qto_xyz:1	-1.230769 0.000000 -0.000000 24.615368 
qto_xyz:2	0.000000 1.119060 2.081404 -30.782221 
qto_xyz:3	-0.000000 -0.512346 4.546181 -71.267029 
qto_xyz:4	0.000000 0.000000 0.000000 1.000000 
qform_xorient	Right-to-Left
qform_yorient	Posterior-to-Anterior
qform_zorient	Inferior-to-Superior
sform_name	Scanner Anat
sform_code	1
sto_xyz:1	-1.230769 0.000000 0.000000 24.615368 
sto_xyz:2	0.000000 1.119060 2.081404 -30.782221 
sto_xyz:3	0.000000 -0.512346 4.546181 -71.267029 
sto_xyz:4	0.000000 0.000000 0.000000 1.000000 
sform_xorient	Right-to-Left
sform_yorient	Posterior-to-Anterior
sform_zorient	Inferior-to-Superior
file_type	NIFTI-1+
file_code	1
descrip		
aux_file	


filename	fmri_seg.nii.gz
size of header	348
data_type	FLOAT64
dim0		3
dim1		40
dim2		40
dim3		20
dim4		1
dim5		1
dim6		1
dim7		1
vox_units	mm
time_units	s
datatype	64
nbyper		8
bitpix		64
pixdim0		-1.000000
pixdim1		1.230769
pixdim2		1.230769
pixdim3		5.000000
pixdim4		1.000000
pixdim5		1.000000
pixdim6		1.000000
pixdim7		1.000000
vox_offset	6096
cal_max		0.000000
cal_min		0.000000
scl_slope	1.000000
scl_inter	0.000000
phase_dim	0
freq_dim	0
slice_dim	3
slice_name	Unknown
slice_code	0
slice_start	0
slice_end	19
slice_duration	0.000000
toffset		0.000000
intent		Unknown
intent_code	0
intent_name	
intent_p1	0.000000
intent_p2	0.000000
intent_p3	0.000000
qform_name	Scanner Anat
qform_code	1
qto_xyz:1	-1.230769 0.000000 -0.000000 24.615368 
qto_xyz:2	0.000000 1.119060 2.081404 -30.782221 
qto_xyz:3	-0.000000 -0.512346 4.546181 -71.267029 
qto_xyz:4	0.000000 0.000000 0.000000 1.000000 
qform_xorient	Right-to-Left
qform_yorient	Posterior-to-Anterior
qform_zorient	Inferior-to-Superior
sform_name	Scanner Anat
sform_code	1
sto_xyz:1	-1.230769 0.000000 0.000000 24.615368 
sto_xyz:2	0.000000 1.119060 2.081404 -30.782221 
sto_xyz:3	0.000000 -0.512346 4.546181 -71.267029 
sto_xyz:4	0.000000 0.000000 0.000000 1.000000 
sform_xorient	Right-to-Left
sform_yorient	Posterior-to-Anterior
sform_zorient	Inferior-to-Superior
file_type	NIFTI-1+
file_code	1
descrip		
aux_file	


filename	fmri_label.nii.gz
size of header	348
data_type	FLOAT64
dim0		3
dim1		40
dim2		40
dim3		20
dim4		1
dim5		1
dim6		1
dim7		1
vox_units	mm
time_units	s
datatype	64
nbyper		8
bitpix		64
pixdim0		-1.000000
pixdim1		1.230769
pixdim2		1.230769
pixdim3		5.000000
pixdim4		1.000000
pixdim5		1.000000
pixdim6		1.000000
pixdim7		1.000000
vox_offset	6096
cal_max		0.000000
cal_min		0.000000
scl_slope	1.000000
scl_inter	0.000000
phase_dim	0
freq_dim	0
slice_dim	3
slice_name	Unknown
slice_code	0
slice_start	0
slice_end	19
slice_duration	0.000000
toffset		0.000000
intent		Unknown
intent_code	0
intent_name	
intent_p1	0.000000
intent_p2	0.000000
intent_p3	0.000000
qform_name	Scanner Anat
qform_code	1
qto_xyz:1	-1.230769 0.000000 -0.000000 24.615368 
qto_xyz:2	0.000000 1.119060 2.081404 -30.782221 
qto_xyz:3	-0.000000 -0.512346 4.546181 -71.267029 
qto_xyz:4	0.000000 0.000000 0.000000 1.000000 
qform_xorient	Right-to-Left
qform_yorient	Posterior-to-Anterior
qform_zorient	Inferior-to-Superior
sform_name	Scanner Anat
sform_code	1
sto_xyz:1	-1.230769 0.000000 0.000000 24.615368 
sto_xyz:2	0.000000 1.119060 2.081404 -30.782221 
sto_xyz:3	0.000000 -0.512346 4.546181 -71.267029 
sto_xyz:4	0.000000 0.000000 0.000000 1.000000 
sform_xorient	Right-to-Left
sform_yorient	Posterior-to-Anterior
sform_zorient	Inferior-to-Superior
file_type	NIFTI-1+
file_code	1
descrip		
aux_file

thanks, i can reproduce-- working on it here

You can ignore the warning. It will be silenced in the future version of SCT (see pull request). Thank you for notifying us :pray: