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

Make class accept images instead of arrays #29

Closed
tsalo opened this issue Feb 23, 2021 · 3 comments · Fixed by #32
Closed

Make class accept images instead of arrays #29

tsalo opened this issue Feb 23, 2021 · 3 comments · Fixed by #32
Labels
enhancement New feature or request

Comments

@tsalo
Copy link
Member

tsalo commented Feb 23, 2021

Originally, we wanted to have the function operate on images and the class operate on arrays, in case we could get rid of the spatial elements of the algorithm (see #5). Since that's not possible anymore, the way we pass around a 3D shape tuple and a 1D mask vector is more than a little awkward. We can just move the image-related code from the function to the class and pass in a data image and a mask image to clean up the interface.

@tsalo tsalo added the enhancement New feature or request label Feb 23, 2021
@tsalo tsalo mentioned this issue Feb 23, 2021
@tsalo
Copy link
Member Author

tsalo commented Feb 23, 2021

@eurunuela and @notZaki, I have two questions:

  1. Can we switch to using nilearn's masking/unmasking functions now? I know that the results were different, but if we're consistent throughout the functions, it should be fine, right?
  2. Should we convert any image-like outputs (i.e., component maps) back to images when we fit/transform? I'm leaning toward yes, but want to know what you think.

@eurunuela
Copy link
Collaborator

  1. Can we switch to using nilearn's masking/unmasking functions now? I know that the results were different, but if we're consistent throughout the functions, it should be fine, right?

Yes, it should be fine. We would need to update the tests though.

  1. Should we convert any image-like outputs (i.e., component maps) back to images when we fit/transform? I'm leaning toward yes, but want to know what you think.

I think we should, yes. We could make the class hold both; e.g., x and x_nii.

@notZaki
Copy link
Collaborator

notZaki commented Feb 24, 2021

I'm in favour of using nilearn's functions.

I don't know enough to comment on the outputs, but it sounds ok to me---it certainly makes the types more symmetric between input-output

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

Successfully merging a pull request may close this issue.

3 participants