Hi,
I have a set of 12 structurals images (T1-weighted being the first one) and I am trying to get them registered to a template. The template file is called mni_template.nii.gz and the 12 structurals are in ZHRTS1.nii.gz.
I tried the following:
3dvolreg -twopass -twodup -heptic -clipit -rotcom -verbose -verbose -prefix S3.2nd.REG -base 'ZHRTS1.nii.gz[0]' mni_template.nii.gz
++ 3dvolreg: AFNI version=AFNI_20.2.08 (Jul 31 2020) [64-bit]
++ Authored by: RW Cox
++ Notice: -clipit is now the default
++ Reading in base dataset /home/maitra/Datasets/sMRI/MR-TIM/ZHRTS1.nii.gz
** AFNI converts NIFTI_datatype=4 (INT16) in file /home/maitra/Datasets/sMRI/MR-TIM/mni_template.nii.gz to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
++ centers of base and input datasets are 41.23 mm apart
** Input /home/maitra/Datasets/sMRI/MR-TIM/mni_template.nii.gz and base /home/maitra/Datasets/sMRI/MR-TIM/ZHRTS1.nii.gz don't have same dimensions!
Input: nx=121 ny=161 nz=201
Base: nx=256 ny=256 nz=20
** Input /home/maitra/Datasets/sMRI/MR-TIM/mni_template.nii.gz and base /home/maitra/Datasets/sMRI/MR-TIM/ZHRTS1.nii.gz don't have same grid spacing!
Input: dx=-1.500 dy=-1.500 dz= 1.500
Base: dx= 0.938 dy= 0.938 dz= 6.000
** Input /home/maitra/Datasets/sMRI/MR-TIM/mni_template.nii.gz and base /home/maitra/Datasets/sMRI/MR-TIM/ZHRTS1.nii.gz don't have same orientation!
Input: L-R P-A I-S
Base: R-L A-P I-S
** FATAL ERROR: perhaps you could make your datasets match?
I have never done this before, and I am not sure how to fix these problems and would benefit from some advice.
Here is my 3dinfo out put for the files:
$ 3dinfo -verb ZHRTS1.nii.gz
++ 3dinfo: AFNI version=AFNI_20.2.08 (Jul 31 2020) [64-bit]
Dataset File: /home/maitra/Datasets/sMRI/MR-TIM/ZHRTS1.nii.gz
Identifier Code: XYZ_UWykEadDCDmcefW0kQ_7jg Creation Date: Thu Mar 28 21:36:43 2019
Template Space: ORIG
Dataset Type: Echo Planar (-epan)
Byte Order: LSB_FIRST [this CPU native = LSB_FIRST]
Storage Mode: NIFTI
Storage Space: 31,457,280 (31 million) bytes
Geometry String: "MATRIX(0.9375,0,0,-119.5312,0,0.9375,0,-119.5312,0,0,6,-57):256,256,20"
Data Axes Tilt: Plumb
Data Axes Orientation:
first (x) = Right-to-Left
second (y) = Anterior-to-Posterior
third (z) = Inferior-to-Superior [-orient RAI]
R-to-L extent: -119.531 [R] -to- 119.531 [L] -step- 0.938 mm [256 voxels]
A-to-P extent: -119.531 [A] -to- 119.531 [P] -step- 0.938 mm [256 voxels]
I-to-S extent: -57.000 [I] -to- 57.000 [S] -step- 6.000 mm [ 20 voxels]
Number of time steps = 12 Time step = 4000.00000ms Origin = 0.00000ms Number time-offset slices = 20 Thickness = 6.000
-- At sub-brick #0 '#0' datum type is short: 0 to 237
-- At sub-brick #1 '#1' datum type is short: 0 to 217
-- At sub-brick #2 '#2' datum type is short: 0 to 202
-- At sub-brick #3 '#3' datum type is short: 0 to 285
-- At sub-brick #4 '#4' datum type is short: 0 to 181
-- At sub-brick #5 '#5' datum type is short: 0 to 184
-- At sub-brick #6 '#6' datum type is short: 0 to 318
-- At sub-brick #7 '#7' datum type is short: 0 to 179
-- At sub-brick #8 '#8' datum type is short: 0 to 160
-- At sub-brick #9 '#9' datum type is short: 0 to 327
-- At sub-brick #10 '#10' datum type is short: 0 to 191
-- At sub-brick #11 '#11' datum type is short: 0 to 173
----- HISTORY -----
[rpg@groucho.umm.edu: Wed Feb 20 11:06:39 2002] to3d -session Results -xFOV 120R-L -yFOV 120A-P -zFOV 60I-S -prefix TS1 -epan -time:zt 20 12 4000 alt+z '3D:0:0:256:256:20:func_1/ana.*.img'
[sroys@groucho.umm.edu: Tue Mar 12 16:04:06 2002] 3dvolreg -prefix ZHRTS1 -zpad 4 -base 5 -heptic -dfile ZHRTS1+orig.reg -clipit TS1+orig.BRIK
$ 3dinfo -verb mni_template.nii.gz
++ 3dinfo: AFNI version=AFNI_20.2.08 (Jul 31 2020) [64-bit]
** AFNI converts NIFTI_datatype=4 (INT16) in file /home/maitra/Datasets/sMRI/MR-TIM/mni_template.nii.gz to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
Dataset File: /home/maitra/Datasets/sMRI/MR-TIM/mni_template.nii.gz
Identifier Code: NII_F1sXB5JMA0w5SfIJOoqeoQ Creation Date: Wed Jan 27 11:22:20 2021
Template Space: TLRC
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI
Storage Space: 15,662,724 (16 million) bytes
Geometry String: "MATRIX(-1.5,0,0,90,0,-1.5,0,130,0,0,1.5,-190):121,161,201"
Data Axes Tilt: Plumb
Data Axes Orientation:
first (x) = Left-to-Right
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient LPI]
R-to-L extent: -90.000 [R] -to- 90.000 [L] -step- 1.500 mm [121 voxels]
A-to-P extent: -110.000 [A] -to- 130.000 [P] -step- 1.500 mm [161 voxels]
I-to-S extent: -190.000 [I] -to- 110.000 [S] -step- 1.500 mm [201 voxels]
Number of values stored at each pixel = 1
-- At sub-brick #0 '?' datum type is float
I am happy to load the data somewhere if it helps in providing better context.
Many thanks in advance for any help/suggestions and best wishes,
Ranjan