MouseLand / suite2p

cell detection in calcium imaging recordings
http://www.suite2p.org
GNU General Public License v3.0
348 stars 240 forks source link

FEATURE: More .tiff file options for mesoscopic data with ScanImage Metadata #1034

Open FlynnOConnell opened 1 year ago

FlynnOConnell commented 1 year ago

Feature you'd like to see:

I'm not entirely sure if this is a bug, feature request, or just me being naive in the Scan-image landscape.

I'm working on some data analysis routines that were previously done entirely in MATLAB. The data I'm working with heavily relies on Scan-image metadata that isn't readable from a standard .tiff reader, as explained here. My first problem arose from the ScanImageTiffReader.metadata() class method not actually giving me a serializable json object, it was single long string. So I had to parse it separetely first to access the metadata.

Then I found that the Scan-Image utility functions (or really any of their functions) haven't been implemented in the python bindings, namely data extractors like getMroiDataFromTiff().

I realize this specific issue may be more for appropriate for the ScanImageTiffReader devs, but my use-case for it is narrowly focused to usage with Suite2p. And I'm not sure its appropriate to ask/wait for them to implement just a few functions needed to extract the necessary data to analyze large 3D .tiff files.

Attempted alternative approaches:

I recreated some of the functionality that I needed out of the tiff reader. I have them on github here:

Additional Context

I'm wondering if generally people are just doing this metadata extraction part of the analysis in MATLAB, if there are other/better ways to do it, or if this functionality would be helpful to incorporate into the 'io' portion of Suite2p or ScanImageTiffReader.

It's also possible there are ways to do this already implemented, and I just haven't found them. Any thoughts would be appreciated on the topic.

FlynnOConnell commented 1 year ago

related:

79 but dead-end

802, with this file which is the general idea of what I'm talking about but doesn't extract all of the information I need

835