# HG changeset patch # User Sebastien Jodogne # Date 1510833022 -3600 # Node ID a823122db53d06a79b7e5f42d3be8c622aba9211 # Parent c993693e9e6373154e07b43fccd645e30e29fbcd removal of useless class diff -r c993693e9e63 -r a823122db53d Framework/Layers/DicomStructureSetRendererFactory.cpp --- a/Framework/Layers/DicomStructureSetRendererFactory.cpp Tue Nov 14 17:26:10 2017 +0100 +++ b/Framework/Layers/DicomStructureSetRendererFactory.cpp Thu Nov 16 12:50:22 2017 +0100 @@ -164,7 +164,7 @@ for (std::set::const_iterator it = instances.begin(); it != instances.end(); ++it) { - orthanc_.SchedulePostRequest(loader_, "/tools/lookup", *it, + orthanc_.SchedulePostRequest(*this, "/tools/lookup", *it, new Operation(Operation::Type_LookupSopInstanceUid, *it)); } @@ -189,7 +189,7 @@ } const std::string& instance = lookup[0]["ID"].asString(); - orthanc_.ScheduleGetRequest(loader_, "/instances/" + instance + "/tags", + orthanc_.ScheduleGetRequest(*this, "/instances/" + instance + "/tags", new Operation(Operation::Type_LoadReferencedSlice, instance)); } else @@ -220,7 +220,6 @@ DicomStructureSetRendererFactory::DicomStructureSetRendererFactory(IWebService& orthanc) : - loader_(*this), orthanc_(orthanc) { } @@ -235,7 +234,7 @@ else { const std::string uri = "/instances/" + instance + "/tags?ignore-length=3006-0050"; - orthanc_.ScheduleGetRequest(loader_, uri, new Operation(Operation::Type_LoadStructureSet, instance)); + orthanc_.ScheduleGetRequest(*this, uri, new Operation(Operation::Type_LoadStructureSet, instance)); } } diff -r c993693e9e63 -r a823122db53d Framework/Layers/DicomStructureSetRendererFactory.h --- a/Framework/Layers/DicomStructureSetRendererFactory.h Tue Nov 14 17:26:10 2017 +0100 +++ b/Framework/Layers/DicomStructureSetRendererFactory.h Thu Nov 16 12:50:22 2017 +0100 @@ -27,38 +27,14 @@ namespace OrthancStone { - class DicomStructureSetRendererFactory : public LayerSourceBase + class DicomStructureSetRendererFactory : + public LayerSourceBase, + private IWebService::ICallback { private: class Renderer; class Operation; - class Loader : public IWebService::ICallback - { - private: - DicomStructureSetRendererFactory& that_; - - public: - Loader(DicomStructureSetRendererFactory& that) : - that_(that) - { - } - - virtual void NotifyError(const std::string& uri, - Orthanc::IDynamicObject* payload) - { - that_.NotifyError(uri, payload); - } - - virtual void NotifySuccess(const std::string& uri, - const void* answer, - size_t answerSize, - Orthanc::IDynamicObject* payload) - { - that_.NotifySuccess(uri, answer, answerSize, payload); - } - }; - virtual void NotifyError(const std::string& uri, Orthanc::IDynamicObject* payload); @@ -67,7 +43,6 @@ size_t answerSize, Orthanc::IDynamicObject* payload); - Loader loader_; IWebService& orthanc_; std::auto_ptr structureSet_;