-
Notifications
You must be signed in to change notification settings - Fork 258
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
wrong minc header #712
Comments
Hi @ltetrel., thanks for the report. I'm not sure that's the issue, as the affine should only be setting the first three zooms. If you're familiar with the MINC formats (or at least MINC2), would you care to dig into this and submit a pull request? I suspect the issue is here: Lines 95 to 99 in 5ab9414
It's not clear to me that we're looking for TR at all. We'll need to find how that's represented in each format, and possibly use two different approaches in MINC1 and MINC2 to return the TR. |
Hi @effigies, I am not really familiar with this format sorry.. For now it seems to work with the little trick that I posted, but maybe I am missing something.. Thx, |
Hi @ltetrel, sorry to be so slow getting back to this one. Sorry to be a bit obtuse, but I'm not sure what little trick you posted that fixed the issue for you. Could you be very explicit? |
Hi @effigies, Actually my main problem was that I had a wrong header information (at least affine and repetition time) when loading a
When it should be (with minc toolkit):
So in this case I had to manually overwrite the repetition time:
|
Sorry for being so slow to get back to this. Looking at the file format reference, it indicates that If you're sure that it's well-formed, would you be willing to share it (with data zeroed-out and truncated to, say, 5 volumes) so we could make it part of the test suite? |
Hi @effigies, I don't know if there is an issue with this file since I am not a frequent user of minc files, I just can say that I have no artifacts when I see it, and the header seems normal. So to test it, I think the idea would be to compare the output from hope this will help, |
Hi @ltetrel, you can send an attachment directly to this username @ gmail. GitHub will strip attachments. |
I'm pretty sure that there are multiple conventions used by minc files and that's the source of a lot of the confusion. I tried to dig into this a while ago, and it is possible to have a variable step size per dimension (not just time), and spatial dimensions (1mm per voxel, say), sometimes have a giant array of [1, 1, 1, 1, 1, 1, ..., 1]. Sometimes they just have a single value (1). I think many tools do not quite respect the official minc spec as well |
Does the standard specify an order of precedence? If so, we can work with that. It's not an easy thing to read through. A battery of example files and the correct interpretation of them would go a long way. |
Hello all,
So I am trying to convert
.mnc
images to.nii
with nibabel, here is my code :The problem is that the header
nib.minc2.Minc2Image.header
does nto have proper TR information :When it should be (using mincheader):
I started investigated and apparently it has something to do with
nibabel/nibabel/spatialimages.py
Line 511 in 8b1a1b2
Thank you for your work,
The text was updated successfully, but these errors were encountered: