Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mnc2nii treats minc files touched by different minc tools differently #69

Closed
gdevenyi opened this issue Jul 19, 2017 · 6 comments
Closed

Comments

@gdevenyi
Copy link

Running into a very weird bug in minc-toolkit/1.9.15:

Example 1:
have brain1.mnc and brain1_mask.mnc
if I do

> mincmask brain1.mnc brain1_mask.mnc brain1_extracted.mnc
> mnc2nii brain1_extracted.mnc brain1_extracted.nii

I get NIFTI file that has the orientation re-arranged (i.e. no longer in the same space)
If instead I do:

> mincmath -mult brain1.mnc brain1_mask.mnc brain1_extracted.mnc
> mnc2nii brain1_extracted.mnc brain1_extracted.nii

Everything is fine

Example 2:
have brain1_mask.mnc

> mnc2nii brain1_mask.mnc brain1_mask.nii

Everything is fine.

> mincmorph -successive DDDDDDDD brain1_mask.mnc brain1_mask_D.mnc
> mnc2nii brain1_mask_D.mnc brain1_mask_D.nii

Same problems as above.

Example of the swapped orientation problem:
image

@andrewjanke
Copy link
Member

andrewjanke commented Jul 19, 2017 via email

@rdvincent
Copy link
Member

mnc2nii is pretty buggy. I have been working on some comprehensive fixes, but it is surprisingly hard to catch all of the cases.

@gdevenyi
Copy link
Author

@andrewjanke sadly, the mincreshape didn't fix it up :(

@fristed
Copy link
Member

fristed commented Aug 16, 2017

This seems to be exactly the same bug we report in issue #32 (last comment). Also, I think this bug arose with the fix done in November 2016, which addressed the issue of wrong start values. Running a mnc2nii from before the November 2016 fix does not have the bug with swapped orientation.
In issue #32 (last comment) I provide an example, which behaves similarly as the example provided by Gabriel above. However, running an old (before Novmeber 2016) version of mnc2nii does not result in the error.

@gdevenyi
Copy link
Author

Thanks for the hint @fristed, an older version of mnc2nii doesn't have this bug and otherwise converts everything fine.

@gdevenyi
Copy link
Author

Fixed by #99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants