BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
30 stars 25 forks source link

nii2mnc (and Display) improperly handles some NIFTI files #68

Open gdevenyi opened 7 years ago

gdevenyi commented 7 years ago

I have some .hdr/.img files from the fBRIN section of Schzconnect which 1) Don't render properly in Display 2) Don't convert properly with nii2mnc

In particular, they end up squeezed compared to the originals:

Example: Display: image

FSL image

Conversion results in a MINC file which looks like the view in Display.

Happy to provide multiple examples.

gdevenyi commented 7 years ago

PrintHeader:

PrintHeader f0001.hdr
 Spacing [0.9375, 0.9375, 1.5]
 Origin [-123.817, -78.817, 93.6996]
 Direction 
-0 1 0
0 -0 1
-1 0 -0

 Size : 256 256  120

  Image Dimensions   : [256, 256, 120]
  Bounding Box       : {[-123.817 -78.817 93.6996], [116.183 161.183 273.7]}
  Voxel Spacing      : [0.9375, 0.9375, 1.5]
  Intensity Range    : [-5, 92]
  Mean Intensity     : 11.578
  Direction Cos Mtx. : 
-0 1 0
0 -0 1
-1 0 -0

  Voxel->RAS x-form  : 
  Image Metadata: 
    bitpix = 16
    cal_max = 0
    cal_min = 0
    datatype = 4
    dim[0] = 3
    dim[1] = 256
    dim[2] = 256
    dim[3] = 120
    dim[4] = 1
    dim[5] = 1
    dim[6] = 1
    dim[7] = 1
    intent_code = 0
    intent_p1 = 3.92546e-41
    intent_p2 = 0
    intent_p3 = 0
    pixdim[0] = -1
    pixdim[1] = 0.9375
    pixdim[2] = 0.9375
    pixdim[3] = 1.5
    pixdim[4] = 0
    pixdim[5] = 0
    pixdim[6] = 0
    pixdim[7] = 0
    qform_code = 1
    qform_code_name = NIFTI_XFORM_SCANNER_ANAT
    qoffset_x = 123.817
    qoffset_y = 78.817
    qoffset_z = 93.6996
    quatern_b = -0.5
    quatern_c = 0.5
    quatern_d = 0.5
    scl_inter = 0
    scl_slope = 0
    sform_code = 1
    sform_code_name = NIFTI_XFORM_SCANNER_ANAT
    slice_duration = 0
    slice_end = 0
    slice_start = 0
    srow_x = -0 -0.9375 -0 123.817
    srow_y = 0 -0 -0.9375 78.817
    srow_z = -1.5 0 0 93.6996
    toffset = 0
    vox_offset = 0