Mercurial > hg > orthanc-stone
comparison Samples/WebAssembly/SingleFrameViewer/SingleFrameViewerApplication.h @ 1472:474360793956
DicomResourcesLoader::Create()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 15 Jun 2020 16:26:57 +0200 |
parents | 15173a383a00 |
children | d1dde1f86d4a |
comparison
equal
deleted
inserted
replaced
1471:28c64c246312 | 1472:474360793956 |
---|---|
99 { | 99 { |
100 boost::shared_ptr<Application> application(new Application(context, viewport)); | 100 boost::shared_ptr<Application> application(new Application(context, viewport)); |
101 | 101 |
102 { | 102 { |
103 std::auto_ptr<ILoadersContext::ILock> lock(context.Lock()); | 103 std::auto_ptr<ILoadersContext::ILock> lock(context.Lock()); |
104 DicomResourcesLoader::Factory f; | 104 application->dicomLoader_ = DicomResourcesLoader::Create(*lock); |
105 application->dicomLoader_ = boost::dynamic_pointer_cast<DicomResourcesLoader>(f.Create(*lock)); | |
106 } | 105 } |
107 | 106 |
108 application->Register<DicomResourcesLoader::SuccessMessage>(*application->dicomLoader_, &Application::Handle); | 107 application->Register<DicomResourcesLoader::SuccessMessage>(*application->dicomLoader_, &Application::Handle); |
109 | 108 |
110 return application; | 109 return application; |
311 application->loadThumbnails_ = loadThumbnails; | 310 application->loadThumbnails_ = loadThumbnails; |
312 | 311 |
313 { | 312 { |
314 std::auto_ptr<ILoadersContext::ILock> lock(context.Lock()); | 313 std::auto_ptr<ILoadersContext::ILock> lock(context.Lock()); |
315 | 314 |
316 { | 315 application->resourcesLoader_ = DicomResourcesLoader::Create(*lock); |
317 DicomResourcesLoader::Factory f; | |
318 application->resourcesLoader_ = boost::dynamic_pointer_cast<DicomResourcesLoader>(f.Create(*lock)); | |
319 } | |
320 | 316 |
321 { | 317 { |
322 SeriesThumbnailsLoader::Factory f; | 318 SeriesThumbnailsLoader::Factory f; |
323 f.SetPriority(PRIORITY_THUMBNAILS); | 319 f.SetPriority(PRIORITY_THUMBNAILS); |
324 application->thumbnailsLoader_ = boost::dynamic_pointer_cast<SeriesThumbnailsLoader>(f.Create(*lock)); | 320 application->thumbnailsLoader_ = boost::dynamic_pointer_cast<SeriesThumbnailsLoader>(f.Create(*lock)); |