-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feature request: read parent/child relation for scene names #28
Comments
Thanks for the detailed report!
All of the metadata is indeed read (and returnable as a big Creating an explicit tree-like structure for these files may be a difficult problem, but would it be sufficient to build image 'names' based on the 'path'? For example, set the name to be something like
It should be possible to accomplish this because of some excellent work done by the aicsimageio project to import things in a consistent and easy to use format. A design limitation of this project is that it will only return a single 2D plane at a time - loading up batches of planes into an _n_d image happens using iterators or other wrappers. I'll take a look at the example images you've linked and try to figure out why they are not working correctly as a 'mosaic'. Fortunately I'll have some time soon to clean up a few open issues here! However, it may be a few weeks! |
This would be certainly fine, it would permit me to more easily import what I need—much like the ReadMyLIFs solution. |
OK, so I was brave and took a look at:
I guess the recursive nature of the function means it picks up the full path, rather than just the last bits...But, for the time being it's certainly progress! |
Ok, I don't know if it's pretty, but it does seem to work.
And then the old
|
Hello! I think that changing the Can you let me know if this has the expected behavior? |
Thanks for looking into this! |
You'll need to download the branch:
Then you'll need to install it. I would recommend building a virtual environment to test this if you can!
Alternatively, you can use the changes I've made on line 655 to test! |
Got it! At first I thought it didn't work, but I got it installed into my existing env (I'm brave?) and it works perfectly:
That's better than my hack above because it grabs the top level name |
Great! That's good news. I'll get this pushed up as a new version in pypi soon! |
This fix has been added to the 0.6.3 release that is now up on pypi! |
I emoji'd too early? EDIT: I checked, if I go back to 0.6.2, branch 'name', everything works. But if I use 0.6.3, the scenes with parent/child names don't show... |
Uhoh! I'll try and see what went wrong. |
I definitely broke reading files with folders in 0.6.3 - hopefully that is resolved in 0.6.4 (up now). Thanks for helping me test this out and keep the bugs to a minimum! I'll certainly need to find some small test files with multiple folders for the testing so it doesn't happen again. I'll leave this issue open for now. |
Resolved on my end! Thanks! |
This may be related to the existing issue
#19
I'm also using LAS X Navigator and multi-well tile scans.
These can be continuous—mosaic merges—or not.
Originally I posted this to
aicsimageio
because that's what I was using to get my image data into python, but now I understand it is a better fit here. Here's the original issue:AllenCellModeling/aicsimageio#277
So using Navigator it's easy to do multi-well experiments, but then when importing names don't get read in properly, which makes everything confusing.
Here's a link to a representative LIF:
https://www.dropbox.com/s/jk9se8i1kpzqvsn/20210428_24w_L929_Ho_B2C3.lif?dl=0
Just as an example, we can look at the last section:
B is row B, then B/n/ are wells in the B row. R1-R5 are actually mosaic merges, but that's not material to this issue. Same with C/
At the end is B/3/R1-R60 which ideally would be able to be imported together.
ReadMyLIFs by @mutterer does this perfectly:
It's easy to import all the regions together (this is like a mosaic, except scattered in a well).
I know that is using
bio-formats
but perhaps that's possible here, to pass on toaicsimageio
?At the moment
aicsimageio
ignores the structure of the project, so I get many R1, etc. and can't call the scenes by name as a result (now can use indexes, so it works, but less than ideal, but without the well context, everything is more tricky).Here's the xml for this LIF
big-lif.xml.zip
Here's the start of the last section of images:
<Attributes><Attribute>ExtendedMemoryBlock</Attribute><Attribute>_DCSERVER_PREVENT_MEMKILL</Attribute></Attributes><Memory Size="2764800" MemoryBlockID="MemBlock_1050" /><Children /></Element><Element Name="B3 60 10x" Visibility="1" CopyOption="1" UniqueID="a6f972e2-a82c-11eb-bc72-a4bb6dca3902"><Data><Collection ChildTypeTest="AcceptAll"><ChildTypeList /></Collection></Data> <Memory Size="0" MemoryBlockID="MemBlock_1319" /><Children><Element Name="B" Visibility="1" CopyOption="1" UniqueID="a6f972e3-a82c-11eb-bc72-a4bb6dca3902"><Data><Collection ChildTypeTest="AcceptAll"><ChildTypeList /></Collection></Data> <Memory Size="0" MemoryBlockID="MemBlock_1320" /><Children><Element Name="3" Visibility="1" CopyOption="1" UniqueID="a6f972e4-a82c-11eb-bc72-a4bb6dca3902"><Data><Collection ChildTypeTest="AcceptAll"><ChildTypeList /></Collection></Data> <Memory Size="0" MemoryBlockID="MemBlock_1321" /><Children><Element Name="R1" Visibility="1" CopyOption="1" UniqueID="a6f972e5-a82c-11eb-bc72-a4bb6dca3902"><Data><Image TextDescription=""><Attachment Name="TileScanInfo" Application="LAS AF" FlipX="0" FlipY="0" SwapXY="0"><Tile FieldX="0" FieldY="0" PosX="0.0534542067" PosY="0.0256040830" />
You can see
<Element Name="B3 60 10x" Visibility="1" CopyOption="1" UniqueID="a6f972e2-a82c-11eb-bc72-a4bb6dca3902">
And then Children:
I'd love to be able to see those parent names, so something like:
"B3 60 10x B3 R1"
In an ideal world, because R1 has the "TileScanInfo" bit, the scene would be "B3 60 10x B3" and then all the R1-60 would be part of that as M values—akin to a mosaic, even though they are not touching.
I think
readlif
is already reading that info?https://github.com/nimne/readlif/blob/581ce8be5a4717e56c44c91b2cec6ea31ee65978/readlif/reader.py#L534
But I'm 100% a python noob and can't quite figure out what's going on.
I'm willing to help, hack, or test, but need a bit of guidance.
Thanks for making a great package! 😍
The text was updated successfully, but these errors were encountered: