From 8543112ab03f90c45c06559ea14b09b724fc3454 Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 5 Feb 2024 09:10:02 -0500 Subject: [PATCH 1/2] fix nlohman_json init issue --- src/ome_tiff_to_chunked_pyramid.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ome_tiff_to_chunked_pyramid.cpp b/src/ome_tiff_to_chunked_pyramid.cpp index ed79c4c..cb44764 100644 --- a/src/ome_tiff_to_chunked_pyramid.cpp +++ b/src/ome_tiff_to_chunked_pyramid.cpp @@ -124,7 +124,8 @@ void OmeTiffToChunkedPyramid::WriteTSZattrFile(const std::string& tiff_file_name combined_metadata["name"] = tiff_file_name; combined_metadata["metadata"] = {{"method", "mean"}}; json final_formated_metadata; -#ifdef _WIN32 ++#if defined(__clang__) || defined(_MSC_VER) ++// more details here: https://github.com/nlohmann/json/issues/2311 final_formated_metadata["multiscales"][0] = {combined_metadata}; #else final_formated_metadata["multiscales"] = {combined_metadata}; @@ -152,7 +153,8 @@ void OmeTiffToChunkedPyramid::WriteVivZattrFile(const std::string& tiff_file_nam combined_metadata["name"] = tiff_file_name; combined_metadata["metadata"] = {{"method", "mean"}}; json final_formated_metadata; -#ifdef _WIN32 ++#if defined(__clang__) || defined(_MSC_VER) ++// more details here: https://github.com/nlohmann/json/issues/2311 final_formated_metadata["multiscales"][0] = {combined_metadata}; #else final_formated_metadata["multiscales"] = {combined_metadata}; From 1bba512e399f5131189134b2efe57b329cafd40e Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 5 Feb 2024 09:14:19 -0500 Subject: [PATCH 2/2] fix nlohman_json init issue --- src/ome_tiff_to_chunked_pyramid.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ome_tiff_to_chunked_pyramid.cpp b/src/ome_tiff_to_chunked_pyramid.cpp index cb44764..d16fd84 100644 --- a/src/ome_tiff_to_chunked_pyramid.cpp +++ b/src/ome_tiff_to_chunked_pyramid.cpp @@ -124,8 +124,8 @@ void OmeTiffToChunkedPyramid::WriteTSZattrFile(const std::string& tiff_file_name combined_metadata["name"] = tiff_file_name; combined_metadata["metadata"] = {{"method", "mean"}}; json final_formated_metadata; -+#if defined(__clang__) || defined(_MSC_VER) -+// more details here: https://github.com/nlohmann/json/issues/2311 +#if defined(__clang__) || defined(_MSC_VER) +// more details here: https://github.com/nlohmann/json/issues/2311 final_formated_metadata["multiscales"][0] = {combined_metadata}; #else final_formated_metadata["multiscales"] = {combined_metadata}; @@ -153,8 +153,8 @@ void OmeTiffToChunkedPyramid::WriteVivZattrFile(const std::string& tiff_file_nam combined_metadata["name"] = tiff_file_name; combined_metadata["metadata"] = {{"method", "mean"}}; json final_formated_metadata; -+#if defined(__clang__) || defined(_MSC_VER) -+// more details here: https://github.com/nlohmann/json/issues/2311 +#if defined(__clang__) || defined(_MSC_VER) +// more details here: https://github.com/nlohmann/json/issues/2311 final_formated_metadata["multiscales"][0] = {combined_metadata}; #else final_formated_metadata["multiscales"] = {combined_metadata};