converting 'No template space' .hdr to MNI .nii

I’m trying to convert a ROI mask i’ve downloaded to MNI space but am having a lot of difficulty.

The file is an .hdr file and this is the output from 3dinfo:

Dataset File: superior_temporal_sulcus_posterior_branch_R.img
Identifier Code: ANZ_Y-maODBW7WtxIxcckBBIGA Creation Date: Fri Nov 1 16:43:40 2019
Template Space:
Dataset Type: MRI Anatomy (-anat)
Byte Order: MSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: ANALYZE
Storage Space: 4,145,776 (4.1 million) bytes
Geometry String: “MATRIX(-1,0,0,-0.5,0,-1,0,-0.5,0,0,1.,0.5):149,188,148”
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: -148.500 [R] -to- -0.500 [R] -step- 1.000 mm [149 voxels]
A-to-P extent: -187.500 [A] -to- -0.500 [A] -step- 1.000 mm [188 voxels]
I-to-S extent: 0.500 [S] -to- 147.500 [S] -step- 1.000 mm [148 voxels]
Number of values stored at each pixel = 1
– At sub-brick #0 ‘?’ datum type is byte

As you can see there is no template space. My question is how can I get this into MNI space correctly?

I have tried converting into .nii.gz using 3dcalc -a file.hdr -expr 'a' -prefix R_STS.nii.gz

This then gives me a .nii file in ORIG space:

Dataset File: R_STS.nii.gz
Identifier Code: AFN_au7mMHyj7hD_rjS04Yhxag Creation Date: Fri Nov 1 16:37:40 2019
Template Space: ORIG
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI
Storage Space: 4,145,776 (4.1 million) bytes
Geometry String: “MATRIX(-1,0,0,-0.5,0,-1,0,-0.5,0,0,1.,0.5):149,188,148”
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: -148.500 [R] -to- -0.500 [R] -step- 1.000 mm [149 voxels]
A-to-P extent: -187.500 [A] -to- -0.500 [A] -step- 1.000 mm [188 voxels]
I-to-S extent: 0.500 [S] -to- 147.500 [S] -step- 1.000 mm [148 voxels]
Number of values stored at each pixel = 1
– At sub-brick #0 ‘?’ datum type is byte: 0 to 255

How can I then transform this into MNI? I have tried using 3dfractionalize to no avail.

Thanks for your help!

3drefit -space “MNI” R_STS.nii.g

Hi-

You can convert the file into a NIFTI or BRIK/HEAD file with, respectively:


3dcopy INFILE.hdr OUTFILE.nii.gz
3dcopy INFILE.hdr OUTFILE

Note that *.hdr files will likely be missing some info; the orientation of the dsets might be incorrect, as well as the origin information. Thus, it really might not occupy the space that you want it to.

To change the header information of the file to have it be marked as in template space (assuming that you are sure the header should be changed/corrected this way), you can use 3drefit; the following will overwrite the file, so you might want to make a copy first:


3drefit -space OUTFILE

If using a NIFTI file, you should also verify that the file’s sform and qform codes have been adjusted, too:


nifti_tool -disp_hdr -infiles OUTFILE
nifti_tool -disp_hdr -field sform_code -field qform_code -infiles OUTFILE 

Most times when people are “converting” a dset to a standard space, they are doing this via alignment; for example, with 3dAllineate or, more typically with standard space, 3dQwarp or @SSwarper.

-pt