Converting orig to tlrc space

Hi experts,
I need some help to understand how AFNI recognizes whether the output of first- and group-level analysis is in MNI or native space.
The preprocessing of our functional data was not entirely done with AFNI and we have carried out non-linear affine transformation using 'antsApplyTransforms'. Further analyses were carried out employing 3ddeconvolve and 3dttest. The problem is that the 3d data is already in MNI space but AFNI identifies it as native/orig space.
I have tried setenv to see if the stat sub-brick/nifti image can be identified in MNI space and to use whereami option. But, this doesn't seem to help the cause.
Is there any way to work around this?
Advance thanks for all the suggestions.

Nt

Hi Nt,

It would be nice to know what space the NIFTI datasets claim to be in. I expect that the writing program is not declaring it as being in standard space.

Given some Ants-transformed dataset (input to 3dDeconvolve, say), calling it ants_epi.nii, for example, what is the output from:

nifti_tool -disp_hdr -infiles ants_epi.nii
  • rick

Hi Rick,

This is the output from-

nifti_tool -disp_hdr -infiles sub-01_ses-2_task_dir_run-1_reg-HCPICBM.nii

N-1 header file 'sub-01_ses-2_task_dir_run-1_reg-HCPICBM.nii.gz', num_fields = 43

all fields:
  name                offset  nvals  values
  ------------------- ------  -----  ------
  sizeof_hdr             0      1    348
  data_type              4     10    
  db_name               14     18    
  extents               32      1    0
  session_error         36      1    0
  regular               38      1    r
  dim_info              39      1    48
  dim                   40      8    4 99 117 95 389 1 1 1
  intent_p1             56      1    0.0
  intent_p2             60      1    0.0
  intent_p3             64      1    0.0
  intent_code           68      1    0
  datatype              70      1    16
  bitpix                72      1    32
  slice_start           74      1    0
  pixdim                76      8    1.0 2.0 2.0 2.0 0.8 0.0 0.0 0.0
  vox_offset           108      1    14448.0
  scl_slope            112      1    0.0
  scl_inter            116      1    0.0
  slice_end            120      1    94
  slice_code           122      1    0
  xyzt_units           123      1    10
  cal_max              124      1    0.0
  cal_min              128      1    0.0
  slice_duration       132      1    0.0
  toffset              136      1    0.0
  glmax                140      1    0
  glmin                144      1    0
  descrip              148     80    
  aux_file             228     24    
  qform_code           252      1    1
  sform_code           254      1    1
  quatern_b            256      1    0.0
  quatern_c            260      1    -0.0
  quatern_d            264      1    0.0
  qoffset_x            268      1    -98.0
  qoffset_y            272      1    -134.0
  qoffset_z            276      1    -72.0
  srow_x               280      4    2.0 -0.0 -0.0 -98.0
  srow_y               296      4    -0.0 2.0 -0.0 -134.0
  srow_z               312      4    0.0 0.0 2.0 -72.0
  intent_name          328     16    
  magic                344      4    n+1

I tried reading the x y z coordinates after cluster thresholding using
whereami [x y z] -atlas CA_ML_18_MNI
But I'm not very sure if this will provide me with correct corresponding areas.

Nt

Hi Nt,

So both the sform_code and the qform_code are 1, which is specifically declaring the data to be in original space. If it were in MNI space, those values should be 4. If in *some* standard space, but either not TLRC or MNI, or just not positive which, the codes should be 5.

That detail should be part of applying the ANTs transformation, whenever the result is saved to NIFTI format.

  • rick