Mercurial > hg > orthanc-stone
diff Framework/Radiography/RadiographySceneReader.h @ 1279:7ec8fea061b9 broker
integration mainline->broker
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Feb 2020 15:20:08 +0100 |
parents | bdc6837d5917 69177b10e2b9 |
children | 68579a31eeb4 |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographySceneReader.h Fri Jan 31 17:34:57 2020 +0100 +++ b/Framework/Radiography/RadiographySceneReader.h Tue Feb 04 15:20:08 2020 +0100 @@ -33,6 +33,18 @@ namespace OrthancStone { + // a layer containing only the geometry of a DICOM layer (bit hacky !) + class RadiographyPlaceholderLayer : public RadiographyDicomLayer + { + public: + RadiographyPlaceholderLayer(const RadiographyScene& scene) : + RadiographyDicomLayer(scene) + { + } + + }; + + // HACK: I had to introduce this builder class in order to be able to recreate a RadiographyScene // from a serialized scene that is passed to web-workers. // It needs some architecturing... @@ -68,18 +80,32 @@ class RadiographySceneReader : public RadiographySceneBuilder { - private: - boost::shared_ptr<Deprecated::OrthancApiClient> orthancApiClient_; + Deprecated::OrthancApiClient& orthancApiClient_; public: - RadiographySceneReader(RadiographyScene& scene, - boost::shared_ptr<Deprecated::OrthancApiClient> orthancApiClient) : + RadiographySceneReader(RadiographyScene& scene, Deprecated::OrthancApiClient& orthancApiClient) : RadiographySceneBuilder(scene), orthancApiClient_(orthancApiClient) { } - void Read(const Json::Value& input); + protected: + virtual RadiographyDicomLayer* LoadDicom(const std::string& instanceId, unsigned int frame, RadiographyLayer::Geometry* geometry); + }; + + // reads the whole scene but the DICOM image such that we have the full geometry + class RadiographySceneGeometryReader : public RadiographySceneBuilder + { + unsigned int dicomImageWidth_; + unsigned int dicomImageHeight_; + + public: + RadiographySceneGeometryReader(RadiographyScene& scene, unsigned int dicomImageWidth, unsigned int dicomImageHeight) : + RadiographySceneBuilder(scene), + dicomImageWidth_(dicomImageWidth), + dicomImageHeight_(dicomImageHeight) + { + } protected: virtual RadiographyDicomLayer* LoadDicom(const std::string& instanceId, unsigned int frame, RadiographyLayer::Geometry* geometry);