tedana
tedana copied to clipboard
`reshape_niimg()` may be too flexible
Summary
reshape_niimg
is more flexible than documented. reshape_niimg
will sometimes take as input a file name, sometimes a 3D image array, and sometimes a 1D image array. It seems to work for all those conditions.
If it's a file name, it loads the file and then reshapes and if it's already a loaded image, it just uses it. If it's already 1D, it squeezes the file and is still 1D.
Additional Detail
Stems from https://github.com/ME-ICA/tedana/pull/1060#issuecomment-2043671230.
From our April 2024 dev call, the decision is that the function has fine behavior, but we should update the document to accurately reflect what the function can do.