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

ECAT file support #776

Closed
idoimaging opened this issue Jul 26, 2019 · 9 comments · Fixed by #777
Closed

ECAT file support #776

idoimaging opened this issue Jul 26, 2019 · 9 comments · Fixed by #777
Labels
Milestone

Comments

@idoimaging
Copy link

Currently, EcatImage is not included in all_image_classes in imageclasses.py. Adding it and calling load() on an ECAT file gives an error in ecat.py line 562:

        i = iter(affs)
        first = i.next()

Changing the second line to the Python 3 syntax first = next(i) seems to address this issue, but there may be other Python 2 code in the EcatImage class.

@effigies
Copy link
Member

There are some open issues for adding EcatImage to nibabel.load: #95 / BIAP7

I believe the current way to load is:

import nibabel
nibabel.ecat.load(fname)

So it looks like the issue here is that we're never testing this code. I wonder if you have a multi-frame ecat of a phantom that we could add to our test battery.

I'll open a pull request with your suggested fix.

@effigies
Copy link
Member

Actually, since you found this issue, would you care to submit a pull request?

@idoimaging
Copy link
Author

idoimaging commented Jul 26, 2019

OK, I'll get on to both of those. Also apologies for not first finding the earlier issue #95.

@idoimaging
Copy link
Author

I have plenty of multi-frame Ecat phantom images but they are all 27 MB per frame. Here's one: https://www.dropbox.com/s/nh3d2vyijkf69td/ecat_03fr.v?dl=0

@effigies
Copy link
Member

Thanks. We may be able to reduce the size a bit one way or another. If not, we have some repositories of large test files we can add it to.

@effigies
Copy link
Member

@idoimaging Do you have any opposition to releasing that image to the public domain (e.g., by the CC0 license)? Or perhaps some other license? I'm considering adding it to nipy-ecattest, which currently has one file licensed under CC0.

I can also post an image that is identical, except with a data block of all zeros.

@idoimaging
Copy link
Author

That's fine, though it's not a phantom obviously, and is huge. If you don't need the voxels, they could certainly go.

@effigies
Copy link
Member

Okay, I'll do the zeroed out version. If there's any metadata I should destroy let me know.

@effigies
Copy link
Member

It turns out editing ECAT files is actually quite difficult. I suppose I'll go with the original file.

@effigies effigies mentioned this issue Jul 29, 2019
12 tasks
@effigies effigies added the bug label Jul 29, 2019
effigies added a commit to effigies/nibabel that referenced this issue Jul 30, 2019
@effigies effigies added this to the 2.5.0 milestone Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants