-
Notifications
You must be signed in to change notification settings - Fork 16
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
introduce "frame-of-reference" #123
introduce "frame-of-reference" #123
Conversation
Added a new documentation file `coordinate_systems.markdown` to the Doxyfile's INPUT section. Introduced a "Coordinate Systems" section in the new file with a header and placeholder description for CZI and libCZI coordinate systems. Also, added a new diagram in `coordinate_systems.drawio` named "Page-1" that includes graphical elements representing a coordinate system with labeled axes.
Rephrased a sentence in `coordinate_systems.markdown` for clarity. Updated comments in `libCZI.h` to clarify bounding boxes and coordinate systems. Enhanced `libCZI_Compositor.h` comments to specify ROI and positions in the 'raw-subblock-coordinate-system'. Removed summary tags and redundant information to streamline documentation. These changes provide clearer and more precise descriptions of coordinate systems and bounding boxes in libCZI.
Updated CMakeLists.txt to change project version from 0.62.6 to 0.62.7. Added a new entry in version-history.markdown for version 0.62.7, documenting a "documentation update" linked to pull request ZEISS#122.
Updated SubBlockStatistics and libCZI_Compositor.h for consistent documentation. Modified CSingleChannelTileAccessor::Get to use IntRectAndFrameOfReference. Added ConvertToFrameOfReference method in Utils. Improved comments and formatting in libCZI_Utilities.cpp. Updated SingleChannelTileAccessorHandler to use interface pointer.
Added TransformPoint to CCZIReader for point transformations. Updated CZIReader.h to declare TransformPoint method. Modified CSingleChannelTileAccessor::Get to use TransformRectangle. Added TransformRectangle to ISubBlockRepository in libCZI.h. Introduced IntPoint and IntPointAndFrameOfReference structures. Removed ConvertToFrameOfReference function from libCZI_Utilities. Minor formatting changes in libCZI.h and libCZI_Utilities.h. Improved code design, readability, and maintainability.
Updated TransformPoint method to return libCZI::IntPointAndFrameOfReference instead of libCZI::IntPoint. This change is reflected across various classes and interfaces, including CCZIReader, CziReaderWriter, and libCZI::ISubBlockRepository. Added a new member variable default_frame_of_reference to CCZIReader and libCZI::Options to handle cases where the frame of reference is set to Default. Updated TransformRectangle method to handle the new return type of TransformPoint. Implemented changes in test_TileAccessorCoverageOptimization.cpp to reflect the new return type.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #123 +/- ##
==========================================
+ Coverage 65.49% 65.87% +0.38%
==========================================
Files 86 86
Lines 10906 10990 +84
==========================================
+ Hits 7143 7240 +97
+ Misses 3763 3750 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
- Initialize `default_frame_of_reference` to `CZIFrameOfReference::Invalid` in `CCZIReader` constructor. - Update `CCZIReader::Open` to use a switch statement for `options->default_frame_of_reference`. - Modify `ISubBlockRepository::TransformRectangle` to return `IntRectAndFrameOfReference`. - Update `CSingleChannelTileAccessor::Get` to use the `rectangle` member of `IntRectAndFrameOfReference`. - Add `test_frame_of_reference_transform.cpp` with tests for point and rectangle transformations. - Include new test file in `libCZI_UnitTests` target in `CMakeLists.txt`.
Refactored `CCZIReader::TransformPoint` for robust frame-of-reference transformations. Updated `AccessorType` enum in `libCZI_Compositor.h` to use `std::uint8_t`. Corrected typo in `backGroundColor` comment. Added `Check2x2Gray8Bitmap` function and new tests in `test_frame_of_reference_transform.cpp` for point transformations and tile composite verification.
Implemented TransformPoint in CCziReaderWriter for frame-of-reference transformations. Added GetDefaultFrameOfReference method and updated ICziReaderWriterInfo interface. Fixed formatting issues and improved type safety. Added test case for TransformPoint. Updated documentation and constructor initialization. Handled unsupported transformations with exceptions.
Updated the comment to reflect the correct bounding-box (0, -1, 1, 1) and transformation result (0, -1) after removing subblocks. Adjusted the test assertion for the y-coordinate of the transformed point to expect -1 instead of 0.
Modified the constructor in SingleChannelTileAccessor.cpp to make roi_raw_sub_block_cs a const IntRect, ensuring immutability. Removed a commented-out Get method declaration in SingleChannelTileAccessor.h for improved readability.
Updated method signatures in SingleChannelTileAccessor.cpp and .h to use IntPointAndFrameOfReference instead of separate xPos and yPos parameters. Adjusted libCZI_Compositor.h to reflect these changes and added inline methods for backward compatibility. Updated ISingleChannelTileAccessor destructor to use override keyword for modern C++ standards adherence.
Added a space after the period in the comment describing the Z-order behavior when `sortByM` is false. This change enhances readability and consistency of the comments in the codebase.
- Updated `Get` methods in `CSingleChannelScalingTileAccessor` and `libCZI::ISingleChannelScalingTileAccessor` to use `IntRectAndFrameOfReference` instead of `IntRect`. - Added overloads to handle `IntRect` by converting to `IntRectAndFrameOfReference`. - Modified `InternalCalcSize` to use the transformed rectangle in the raw sub-block coordinate system. - Corrected typo in `Options` struct documentation ("back ground color" to "background color"). - Updated `SingleChannelScalingTileAccessorHandler` in `test_TileAccessorCoverageOptimization.cpp` to use a shared pointer to `ISingleChannelScalingTileAccessor`. - Added documentation to `libCZI::ISingleChannelScalingTileAccessor` interface for new `Get` methods and their parameters.
Updated SingleChannelPyramidLevelTileAccessor to use IntRectAndFrameOfReference and IntPointAndFrameOfReference for coordinates, ensuring explicit frame of reference handling. Transformed input coordinates to RawSubBlockCoordinateSystem in Get methods for consistency. Updated InternalGet method accordingly. Modified libCZI_Compositor.h to reflect new method signatures and retained old methods with internal transformations. Improved clarity and correctness of coordinate handling.
Updated ROI calculation to use boundingBoxLayer0Only instead of boundingBox for relative coordinates in execute.cpp and executeBase.cpp. Applied consistent changes across multiple sections. Added spaces after commas in ROI initialization for better readability.
Updated CMakeLists.txt to change project version from 0.62.7 to 0.63.0. Added a new entry in version-history.markdown for version 0.63.0, documenting the introduction of "frames-of-reference". The entry for version 0.62.7 remains unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All my "findings" are nitpicky. Feel free to ignore them.
Looks good to me!
Co-authored-by: m-aXimilian <[email protected]>
Co-authored-by: m-aXimilian <[email protected]>
Simplified the return statements in two conditional blocks by removing the explicit type `libCZI::IntPointAndFrameOfReference` and using the brace-enclosed initializer list directly. This change makes the code more concise and leverages the compiler's ability to deduce the return type.
Description
Introduce concept of "different frames-of-reference" to ISubBlockRepository and accessors. The idea is that the coordinates used with the accessors can be given in different coordinate systems. In addition, the concept of a "default coordinate system" (see with the reader-/readerwriter-object) is introduced.
Type of change
How Has This Been Tested?
Checklist: