Mercurial > hg > orthanc-stone
diff Samples/Common/RtViewerView.cpp @ 1471:28c64c246312
working on a shared library
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Jun 2020 12:57:54 +0200 |
parents | 828a9b4ee1b7 |
children | 1e381f2596d3 |
line wrap: on
line diff
--- a/Samples/Common/RtViewerView.cpp Fri Jun 12 17:38:07 2020 +0200 +++ b/Samples/Common/RtViewerView.cpp Mon Jun 15 12:57:54 2020 +0200 @@ -24,6 +24,8 @@ #include "RtViewerApp.h" #include "SampleHelpers.h" +#include <EmbeddedResources.h> + // Stone of Orthanc #include "../../Framework/Oracle/GetOrthancWebViewerJpegCommand.h" #include "../../Framework/Scene2D/CairoCompositor.h" @@ -254,11 +256,10 @@ // scaling. controller.FitContent(compositor.GetCanvasWidth(), compositor.GetCanvasHeight()); - - compositor.SetFont(0, Orthanc::EmbeddedResources::UBUNTU_FONT, - FONT_SIZE_0, Orthanc::Encoding_Latin1); - compositor.SetFont(1, Orthanc::EmbeddedResources::UBUNTU_FONT, - FONT_SIZE_1, Orthanc::Encoding_Latin1); + std::string ttf; + Orthanc::EmbeddedResources::GetFileResource(ttf, Orthanc::EmbeddedResources::UBUNTU_FONT); + compositor.SetFont(0, ttf, FONT_SIZE_0, Orthanc::Encoding_Latin1); + compositor.SetFont(1, ttf, FONT_SIZE_1, Orthanc::Encoding_Latin1); } void RtViewerView::SetInfoDisplayMessage( @@ -293,8 +294,11 @@ this->SetCtVolumeSlicer(ctLoader, style.release()); { + std::string lut; + Orthanc::EmbeddedResources::GetFileResource(lut, Orthanc::EmbeddedResources::COLORMAP_HOT); + std::unique_ptr<LookupTableStyleConfigurator> config(new LookupTableStyleConfigurator); - config->SetLookupTable(Orthanc::EmbeddedResources::COLORMAP_HOT); + config->SetLookupTable(lut); boost::shared_ptr<DicomVolumeImageMPRSlicer> tmp(new DicomVolumeImageMPRSlicer(doseVolume)); this->SetDoseVolumeSlicer(tmp, config.release());