-
Notifications
You must be signed in to change notification settings - Fork 594
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
image.index_img
for the case of 3D volumes
#1346
Comments
Do you think it makes sense if the function index_img returned the whole 3D
image when the imgs parameter is a 3D image and the index is 0?
Seems OK to me.
|
One remark, My opinion is that it violates the principle of "3D niimages are different from 4D niimages". So maybe it can be added as a flag but I think that putting this by default can lead to unexpected behaviors (for example, if I put the file of a mask instead of a time series, I expect it to crash, not to go on). |
Thanks for your input @AlexandreAbraham, it makes sense. Would make sense to add a flag |
My opinion is that it violates the principle of "3D niimages are different from 4D niimages".
Agreed. Thinking about it, it would make error messages harder.
Alex Savio, what is your usecase? Maybe a flag is the good solution.
|
A flag would work for me. However I can implement this outside nilearn, I was just checking. My usecase is to post-process output files from GIFT (tell my boss to use CanICA... XD). In the output, the input data is specified by a list of lines like:
or:
In the first case I have a list of 3D files, in the second case I have a list of 4D files. |
Let me reformulate your problem. You have a list of string with In my opinion, this is not the job of I would see your problem the other way: you have a niimage that can be 3D or 4D but you want it to be 4D in all cases so that it can be eaten by And for long term, I would be in favor of exposing How does it sound to you? |
Thanks for that, yes, your option sounds better than mine in #1347. This is the index_img function I implemented for my stuff some hours ago:
My problem is that I don't like to import private things from |
Hi,
This is a comment on a possible small feature addition.
Do you think it makes sense if the function
index_img
returned the whole 3D image when theimgs
parameter is a 3D image and theindex
is 0?This is how SPM works.
The text was updated successfully, but these errors were encountered: