{"action":"created","issue":{"url":"https://api.github.com/repos/neurolabusc/dcm2niix/issues/45","repository_url":"https://api.github.com/repos/neurolabusc/dcm2niix","labels_url":"https://api.github.com/repos/neurolabusc/dcm2niix/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/neurolabusc/dcm2niix/issues/45/comments","events_url":"https://api.github.com/repos/neurolabusc/dcm2niix/issues/45/events","html_url":"https://github.com/neurolabusc/dcm2niix/issues/45","id":177697367,"number":45,"title":"random (? ;-)) gl* and some other header values in the generated nii.gz","user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-09-19T03:14:29Z","updated_at":"2016-09-20T02:11:30Z","closed_at":"2016-09-20T02:04:13Z","body":"Sorry for a big long report, which evolved while I was digging through the issue:\r\n\r\nrerunning the same dcm2niix (0.20160606.1+git22-gf6471c0-1~nd90+1) call results in nifti files with differing headers: e.g.\r\n```shell\r\n$> nifti_tool -diff_hdr -infiles out/PHANTOM1_3.nii.gz out1/PHANTOM1_3.nii.gz \r\n  name                offset  nvals  values\r\n  ------------------- ------  -----  ------\r\n  glmax                140      1    32643\r\n  glmax                140      1    32635\r\n  glmin                144      1    -425050208\r\n  glmin                144      1    -1197384832\r\n```\r\nso I have built bleeding edge 20160606-50-g236b267 and difference on this particular set of files disappeared across few reruns BUT reappeared while converting other files and this time only in glmax (so I guess glmin issue got somehow addressed) and session_error:\r\n\r\n```\r\n$> niidiff ../outputs-test-reran{9,10}/PHANTOM1_3/run003-0.nii.gz                                               \r\nNIfTI header diff: ../outputs-test-reran9/PHANTOM1_3/run003-0.nii.gz -> ../outputs-test-reran10/PHANTOM1_3/run003-0.nii.gz\r\n  name                offset  nvals  values\r\n  ------------------- ------  -----  ------\r\n  session_error         36      1    32767\r\n  session_error         36      1    32765\r\n....\r\n$> niidiff ../outputs-test-reran{8,10}/PHANTOM1_3/run002-0.nii.gz \r\nNIfTI header diff: ../outputs-test-reran8/PHANTOM1_3/run002-0.nii.gz -> ../outputs-test-reran10/PHANTOM1_3/run002-0.nii.gz\r\n  name                offset  nvals  values\r\n  ------------------- ------  -----  ------\r\n  glmax                140      1    32766\r\n  glmax                140      1    32765\r\n```\r\n\r\nSo I have cooked up a tarball with data/script/output to reproduce:  http://www.onerussian.com/tmp/dcm2niix-bug.20160918.tgz\r\n\r\n```shell\r\n$> ./outputs-test-reran10.sh \r\nChris Rorden's dcm2niiX version 28Aug2016 (64-bit Linux)\r\nFound 5 DICOM image(s)\r\nslices not stacked: orientation varies (localizer?) [-0.050626 0.971613 -0.231097 -0.0485989 -0.233516 -0.971138] != [-0.731964 0.669963 -0.124007 -0.056041 -0.240586 -0.969009] ('-m y' to force stacking)\r\nConvert 2 DICOM as out/PHANTOM1_3 (162x162x2x1)\r\nslices not stacked: orientation varies (localizer?) [-0.731964 0.669963 -0.124007 -0.056041 -0.240586 -0.969009] != [-0.0393658 0.998954 -0.0232823 -0.0580964 -0.0255492 -0.997984] ('-m y' to force stacking)\r\nConvert 1 DICOM as out/PHANTOM1_3a (162x162x1x1)\r\nWARNING: check that 2D images are not mirrored.\r\nslices not stacked: orientation varies (localizer?) [-0.0393658 0.998954 -0.0232823 -0.0580964 -0.0255492 -0.997984] != [0.633816 0.741325 -0.220712 -0.056041 -0.240586 -0.969009] ('-m y' to force stacking)\r\nConvert 1 DICOM as out/PHANTOM1_3b (162x162x1x1)\r\nWARNING: check that 2D images are not mirrored.\r\nslices not stacked: orientation varies (localizer?) [0.633816 0.741325 -0.220712 -0.056041 -0.240586 -0.969009] != [-0.050626 0.971613 -0.231097 -0.0485989 -0.233516 -0.971138] ('-m y' to force stacking)\r\nConvert 1 DICOM as out/PHANTOM1_3c (162x162x1x1)\r\nWARNING: check that 2D images are not mirrored.\r\nConversion required 0.026548 seconds.\r\n\r\n$> mv out out1\r\n\r\n$> ./outputs-test-reran10.sh; md5sum out{,1}/PHANTOM1_3.nii.gz\r\nChris Rorden's dcm2niiX version 28Aug2016 (64-bit Linux)\r\nFound 5 DICOM image(s)\r\nslices not stacked: orientation varies (localizer?) [-0.050626 0.971613 -0.231097 -0.0485989 -0.233516 -0.971138] != [-0.731964 0.669963 -0.124007 -0.056041 -0.240586 -0.969009] ('-m y' to force stacking)\r\nConvert 2 DICOM as out/PHANTOM1_3 (162x162x2x1)\r\nslices not stacked: orientation varies (localizer?) [-0.731964 0.669963 -0.124007 -0.056041 -0.240586 -0.969009] != [-0.0393658 0.998954 -0.0232823 -0.0580964 -0.0255492 -0.997984] ('-m y' to force stacking)\r\nConvert 1 DICOM as out/PHANTOM1_3a (162x162x1x1)\r\nWARNING: check that 2D images are not mirrored.\r\nslices not stacked: orientation varies (localizer?) [-0.0393658 0.998954 -0.0232823 -0.0580964 -0.0255492 -0.997984] != [0.633816 0.741325 -0.220712 -0.056041 -0.240586 -0.969009] ('-m y' to force stacking)\r\nConvert 1 DICOM as out/PHANTOM1_3b (162x162x1x1)\r\nWARNING: check that 2D images are not mirrored.\r\nslices not stacked: orientation varies (localizer?) [0.633816 0.741325 -0.220712 -0.056041 -0.240586 -0.969009] != [-0.050626 0.971613 -0.231097 -0.0485989 -0.233516 -0.971138] ('-m y' to force stacking)\r\nConvert 1 DICOM as out/PHANTOM1_3c (162x162x1x1)\r\nWARNING: check that 2D images are not mirrored.\r\nConversion required 0.023688 seconds.\r\n1e3816b92567159bbc5cd900bc5ce068  out/PHANTOM1_3.nii.gz\r\n697b0b296b84803d51c35035591bb5bc  out1/PHANTOM1_3.nii.gz\r\n\r\n$> niidiff out{,1}/PHANTOM1_3.nii.gz                          \r\nNIfTI header diff: out/PHANTOM1_3.nii.gz -> out1/PHANTOM1_3.nii.gz\r\n  name                offset  nvals  values\r\n  ------------------- ------  -----  ------\r\n  glmax                140      1    32765\r\n  glmax                140      1    32767\r\n```\r\n\r\neven if input is problematic, output imho should be deterministic ;)\r\nIf I run that call through valgrind, it screams at me with lots of uses or jumps based on uninitialized values... worrisome:  http://www.onerussian.com/tmp/dcm2niix-20160918-valgrind.txt\r\n\r\nrelated: I wondered -- is there any kind of automated testing established for dcm2niix?"},"comment":{"url":"https://api.github.com/repos/neurolabusc/dcm2niix/issues/comments/248182679","html_url":"https://github.com/neurolabusc/dcm2niix/issues/45#issuecomment-248182679","issue_url":"https://api.github.com/repos/neurolabusc/dcm2niix/issues/45","id":248182679,"user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T02:11:30Z","updated_at":"2016-09-20T02:11:30Z","body":"BTW @neurolabusc - I think I have reported already but forgot where -- some tarballs from the nitrc wiki page you referenced are no longer available, e.g. http://www.mccauslandcenter.sc.edu/crnl/sw/dcm2niix/sliceorder_Siemens_SC.zip"}}
{"actor":{"display_login":"yarikoptic"}}