-
Notifications
You must be signed in to change notification settings - Fork 8
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
OpenCell reader extension #197
Conversation
@ieivanov , thank you so much for implementing the reader. The iohub conversion works for both opencell data as well MM data now. I have tested it on data from DragonFly OpenCell imaging and MM HCS data. |
The Also this line breaks single page TIFF conversion because it has an empty name = self.reader.stage_positions[p].get("Label") or p |
|
||
# dimensions based on mm metadata | ||
# do not reflect final written dimensions | ||
# these set in _gather_index_maps | ||
# | ||
# self.frames = self.mm_meta["Summary"]["Frames"] | ||
# self.slices = self.mm_meta["Summary"]["Slices"] | ||
# self.channels = self.mm_meta["Summary"]["Channels"] |
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.
Thanks for catching this @ziw-liu. I commented out these lines so they don't overwrite the dimensions set by _gather_index_maps
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.
Code looks good! (I haven't tested the added functionality.)
It would be nice if this can be tested automatically somehow.
Thanks @ziw-liu. I opened a new issue for adding a test dataset |
The OpenCell acquisition starts with a large number of positions in the position list, but only some of those are actually imaged. When we save the data, we need to use a continuous position index starting at 0 because of a Micro-manager bug: micro-manager/micro-manager#1723, i.e. if we are imaging positions
(5, 6, 13, 12)
in the position list, they are saved with index(0, 1, 2, 3)
. In this case, we need to parse the correct position label from the tif filename.I've implemented this as a special version of Micro-manager metadata. If we change the MM version on the Dragonfly microscope (unlikely) or the "raw_data" prefix (also very unlikely) this code will not work an will need to be modified. I've also switched the order of
_gather_index_maps()
and_set_mm_meta()
to make this work. I didn't see unintended consequences here, but I think this may be making some of the tests fail. @ziw-liu can you help me take a look?cc: @Soorya19Pradeep