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

Operate on images in subsampling function #31

Open
tsalo opened this issue Feb 23, 2021 · 3 comments · May be fixed by #35
Open

Operate on images in subsampling function #31

tsalo opened this issue Feb 23, 2021 · 3 comments · May be fixed by #35

Comments

@tsalo
Copy link
Member

tsalo commented Feb 23, 2021

If the subsampling function operates on images, it will be easier to use nilearn's functions for masking/unmasking the data. See #32.

Original post:

How do you all feel about using nilearn.image.resample_img() for utils.subsampling()? I am working on #29, and I think it would be easier have a function that downsamples and returns images instead of arrays.

@tsalo
Copy link
Member Author

tsalo commented Feb 23, 2021

Actually, downsampling and subsampling may be different tasks. We can still make the subsampling function work on images though.

@eurunuela
Copy link
Collaborator

How do you all feel about using nilearn.image.resample_img() for utils.subsampling()? I am working on #29, and I think it would be easier have a function that downsamples and returns images instead of arrays.

I don't think nilearn.image.resample_img() is what we're looking for.

Actually, downsampling and subsampling may be different tasks. We can still make the subsampling function work on images though.

I don't see why we would need to do this. The subsampling happens inside the fitting function, where images are already in matrix format. Is there any other case where we would want to subsample images?

@tsalo
Copy link
Member Author

tsalo commented Feb 24, 2021

Agreed that resample_img is not the right tool. However, I will say that having subsampling operate on images will make it easier to stick with nilearn's masking and unmasking functions internally. At that point, though, the results will be the same and the changes will be buried deep in the code, so it's not the big change that using resample_img would be.

@tsalo tsalo changed the title Use nilearn's resample_img for subsampling Operate on images in subsampling function Feb 24, 2021
@tsalo tsalo linked a pull request Feb 24, 2021 that will close this issue
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 a pull request may close this issue.

2 participants