Skip to content
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

SimplePCI: fix Z position handling #4163

Merged
merged 2 commits into from Apr 4, 2024
Merged

Conversation

melissalinkert
Copy link
Member

Fixes #4133.

See the commit message for 2f778ba in particular. Without this change, showinf on one of the files in #4133 will succeed and one will fail. With this change, both files should be readable.

…excluded

Fixes ome#4133.

As noted there, .cxd files produced by newer versions of HCImage include
both a "Position_Z" and "Position_Z_Fine" value. This can result in the
"uniqueZ" list being larger than the number of detected planes. That
causes line 381 to set sizeT to 0, which means that the following "while"
loop runs until sizeZ and sizeT overflow to negative values.

This intentionally does not check that the name equals "Position_Z",
as some older files add a prefix to this name.
Sometimes the stream name will have a bunch of whitespace appended.
This doesn't affect the stream path that is used to actually retrieve
metadata values.
@melissalinkert melissalinkert added this to the 7.3.0 milestone Mar 12, 2024
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed change is sensible and fixes the initial of the sample file linked from the companion issue without introducing regressing on other SimplePCI samples.

Interestingly, I noticed that the reader does not set PlanePositionZ currently. This could be a follow-up RFE since this metadata is parsed anyways.

Copy link
Member

@dgault dgault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks sensible and fixes the issue reported in #4133

Repo tests also look good with the new config PR included

@dgault dgault merged commit 9aa0c7d into ome:develop Apr 4, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HCImage cxd: IllegalArgumentException: -20 must be neither null nor strictly negative
3 participants