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

non-x-y-subblocks #63

Merged
merged 10 commits into from
Sep 1, 2023
Merged

non-x-y-subblocks #63

merged 10 commits into from
Sep 1, 2023

Conversation

ptahmose
Copy link
Contributor

@ptahmose ptahmose commented Aug 31, 2023

Description

Parsing of the "dimension entries" was rather lax in libCZI up to now. The possibility of a Size for any other dimension that X and Y was not even considered. Fact is that libCZI will fail to work properly if such subblocks are present, this is conceptually not being taken into consideration, and it is probably undisputed to state that "non-x-y-subblocks" are highly controversial.
The idea implemented here is:

  • When parsing the subblock-directory (from within ICZIReader::Open), there is now an option to "do more strict parsing" and to fail with an exception if something is determined as "unexpected".
  • For backward-compatibility reasons this strict parsing is currently an opt-in option.

In summary - this makes libCZI's parsing more strict (as an opt-in functionality).

Note that no attempt is made to make this "feature" of non-x-y-subblocks available or even accessible at this point.

I am sorry, some formatting changes crept into it as well - but those are changes for the better (VS-auto-formatting has substantially improved in the meantime).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

locally and added new unittests

Checklist:

  • I followed the Contributing Guidelines.
  • I did a self-review.
  • I commented my code, particularly in hard-to-understand areas.
  • I updated the documentation.
  • I updated the version of libCZI following Versioning of libCZI depending on the type of change
    • Bug fix -> PATCH
    • New feature -> MINOR
    • Breaking change -> MAJOR
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@ptahmose ptahmose changed the title Jbl/non x y subblocks non-x-y-subblocks Aug 31, 2023
@ptahmose ptahmose marked this pull request as ready for review August 31, 2023 13:19
@ptahmose ptahmose added the cla Contributor License Agreement sent to Admin label Aug 31, 2023
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #63 (a329ab8) into main (621c519) will increase coverage by 0.04%.
The diff coverage is 70.88%.

@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   50.08%   50.13%   +0.04%     
==========================================
  Files          77       77              
  Lines       16014    16044      +30     
==========================================
+ Hits         8020     8043      +23     
- Misses       7994     8001       +7     
Flag Coverage Δ
windows-latest 50.13% <70.88%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
Src/libCZI/CziReaderWriter.cpp 79.88% <ø> (ø)
Src/libCZI/libCZI.h 100.00% <ø> (ø)
Src/libCZI/libCZI_exceptions.h 78.94% <ø> (ø)
Src/libCZI/CZIReader.cpp 65.97% <50.00%> (+0.53%) ⬆️
Src/libCZI/CziParse.cpp 70.64% <85.10%> (+0.23%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Src/libCZI/CZIReader.cpp Show resolved Hide resolved
Src/libCZI/CziParse.cpp Show resolved Hide resolved
@ptahmose ptahmose merged commit 1d26fe8 into ZEISS:main Sep 1, 2023
15 checks passed
@ptahmose ptahmose mentioned this pull request Sep 4, 2023
11 tasks
@ptahmose ptahmose deleted the jbl/non-x-y-subblocks branch November 6, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla Contributor License Agreement sent to Admin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants