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

Bvals preallocation #63

Merged
merged 2 commits into from
Jul 24, 2020
Merged

Conversation

richford
Copy link
Collaborator

Resolves #56.

prepare_data returns the last Nifti1Image generated from data_files in order to replicate the pre-existing behavior. But was that intended? It seems that the old behavior was to return the Nifti1Image produced by running nib.load() on the last element of data_files. Is there something special about the last one?

@arokem
Copy link
Collaborator

arokem commented Apr 11, 2018

I don't think there is anything special about that one. I think that we assumed that the meta-data will be similar across all the nifti files, and we are keeping this around, so that we can get the affine transformation stored in the header of this file. For example: https://github.com/yeatmanlab/pyAFQ/blob/master/AFQ/csd.py#L57

Maybe we should check that the affine properties of all the img objects are identical and then return just the affine, instead of the img object?

Copy link
Collaborator

@arokem arokem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we finish this one? I think it's close to done, but needs a rebase.

AFQ/utils/models.py Outdated Show resolved Hide resolved
@richford
Copy link
Collaborator Author

Rebased on master.

@arokem
Copy link
Collaborator

arokem commented Jul 24, 2020

Thanks!

@arokem arokem merged commit 822af52 into yeatmanlab:master Jul 24, 2020
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

Successfully merging this pull request may close these issues.

This could be optimized by preallocating instead of using append
2 participants