-
Notifications
You must be signed in to change notification settings - Fork 14
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
aicsimageio on Apple Silicon Macs #2
Comments
Thanks! I tried it yesterday or the day before... but admittedly on a tight deadline, since I really wanted the book out before next week's QuPath webinar & hackathon.... It failed with
I have the feeling all the Python stuff needs a big revision when I get around to it, and maybe embrace aicsimagio from the beginning - it looks a fantastic project. Sorry the first version doesn't properly reflect that! |
No worries at all! It turns out that simply reading images turns out to be a large issue (even just installing!) so I understand 😂 Seems like it's an error with imagecodecs and not aicsimageio (yay?) but still, from my recollection we just needed to install an older version of imagecodecs ahead of time? So maybe for M1 macs I should add documentation to the aicsimageio README that specifies to do: pip install imagecodecs==2021.4.28
pip install aicsimageio From my search on imagecodecs install issues: |
Also, please dont feel pressure to try that now -- prep for the webinar and hackathon haha. We can come back to this whenever you have the time |
Ah, that sounds familiar - I think
At that point I bailed out, for fear of making such a mess of I'll give it a proper go in a couple of weeks though. Thanks again! |
yeah |
Introduce AICSImageIO and compare its use with imageio.v3. Inspired by bioimagebook#2
Thanks @evamaxfield and @psobolewskiPhD - I finally got around to making the switch to I've updated the notebook on pixel sizes as dimensions (and a few other bits) to include it now. Since I was discovering AICSImageIO while writing about it, I may well have made mistakes or missed some crucial stuff - please let me know if you would like to change anything :) I'll close the issue, but feel free to add comments or reopen if there's more to do. Thanks again! |
@petebankhead
I personally find that getting the
So now we know explicitly that the (Also can segue to use Or maybe this is all just too esoteric... |
Ah, I like it! Didn't know about this - I really need to do more pythoning and explore |
!!!! @petebankhead ❤️ this is so awesome to see! Ya there are a lot of neat little things we have tried to build into AICSImageIO that are weird at first try (unfortunately 😅 hopefully we can make them better / more well documented as we go). One of my biggest reasons for writing it the way we did was in the As a research engineer I was always somewhat frustrated when scientists would hand me there code or ask me to help and to see: img = "some numpy array with five dimensions"
# get the brightfield channel out
channel_0 = img[:, 0, :, :, :] I just think that "assuming the right index to use" isn't as clean or as documentable as "using the channel information from metadata" (which could be wrong but is generally pretty good) So I have always tried to get people to use the img = AICSImage()
# give me back a 3D array for JUST the brightfield channel
brightfield = img.get_image_data("ZYX", C=img.channel_names.index("brightfield")) It's more verbose but that is sort of the point. It is verbose and legible AND potentially generalizes better because "regardless of what index the brightfield channel is, we can find it" ANYWAY. Love to see this made it in and can't tell you how excited I am. Thanks!! |
Also general note on the reason that "the channels dimension is separate from the samples dimension" its because there are some image file formats that allow multi-channel RGB images. where each channel has unique RGB data. File formats are truly the wild west. |
This is excellent info, thanks! I mostly do Java stuff, but I have a Python side project that I finally got to work on for a bit today - and after spending some hours playing around with AICSImageIO I'm converted :) I'll reopen this to remind myself to update the page with some more of this info. Two small things I was missing (but might be too obscure to care about):
|
We used to allow in-memory byte strings / arrays in v3 iirc, but we moved off of it mainly because it was becoming very hard to maintain properly, annndd we really wanted to support were delayed/ chunked file reading and remote reading (from S3, Azure, etc.)
not yet, its a long standing request but we just havent gotten around to it. I think there is going to be experimental support for it in the |
Hey @petebankhead! 👋
Really enjoyed reading basically all of the Python sections of the book this morning! I honestly might pass this along to others that are interested in general image handling and not just microscopy image handling. It's a great Python intro to images in general!
On the file formats and dimensions and metadata section, I think you were having issues with installing aicsimageio on Apple Silicon; I am wondering when the last time you tried installing was because a couple of recent patches should have ironed out a lot of the issues with installing.
pip install --upgrade --force-reinstall --no-cache-dir aicsimageio
should be a good check?If there are still issues please let me know. Would love to get it working for you!
Thanks again
The text was updated successfully, but these errors were encountered: