Mercurial > hg > orthanc-stone
diff Framework/Layers/DicomStructureSetRendererFactory.h @ 130:1982d6c1d2ff wasm
IVolumeLoader
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 16 Nov 2017 13:46:03 +0100 |
parents | a823122db53d |
children | e2fe9352f240 |
line wrap: on
line diff
--- a/Framework/Layers/DicomStructureSetRendererFactory.h Thu Nov 16 12:50:22 2017 +0100 +++ b/Framework/Layers/DicomStructureSetRendererFactory.h Thu Nov 16 13:46:03 2017 +0100 @@ -21,35 +21,41 @@ #pragma once -#include "../Toolbox/DicomStructureSet.h" -#include "../Toolbox/IWebService.h" #include "LayerSourceBase.h" +#include "../Volumes/StructureSetLoader.h" namespace OrthancStone { class DicomStructureSetRendererFactory : public LayerSourceBase, - private IWebService::ICallback + private IVolumeLoader::IObserver { private: class Renderer; - class Operation; + + virtual void NotifyGeometryReady(const IVolumeLoader& loader) + { + LayerSourceBase::NotifyGeometryReady(); + } + + virtual void NotifyGeometryError(const IVolumeLoader& loader) + { + LayerSourceBase::NotifyGeometryError(); + } + + virtual void NotifyContentChange(const IVolumeLoader& loader) + { + LayerSourceBase::NotifyContentChange(); + } - virtual void NotifyError(const std::string& uri, - Orthanc::IDynamicObject* payload); - - virtual void NotifySuccess(const std::string& uri, - const void* answer, - size_t answerSize, - Orthanc::IDynamicObject* payload); - - IWebService& orthanc_; - std::auto_ptr<DicomStructureSet> structureSet_; + StructureSetLoader& loader_; public: - DicomStructureSetRendererFactory(IWebService& orthanc); - - void ScheduleLoadInstance(const std::string& instance); + DicomStructureSetRendererFactory(StructureSetLoader& loader) : + loader_(loader) + { + loader_.Register(*this); + } virtual bool GetExtent(std::vector<Vector>& points, const CoordinateSystem3D& viewportSlice)