Migrate BrukerTiffImagingInterface to the unified extractor and dict-based metadata#1773
Open
h-mayorquin wants to merge 10 commits into
Open
Migrate BrukerTiffImagingInterface to the unified extractor and dict-based metadata#1773h-mayorquin wants to merge 10 commits into
BrukerTiffImagingInterface to the unified extractor and dict-based metadata#1773h-mayorquin wants to merge 10 commits into
Conversation
h-mayorquin
marked this pull request as ready for review
July 3, 2026 20:04
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1773 +/- ##
==========================================
+ Coverage 82.61% 82.77% +0.15%
==========================================
Files 177 177
Lines 14261 14455 +194
==========================================
+ Hits 11782 11965 +183
- Misses 2479 2490 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
BrukerTiffImagingInterface, a new interface built on the unifiedBrukerTiffImagingExtractorfrom roiextractors (roiextractors#567). A single class now covers what was previously split acrossBrukerTiffSinglePlaneImagingInterfaceandBrukerTiffMultiPlaneImagingInterface: single-plane data writes a 2DTwoPhotonSeriesand volumetric data writes a single 4DTwoPhotonSeriesautomatically. For multi-channel and multi-plane folders, a newBrukerTiffConverter(a thinConverterPipe) auto-enumerates channels from the folder's Bruker.xmland, viaplane_separation_type, optionally one interface per depth plane, replacing bothBrukerTiffSinglePlaneConverterandBrukerTiffMultiPlaneConverter.The new interface emits only the new dict-based metadata format (#1653):
Devices,Ophys.ImagingPlanes,Ophys.MicroscopySeries. Together with the PR for the Miniscope migration (#1731), this is the last optical-physiology interface to move onto it. That is, the migration for optical physiology will be finished after this.BrukerTiffSinglePlaneImagingInterface,BrukerTiffMultiPlaneImagingInterface,BrukerTiffSinglePlaneConverter, andBrukerTiffMultiPlaneConverterare all deprecated for removal in or after December 2026. The last one previously had no replacement because disjoint volumetric output (oneTwoPhotonSeriesandImagingPlaneper z-plane, required by NWB whenexcitation_lambda/indicator/locationdiffer across depths and depended on by per-plane segmentation pipelines likepinto-lab-to-nwb) could not be produced by the unified interface. It now can: aplane_indexselector built on roiextractors'select_planewrites each plane as its own 2D series, with the plane's focal depth read from the activezDevicein the Bruker XML rather than the aggregate z-swing. A test asserts the per-plane data andorigin_coordsdepth match the deprecated converter's output. The same correction fixes the contiguous case, whoseorigin_coordsz had been the z-swing (a spacing) instead of a plane position; the swing now goes togrid_spacing/field_of_viewwhere it belongs. To avoid waiting on a roiextractors release for per-plane metadata, the interface keeps a reference to the full extractor for the XML reads (marked to collapse once roiextractors#578 lands a public per-plane metadata API).