-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add function to extract ROIs metadata from ScanImage tiff #272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for catching this. It looks like there's a whole swath of metadata stored in a json-style string that we haven't been extracting.
However, I would prefer if this were integrated into the existing extract_extra_metadata
function. That way the metadata function would return all the metadata in the 'system_metadata_string' AND the 'extra_metadata_string' (as you called them). Then you can add a section to grab the ROI groups in the parse_metadata
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for implementing the changes.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #272 +/- ##
==========================================
- Coverage 79.19% 79.00% -0.20%
==========================================
Files 39 39
Lines 3057 3067 +10
==========================================
+ Hits 2421 2423 +2
- Misses 636 644 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
In the ScanImage .tif metadata there is a dictonary saved as text that the function
extract_extra_metadata
cannot parse, where information on the ROIs are stored. I implemented a new function callextract_roi_metadata
(#272) that return this dict.From
imagingRoiGroup
we can extract info on the dimension of the field of view (XY) from"sizeXY"
and divide by the dimension to get the grid_spacing (z dimension missed)In
integrationRoiGroup
we can extract information about the position of the rois: inv(pixelToRefTransform
)*centerXY