Using NiLearn with 2D image sequences

Hi, I’m wondering whether I can use NiLearn to analyse neural imaging data (not human and not MRI), which consists of 2D images over time, or if it requires volumetric data (3D + time)? I have tried playing around with my data in NiLearn (plotting it etc) and the 3 dimensions are being treated as 3 spatial dimensions rather than 2 spatial and one temporal dimension.
Thanks for any help with this.

Hi,

Can you be more specific regarding what kind of imaging data you have and what you are trying to do?

Thanks,
Steven

Hi Steven, thanks for the reply. My data are timeseries of insect muscle activity visualised through calcium imaging, taken in a single plane using a spinning disc microscope. I would like to delineate functional units of muscles by determining pixels with correlated activity. A colleague working with insect brain activity suggested using CanICA in the NiLearn package, which he used to make a functional map of the brain (but using 4D data, whereas mine is 3D).
Let me know if you need any more details.
Thanks
Ana

Hi @analisboa !

In general, nilearn provides interfaces for MRI data to scikit-learn algorithms. So, if you’re working with calcium imaging data, the benefit of working with nilearn is a bit less clear.

In the case of CanICA, it’s calling fastICA with considerations for group-level data: sklearn.decomposition.FastICA — scikit-learn 0.24.2 documentation
So it might make sense to try and apply that directly on your data, rather than modifying the nilearn calls.

For calcium imaging specifically, I’d generally recommend the suite2p library (GitHub - MouseLand/suite2p: cell detection in calcium imaging recordings ), which might be of interest !

HTH,

Elizabeth

Thanks for the advice Elizabeth, very useful. Indeed it seems that NiLearn isn’t the best for my data, and I’ll definitely check out the libraries you suggested.
All the best
Ana