CoBrALab / quarantine

0 stars 0 forks source link

Scinet quarantine: nii2mnc #24

Open raihaan opened 9 years ago

raihaan commented 9 years ago

Had an issue running nii2mnc using updated module setup, but was able to run nii2mnc on same file using minc-tools/mice-chihiro

Old style:

gpc-f102n084-ib0-$ module list
Currently Loaded Modulefiles:
  1) quarantine                     3) gcc/4.6.1                      5) intel/12.1.3                   7) python/2.7.2                   9) gotoblas/1.13-singlethreaded  11) /minc-tools/mice-chihiro
  2) gnu-parallel/20140622          4) nano/2.2.4                     6) extras/64_6.4                  8) gnuplot/4.6.1                 10) openmpi/1.4.4-intel-v12.1
gpc-f102n084-ib0-$ nii2mnc AA2006D211Dy1_T1.nii test.mnc
<nifti_image
  nifti_type = 'NIFTI-1+'
  header_filename = 'AA2006D211Dy1_T1.nii'
  image_filename = 'AA2006D211Dy1_T1.nii'
  image_offset = '352'
  ndim = '3'
  nx = '256'
  ny = '256'
  nz = '124'
  dx = '0.7813'
  dy = '0.7813'
  dz = '1.5'
  datatype = '4'
  datatype_name = 'INT16'
  nvox = '8126464'
  nbyper = '2'
  byteorder = 'LSB_FIRST'
  scl_slope = '1'
  scl_inter = '0'
  xyz_units = '2'
  xyz_units_name = 'mm'
  time_units = '8'
  time_units_name = 's'
  descrip = 'FSL5.0'
  aux_file = 'E2801S2I1.MR'
  num_ext = '0'
/>
xspace start: -100.0064 step:   0.7813 cosines:   1.0000   0.0000   0.0000
yspace start: -100.0064 step:   0.7813 cosines:   0.0000   1.0000   0.0000
zspace start: -93.0000 step:   1.5000 cosines:   0.0000   0.0000   1.0000
gpc-f102n084-ib0-$ ls test.mnc 
test.mnc
gpc-f102n084-ib0-$ mincinfo test.mnc 
file: test.mnc
image: signed__ short 0 to 2253
image dimensions: zspace yspace xspace
    dimension name         length         step        start
    --------------         ------         ----        -----
    zspace                    124          1.5          -93
    yspace                    256       0.7813     -100.006
    xspace                    256       0.7813     -100.006

Meanwhile:

scinet01-ib0-$ gpcdev
ssh  gpc02 
Last login: Wed Jul 29 13:16:11 2015 from scinet01
gpc-f102n084-ib0-$ module list
No Modulefiles Currently Loaded.
gpc-f102n084-ib0-$ module use -a /project/m/mchakrav/quarantine/modules/
gpc-f102n084-ib0-$ module load scinet
gpc-f102n084-ib0-$ module list
Currently Loaded Modulefiles:
  1) /quarantine                              6) gnu-parallel/20140622                   11) ImageMagick/6.9.1-4                     16) /bpipe/0.9.8.7
  2) gcc/4.9.0                                7) mesa/7.11                               12) /minc-toolkit/1.9.10                    17) /scinet
  3) intel/15.0.2                             8) python/2.7.8                            13) /pyminc/0.41
  4) git/1.9.5                                9) extras/64_6.4                           14) /minc-stuffs/0.1.9^minc-toolkit-1.9.10
  5) nano/2.2.4                              10) Xlibraries/X11-64                       15) java/oracle-java-x86_64-80_45
gpc-f102n084-ib0-$ cd scratch/
gpc-f102n084-ib0-$ nii2mnc AA2006D211Dy1_T1.nii new.mnc
<nifti_image
  nifti_type = 'NIFTI-1+'
  header_filename = 'AA2006D211Dy1_T1.nii'
  image_filename = 'AA2006D211Dy1_T1.nii'
  image_offset = '352'
  ndim = '3'
  nx = '256'
  ny = '256'
  nz = '124'
  dx = '0.7813'
  dy = '0.7813'
  dz = '1.5'
  datatype = '4'
  datatype_name = 'INT16'
  nvox = '8126464'
  nbyper = '2'
  byteorder = 'LSB_FIRST'
  scl_slope = '1'
  scl_inter = '0'
  xyz_units = '2'
  xyz_units_name = 'mm'
  time_units = '8'
  time_units_name = 's'
  descrip = 'FSL5.0'
  aux_file = 'E2801S2I1.MR'
  num_ext = '0'
/>
Segmentation fault
gpc-f102n084-ib0-$ ls new.mnc
ls: cannot access new.mnc: No such file or directory
raihaan commented 9 years ago

I tried to convert /scratch/m/mchakrav/patelmo6/AA2006D211Dy1_T1.nii

/scratch/m/mchakrav/patelmo6/test.mnc was the output from nii2mnc using chihiro

gdevenyi commented 9 years ago

Some .nii files are awful and broken, nii2mnc doesn't like them.

itk_convert can do it

gdevenyi commented 9 years ago

If an example file is available to share, I can submit a bug upstream to @vfonov

vfonov commented 9 years ago

There were changes to mnc2nii and nii2mnc : https://github.com/BIC-MNI/minc-tools/commits/develop/conversion/nifti1 , maybe you happen to have different versions on different systems?

gdevenyi commented 9 years ago

@vfonov The failing version is from minc-toolkit-1.9.10, the succeeding version is from a much older version from the MICe quarantine builder

1.9.10 fails on both SciNet and at the CIC here (one built on ICC on scinet, one built on debian 6.0 gcc)

vfonov commented 9 years ago

can you give me the .nii file that causes the crash?

gdevenyi commented 9 years ago

@vfonov Waiting on @raihaan to get permission from the original owner of the file so we can share.