From c31b13ab87d1f6af74df583a393b72db1bb73d3d Mon Sep 17 00:00:00 2001 From: "Schwede, Robert" Date: Thu, 27 Jun 2024 12:51:44 +0200 Subject: [PATCH] missing files from previous commit --- documentation/version-history.md | 3 +- .../sliceswriter/SlicesWriterTbb.cpp | 30 +++++++++++-------- libwarpaffine/sliceswriter/SlicesWriterTbb.h | 2 +- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/documentation/version-history.md b/documentation/version-history.md index 60bda1a..3e4adbc 100644 --- a/documentation/version-history.md +++ b/documentation/version-history.md @@ -4,4 +4,5 @@ version history {#version_history} version | PR | comment ------------------ | ---------------------------------------------------- | --------------------------------------------------- 0.3.0 | N/A | initial release - 0.3.1 | [3](https://github.com/ZEISS/warpaffine/pull/3) | bugfix for a crash for "CZIs containing a single brick but have an S-index" \ No newline at end of file + 0.3.1 | [3](https://github.com/ZEISS/warpaffine/pull/3) | bugfix for a crash for "CZIs containing a single brick but have an S-index" + 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 \ No newline at end of file diff --git a/libwarpaffine/sliceswriter/SlicesWriterTbb.cpp b/libwarpaffine/sliceswriter/SlicesWriterTbb.cpp index 1d1b24d..b740fc5 100644 --- a/libwarpaffine/sliceswriter/SlicesWriterTbb.cpp +++ b/libwarpaffine/sliceswriter/SlicesWriterTbb.cpp @@ -106,9 +106,13 @@ void CziSlicesWriterTbb::WriteWorker() const string metadata_xml = oss.str(); add_subblock_info.ptrSbBlkMetadata = metadata_xml.c_str(); add_subblock_info.sbBlkMetadataSize = metadata_xml.size(); - } - this->writer_->SyncAddSubBlock(add_subblock_info); + this->writer_->SyncAddSubBlock(add_subblock_info); + } + else + { + this->writer_->SyncAddSubBlock(add_subblock_info); + } --this->number_of_slicewrite_operations_in_flight_; } @@ -139,18 +143,18 @@ void CziSlicesWriterTbb::WriteWorker() } } -libCZI::GUID CziSlicesWriterTbb::CreateRetilingIdWithZandSlice(int z, int slice) -{ +libCZI::GUID CziSlicesWriterTbb::CreateRetilingIdWithZandSlice(int z, int slice) +const { libCZI::GUID guid = this-> retilingBaseId_; - guid.Data4[0] = static_cast(z >> 24); - guid.Data4[1] = static_cast(z >> 16); - guid.Data4[2] = static_cast(z >> 8); - guid.Data4[3] = static_cast(z); - - guid.Data4[4] = static_cast(slice >> 24); - guid.Data4[5] = static_cast(slice >> 16); - guid.Data4[6] = static_cast(slice >> 8); - guid.Data4[7] = static_cast(slice); + guid.Data4[0] = static_cast(z >> 24); + guid.Data4[1] = static_cast(z >> 16); + guid.Data4[2] = static_cast(z >> 8); + guid.Data4[3] = static_cast(z); + + guid.Data4[4] = static_cast(slice >> 24); + guid.Data4[5] = static_cast(slice >> 16); + guid.Data4[6] = static_cast(slice >> 8); + guid.Data4[7] = static_cast(slice); return guid; } diff --git a/libwarpaffine/sliceswriter/SlicesWriterTbb.h b/libwarpaffine/sliceswriter/SlicesWriterTbb.h index 58c8828..70b2a33 100644 --- a/libwarpaffine/sliceswriter/SlicesWriterTbb.h +++ b/libwarpaffine/sliceswriter/SlicesWriterTbb.h @@ -49,5 +49,5 @@ class CziSlicesWriterTbb : public ICziSlicesWriter private: void WriteWorker(); void CopyMetadata(libCZI::IXmlNodeRead* rootSource, libCZI::IXmlNodeRw* rootDestination); - libCZI::GUID CreateRetilingIdWithZandSlice(int z, int slice); + libCZI::GUID CreateRetilingIdWithZandSlice(int z, int slice) const; };