Mercurial > hg > orthanc-wsi
comparison ViewerPlugin/Plugin.cpp @ 196:b0bd22077cd8
sharing code with orthanc-stone
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 01 Jul 2020 17:57:38 +0200 |
parents | e57e6ca5303d |
children | a1c265cb2174 |
comparison
equal
deleted
inserted
replaced
195:fda17c92d784 | 196:b0bd22077cd8 |
---|---|
19 **/ | 19 **/ |
20 | 20 |
21 | 21 |
22 #include "../Framework/PrecompiledHeadersWSI.h" | 22 #include "../Framework/PrecompiledHeadersWSI.h" |
23 | 23 |
24 #include "../Framework/Jpeg2000Reader.h" | |
24 #include "DicomPyramidCache.h" | 25 #include "DicomPyramidCache.h" |
25 #include "../Framework/Jpeg2000Reader.h" | 26 #include "OrthancPluginConnection.h" |
26 #include "../Framework/Inputs/Orthanc/OrthancPluginConnection.h" | |
27 | 27 |
28 #include <Logging.h> | 28 #include <Logging.h> |
29 #include <Images/ImageProcessing.h> | 29 #include <Images/ImageProcessing.h> |
30 #include <Images/PngWriter.h> | 30 #include <Images/PngWriter.h> |
31 #include <MultiThreading/Semaphore.h> | 31 #include <MultiThreading/Semaphore.h> |
36 | 36 |
37 #include <EmbeddedResources.h> | 37 #include <EmbeddedResources.h> |
38 | 38 |
39 #include <cassert> | 39 #include <cassert> |
40 | 40 |
41 std::auto_ptr<OrthancPlugins::OrthancPluginConnection> orthanc_; | 41 std::auto_ptr<OrthancWSI::OrthancPluginConnection> orthanc_; |
42 std::auto_ptr<OrthancWSI::DicomPyramidCache> cache_; | 42 std::auto_ptr<OrthancWSI::DicomPyramidCache> cache_; |
43 std::auto_ptr<Orthanc::Semaphore> transcoderSemaphore_; | 43 std::auto_ptr<Orthanc::Semaphore> transcoderSemaphore_; |
44 | 44 |
45 | 45 |
46 static void AnswerSparseTile(OrthancPluginRestOutput* output, | 46 static void AnswerSparseTile(OrthancPluginRestOutput* output, |
47 unsigned int tileWidth, | 47 unsigned int tileWidth, |
48 unsigned int tileHeight) | 48 unsigned int tileHeight) |
327 sprintf(info, "The whole-slide imaging plugin will use at most %u threads to transcode the tiles", threads); | 327 sprintf(info, "The whole-slide imaging plugin will use at most %u threads to transcode the tiles", threads); |
328 OrthancPluginLogWarning(OrthancPlugins::GetGlobalContext(), info); | 328 OrthancPluginLogWarning(OrthancPlugins::GetGlobalContext(), info); |
329 | 329 |
330 OrthancPluginSetDescription(context, "Provides a Web viewer of whole-slide microscopic images within Orthanc."); | 330 OrthancPluginSetDescription(context, "Provides a Web viewer of whole-slide microscopic images within Orthanc."); |
331 | 331 |
332 orthanc_.reset(new OrthancPlugins::OrthancPluginConnection); | 332 orthanc_.reset(new OrthancWSI::OrthancPluginConnection); |
333 cache_.reset(new OrthancWSI::DicomPyramidCache(*orthanc_, 10 /* Number of pyramids to be cached - TODO parameter */)); | 333 cache_.reset(new OrthancWSI::DicomPyramidCache(*orthanc_, 10 /* Number of pyramids to be cached - TODO parameter */)); |
334 | 334 |
335 OrthancPluginRegisterOnChangeCallback(OrthancPlugins::GetGlobalContext(), OnChangeCallback); | 335 OrthancPluginRegisterOnChangeCallback(OrthancPlugins::GetGlobalContext(), OnChangeCallback); |
336 | 336 |
337 OrthancPlugins::RegisterRestCallback<ServeFile>("/wsi/app/(ol.css)", true); | 337 OrthancPlugins::RegisterRestCallback<ServeFile>("/wsi/app/(ol.css)", true); |