Skip to content

Commit

Permalink
Write correct z interval metadata for deskew (#9)
Browse files Browse the repository at this point in the history
* set z interval metadata for deskew
  • Loading branch information
RobertSchwede authored Sep 4, 2024
1 parent bcd4fa1 commit a84d172
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules" ${CMAKE_MODULE_PATH})

project ("warpaffine"
VERSION 0.5.1
VERSION 0.5.2
DESCRIPTION "experimental Deskew operation")

option(WARPAFFINE_BUILD_CLANGTIDY "Build with Clang-Tidy" OFF)
Expand Down
3 changes: 2 additions & 1 deletion documentation/version-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ version history {#version_history}
0.3.2 | [5](https://github.com/ZEISS/warpaffine/pull/5) | bugfix for a deadlock in rare case
0.4.0 | [6](https://github.com/ZEISS/warpaffine/pull/6) | set re-tiling id of sub-blocks to allow for more sensible stitching of resulting CZI
0.5.0 | [7](https://github.com/ZEISS/warpaffine/pull/7) | copy attachments from source document
0.5.1 | [8](https://github.com/ZEISS/warpaffine/pull/8) | fix z interval metadata
0.5.1 | [8](https://github.com/ZEISS/warpaffine/pull/8) | fix z interval metadata for coverglass transformation
0.5.2 | [8](https://github.com/ZEISS/warpaffine/pull/9) | fix z interval metadata for deskew
10 changes: 10 additions & 0 deletions libwarpaffine/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,16 @@ int libmain(int argc, char** _argv)
switch (const auto type_of_operation = app_context.GetCommandLineOptions().GetTypeOfOperation())
{
case OperationType::Deskew:
{
ScalingInfo scaling_info;
scaling_info.scaleX = scaling_info.scaleY = document_info.xy_scaling;
scaling_info.scaleZ = 0.5 * document_info.z_scaling;
writer->Close(
get<0>(reader_and_stream)->ReadMetadataSegment()->CreateMetaFromMetadataSegment(),
&scaling_info,
[type_of_operation](libCZI::IXmlNodeRw* root_node)->void {TweakMetadata(root_node, type_of_operation); });
break;
}
case OperationType::CoverGlassTransform:
case OperationType::CoverGlassTransformAndXYRotated:
// for those operations the transformation is constructed so that the scaling is isotrophic, so
Expand Down

0 comments on commit a84d172

Please sign in to comment.