mehta-lab / waveorder

Wave optical models and inverse algorithms for label-agnostic imaging of density & orientation.
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

UPTI File Reader #43

Closed camFoltz closed 2 years ago

camFoltz commented 3 years ago

This creates a reader subclass that allows for reading of UPTI files.

Creates a lazy zarr store in memory with the UPTI channels (patterns, states)

Works with both live upti and original upti which has states present or not present.

I have it hardcoded right now that the channels will always go pattern then state. i.e. an acquisition with 9 patterns and 4 states would have the following channel order and channel names:

channel_names = ['pattern_000_state_000',
                 'pattern_000_state_001',
                 'pattern_000_state_002',
                 'pattern_000_state_003',
                 'pattern_001_state_000',
                 ...]

the placement of the channel in the array corresponds to the order of the list.

This reader will be used for the zarr converter and UPTI can now be converted to a zarr store on disk

camFoltz commented 2 years ago

@lihaoyeh when you have some time next week think you can give this a quick look over?

camFoltz commented 2 years ago

The SONY polarization camera takes all four polarization channels at the same time. We can potentially have the channel assignment happened within the reader somehow.

We can add a flag / method to automatically split the pixels into the 4 polarization states. That is a nice feature to add!

Since each uPTI dataset takes up much memory space, it would be great to have an option to only load a partial FOV of data for processing.

I also agree with this. I implemented a similar feature for the multi-page tiff. I will make this update!

camFoltz commented 2 years ago

Will merge for now and consider updates for the next PR