Developers:
I am trying to convert a nifti formated image to the mgz format using mri_convert, but there is an error stating that the time units are unknown. Since there are only 3 dimension, the time dimension should not matter.
mri_convert -it nii -ic 128 128 128 -oc 128 128 128 -iid 1.0 0.0 0.0 new_all.nii new.mgz mri_convert -it nii -ic 128 128 128 -oc 128 128 128 -iid 1.0 0.0 0.0 new_all.nii new.mgz reading from new_all.nii... niiRead(): unknown time units in /Users/hjmjohnson/src/regressiontest/SGI/MR/B2-downsampled/TEST/20_ACPC/harr is/new_all.nii
Any help would be greatly appreciated.
Thanks, Hans
PS: Here is a dump of the nifti header that I am trying to use:
~/src/deleteme/utils/nifti_tool -disp_hdr -infile new_all.nii
header file 'new_all.nii', 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 0 dim 40 8 3 100 100 124 1 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 2 bitpix 72 1 8 slice_start 74 1 0 pixdim 76 8 0.0 2.0 2.0 1.6 1.0 1.0 1.0 1.0 vox_offset 108 1 352.0 scl_slope 112 1 1.0 scl_inter 116 1 0.0 slice_end 120 1 0 slice_code 122 1 0 xyzt_units 123 1 2 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 0 sform_code 254 1 2 quatern_b 256 1 0.0 quatern_c 260 1 0.0 quatern_d 264 1 0.0 qoffset_x 268 1 0.0 qoffset_y 272 1 0.0 qoffset_z 276 1 0.0 srow_x 280 4 -2.0 0.0 0.0 0.0 srow_y 296 4 0.0 0.0 -2.0 0.0 srow_z 312 4 0.0 1.6 0.0 0.0 intent_name 328 16 magic 344 4 n+1
Your hdr dump says that xyzt_units = 2, which corresponds to an unknown time unit. How was this file created?
doug
On Tue, 13 Sep 2005, Hans Johnson wrote:
Developers:
I am trying to convert a nifti formated image to the mgz format using mri_convert, but there is an error stating that the time units are unknown. Since there are only 3 dimension, the time dimension should not matter.
mri_convert -it nii -ic 128 128 128 -oc 128 128 128 -iid 1.0 0.0 0.0 new_all.nii new.mgz mri_convert -it nii -ic 128 128 128 -oc 128 128 128 -iid 1.0 0.0 0.0 new_all.nii new.mgz reading from new_all.nii... niiRead(): unknown time units in /Users/hjmjohnson/src/regressiontest/SGI/MR/B2-downsampled/TEST/20_ACPC/harr is/new_all.nii
Any help would be greatly appreciated.
Thanks, Hans
PS: Here is a dump of the nifti header that I am trying to use:
~/src/deleteme/utils/nifti_tool -disp_hdr -infile new_all.nii
header file 'new_all.nii', 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 0 dim 40 8 3 100 100 124 1 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 2 bitpix 72 1 8 slice_start 74 1 0 pixdim 76 8 0.0 2.0 2.0 1.6 1.0 1.0 1.0 1.0 vox_offset 108 1 352.0 scl_slope 112 1 1.0 scl_inter 116 1 0.0 slice_end 120 1 0 slice_code 122 1 0 xyzt_units 123 1 2 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 0 sform_code 254 1 2 quatern_b 256 1 0.0 quatern_c 260 1 0.0 quatern_d 264 1 0.0 qoffset_x 268 1 0.0 qoffset_y 272 1 0.0 qoffset_z 276 1 0.0 srow_x 280 4 -2.0 0.0 0.0 0.0 srow_y 296 4 0.0 0.0 -2.0 0.0 srow_z 312 4 0.0 1.6 0.0 0.0 intent_name 328 16 magic 344 4 n+1
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Doug,
There are not time units in this data set. From the nifti1 header, here are the valid tags:
From the nifti1.h file available on sourceforge (i.e. The reference
implementation):
- If dim[4]=1 or dim[0] < 4, there is no time axis. /*! NIFTI code for millimeters. */ #define NIFTI_UNITS_MM 2
Thanks for you input, Hans
On 9/14/05 12:43 AM, "Doug Greve" greve@nmr.mgh.harvard.edu wrote:
Your hdr dump says that xyzt_units = 2, which corresponds to an unknown time unit. How was this file created?
doug
On Tue, 13 Sep 2005, Hans Johnson wrote:
Developers:
I am trying to convert a nifti formated image to the mgz format using mri_convert, but there is an error stating that the time units are unknown. Since there are only 3 dimension, the time dimension should not matter.
mri_convert -it nii -ic 128 128 128 -oc 128 128 128 -iid 1.0 0.0 0.0 new_all.nii new.mgz mri_convert -it nii -ic 128 128 128 -oc 128 128 128 -iid 1.0 0.0 0.0 new_all.nii new.mgz reading from new_all.nii... niiRead(): unknown time units in /Users/hjmjohnson/src/regressiontest/SGI/MR/B2-downsampled/TEST/20_ACPC/harr is/new_all.nii
Any help would be greatly appreciated.
Thanks, Hans
PS: Here is a dump of the nifti header that I am trying to use:
~/src/deleteme/utils/nifti_tool -disp_hdr -infile new_all.nii
header file 'new_all.nii', 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 0 dim 40 8 3 100 100 124 1 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 2 bitpix 72 1 8 slice_start 74 1 0 pixdim 76 8 0.0 2.0 2.0 1.6 1.0 1.0 1.0 1.0 vox_offset 108 1 352.0 scl_slope 112 1 1.0 scl_inter 116 1 0.0 slice_end 120 1 0 slice_code 122 1 0 xyzt_units 123 1 2 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 0 sform_code 254 1 2 quatern_b 256 1 0.0 quatern_c 260 1 0.0 quatern_d 264 1 0.0 qoffset_x 268 1 0.0 qoffset_y 272 1 0.0 qoffset_z 276 1 0.0 srow_x 280 4 -2.0 0.0 0.0 0.0 srow_y 296 4 0.0 0.0 -2.0 0.0 srow_z 312 4 0.0 1.6 0.0 0.0 intent_name 328 16 magic 344 4 n+1
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu