Skip to content

Comments

update libCZI-version to 0.67.0, enable mask-support#15

Merged
ptahmose merged 7 commits intoZEISS:mainfrom
ptahmose:jbl/add_mask_support
Sep 23, 2025
Merged

update libCZI-version to 0.67.0, enable mask-support#15
ptahmose merged 7 commits intoZEISS:mainfrom
ptahmose:jbl/add_mask_support

Conversation

@ptahmose
Copy link
Collaborator

@ptahmose ptahmose commented Sep 21, 2025

Description

This updates libCZI to latest version (0.67.0), which adds support for "mask-aware tile-composition"

  • update the libCZI-submodule
  • add ability to use "mask-aware tile-composition" via AdditionalOptionsPropertyBag in ISingleChannelTileAccessor.
  • unit-test of for mask-aware tile-composition operation
  • (unrelated) reduced StyleCop-warnings in C#-build (by qualifying and reordering using directives in the affected source files)

Fixes # (issue)

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?

with the unit-test

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_NET following Versioning of LibCZI_NET 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.

Enhanced `AccessorOptions` to support mask-aware composition by
introducing the `MaskAwareness` key in the new static class
`AccessorOptionsAdditionalOptionsKeys`. Refactored the
`SingleChannelTileAccessorGet` method to handle additional options
via JSON serialization using `System.Text.Json`. Added the utility
method `AccessorAdditionalOptionsJsonFromPropertyBag` to serialize
the `AdditionalOptionsPropertyBag` into a UTF-8 JSON byte array.

Updated the build system (`build_libCZIAPI.yml`) to include the
`-DADDITIONAL_LIBS_REQUIRED_FOR_ATOMIC` CMake variable for atomic
operation support. Made minor formatting adjustments for consistency.
@ptahmose ptahmose added the cla Contributor License Agreement sent to Admin label Sep 21, 2025
Updated the `build_libCZIAPI.yml` file to explicitly define
the `-DADDITIONAL_LIBS_REQUIRED_FOR_ATOMIC` variable as an
empty value during the `cmake` build process. This change
ensures the variable is defined to prevent potential build
issues or warnings related to undefined variables.
Updated `using` directives across multiple files to use fully qualified namespaces for `Zeiss.Micro.LibCzi.Net.Interface` and `Zeiss.Micro.LibCzi.Net.Interop`.

- Replaced shorthand `using Interface;` and `using Interop;` with fully qualified counterparts in `Attachment.cs`, `Bitmap.cs`, `CziDocumentInfo.cs`, `DisplaySettings.cs`, and `InputStream.cs`.
- Updated `StreamClassesRepository.cs` to use `Zeiss.Micro.LibCzi.Net.Interop`.
- Updated `Factory.cs` to use `Zeiss.Micro.LibCzi.Net.Implementation` and `Zeiss.Micro.LibCzi.Net.Interop`.

These changes improve code clarity, reduce ambiguity, and align with best practices for namespace usage.
Updated `using` directives across multiple files to use fully
qualified namespaces (`Zeiss.Micro.LibCzi.Net.Interface` and
`Zeiss.Micro.LibCzi.Net.Interop`) for improved clarity and to
avoid potential namespace conflicts. Removed implicit imports
(`Interface` and `Interop`) from the `Implementation` namespace.

Changed `SafeBufferOnNativeMemory` class to `sealed` to prevent
inheritance. Removed unused `using` directives in several files
(e.g., `System.Text` in `SubBlock.cs` and `VersionInfo.cs`) to
improve code hygiene. Eliminated all `using` directives in
`VersionInfo.cs` as they were no longer needed.

Added explicit `using Zeiss.Micro.LibCzi.Net.Implementation;`
in `LibCziApiInterop.cs` to include the `Implementation`
namespace explicitly.
Two new test methods were added to `AccessorTests.cs`:
- `SingleChannelScalingTileAccessorWithMaskGray8Scenario1MaskAware` tests behavior with mask awareness enabled.
- `SingleChannelScalingTileAccessorWithMaskGray8Scenario1MaskUnaware` tests behavior with mask awareness disabled.

Both tests validate the output of a 6x6 bitmap under different mask-awareness settings, ensuring correct handling of overlapping sub-blocks. Proper locking and unlocking of the bitmap are verified.

The `version.txt` file was updated from `0.0.23` to `0.1.0` to reflect the addition of new functionality.
@ptahmose ptahmose marked this pull request as ready for review September 22, 2025 22:12
Copy link
Collaborator

@DaveyJonesBitPail DaveyJonesBitPail left a comment

Choose a reason for hiding this comment

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

Approved w/ suggestion

Copy link
Collaborator

@m-aXimilian m-aXimilian left a comment

Choose a reason for hiding this comment

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

LGTM

@ptahmose ptahmose merged commit dbb97e6 into ZEISS:main Sep 23, 2025
12 checks passed
@ptahmose ptahmose deleted the jbl/add_mask_support branch February 15, 2026 14:02
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.

3 participants