-
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
Fix channel as second dim problem #52
base: master
Are you sure you want to change the base?
Conversation
Hi @acorbat, Thanks for fix! Do you think would it be more precise to do this?
As you say the BytesInc is accumulating, but the number does not include the byte increase of that channel itself. Please let me not your thoughts! Sincerely yours, |
Hi, I'm wondering about the right way... I don't have an image to test this right now. I am wondering if cytes_inc_z is also the first byte. Can these be the same in any case? Are they the same when channel is NOT the second dimension? I'm sorry I can't check this right now. On the other hand, I was wondering if you can get the step size in bytes from channel_bytes_inc_list[0] or channel_bytes_inc_list[1] as the first element might be the step size as well and you already have it. Best, |
Hi Agustin, Sorry for the late response. Just want to share my thoughts regarding the this issue.
I am not quite sure what you mean here, but I really would like to learn about this more from you if possible.
Not quite sure where the evidence comes from, but It seems he is confident the stack order is either "CZTM" or "ZCTM" with
I totally agree with your approach on this with the premise that all the channels have the same byte jump with the same size and byte depth. Best, |
Hi Alan, Regarding channel order, I understood the same thing you did. Apparently Leica used either "MTCZYX" or "MTZCYX" as dimension order (going from slowest to fastest dimension). Previously I run into this problem that C and Z dimensions were swapped so I could not read them correctly. I am not sure if dimension order is inside the metadata, but the "hack-y" solution was to look for the start byte position in the metadata and find which one is highest, we can see whether C or Z is the second dimension. For the last point, I agree with you that the safe choice is to calculate the Byte step as you suggest. I was proposing a lazy way as it should always be the same size. Cheers, |
Hi Alan, was this PR ok? Should we revisit it? Cheers, |
Hi Agus, It looks perfect to me! I think we just need to wait for Nick to grant the request now! Thanks! |
@acorbat thanks for working on this! I wanted to let you know that Nick has recently transferred ownership of this repo to Arcadia Science, since we have the bandwidth to maintain this package. We're working on going through the open PRs and issues and hope to get this PR reviewed and merged in the next week or so! Thanks again, and let me know if you have any questions. |
Following on Issue #44, I believe that the problem is that the hacky way of guessing whether Channels is the second dimension or not is summing over all the bytes of every channel, instead of looking only for the maximum. BytesInc is already accumulating the Bytes of each channel, and we should only compare the maximum with the one from the channels.
I do not have lots of images to test if this modification breaks the behaviour with other images, but it does fix the problem with my images.