# HG changeset patch # User Sebastien Jodogne # Date 1787324575 -7200 # Node ID c30f18b878766bd1954cc27ec16a309e001dcdee # Parent 8e1efa41031230ba1143f7afc96bb14d7002e374 display information about the source background color diff -r 8e1efa410312 -r c30f18b87876 Applications/Dicomizer.cpp --- a/Applications/Dicomizer.cpp Wed Aug 19 19:08:23 2026 +0200 +++ b/Applications/Dicomizer.cpp Fri Aug 21 17:02:55 2026 +0200 @@ -219,6 +219,7 @@ LOG(WARNING) << "Pixel format: " << Orthanc::EnumerationToString(source.GetPixelFormat()); LOG(WARNING) << "Source photometric interpretation: " << Orthanc::EnumerationToString(source.GetPhotometricInterpretation()); LOG(WARNING) << "Source compression: " << EnumerationToString(sourceCompression); + LOG(WARNING) << "Source background color: " << source.GetBackgroundColor().Format(); LOG(WARNING) << "Smoothing is " << (parameters.IsSmoothEnabled() ? "enabled" : "disabled"); if (parameters.IsRepaintBackground()) diff -r 8e1efa410312 -r c30f18b87876 Framework/BackgroundColor.cpp --- a/Framework/BackgroundColor.cpp Wed Aug 19 19:08:23 2026 +0200 +++ b/Framework/BackgroundColor.cpp Fri Aug 21 17:02:55 2026 +0200 @@ -27,6 +27,8 @@ #include +#include + namespace OrthancWSI { @@ -89,6 +91,21 @@ } + std::string BackgroundColor::Format() const + { + if (present_) + { + return ("(" + boost::lexical_cast(static_cast(red_)) + "," + + boost::lexical_cast(static_cast(green_)) + "," + + boost::lexical_cast(static_cast(blue_)) + ")"); + } + else + { + return "None"; + } + } + + void BackgroundColor::Fill(Orthanc::ImageAccessor& region, uint8_t defaultRed, uint8_t defaultGreen, diff -r 8e1efa410312 -r c30f18b87876 Framework/BackgroundColor.h --- a/Framework/BackgroundColor.h Wed Aug 19 19:08:23 2026 +0200 +++ b/Framework/BackgroundColor.h Fri Aug 21 17:02:55 2026 +0200 @@ -24,6 +24,8 @@ #pragma once #include +#include + namespace Orthanc { @@ -70,6 +72,8 @@ uint8_t GetBlue() const; + std::string Format() const; + void Fill(Orthanc::ImageAccessor& region, uint8_t defaultRed, uint8_t defaultGreen,