# HG changeset patch # User am@osimis.io # Date 1542985583 -3600 # Node ID 3f9017db17381b12f2442c7ae819a49ca62a2e39 # Parent 660fe6f6bf4ac23aee691e253bab062a4499d97e wip diff -r 660fe6f6bf4a -r 3f9017db1738 Framework/Radiography/RadiographyScene.cpp --- a/Framework/Radiography/RadiographyScene.cpp Thu Nov 22 23:15:24 2018 +0100 +++ b/Framework/Radiography/RadiographyScene.cpp Fri Nov 23 16:06:23 2018 +0100 @@ -165,14 +165,6 @@ alpha_ = raii; } - - void LoadText(const Orthanc::Font& font, - const std::string& utf8) - { - SetAlpha(font.RenderAlpha(utf8)); - } - - virtual bool GetDefaultWindowing(float& center, float& width) const { @@ -266,6 +258,25 @@ }; + class RadiographyScene::TextLayer : public AlphaLayer + { + private: + std::string text_; + + public: + TextLayer(const RadiographyScene& scene) : + AlphaLayer(scene) + { + } + + void LoadText(const Orthanc::Font& font, + const std::string& utf8) + { + SetAlpha(font.RenderAlpha(utf8)); + } + + }; + class RadiographyScene::DicomLayer : public RadiographyLayer { @@ -754,6 +765,16 @@ } + void RadiographyScene::ExportToJson(Json::Value &output) + { + for (Layers::iterator it = layers_.begin(); it != layers_.end(); it++) + { + Json::Value jsonLayer; + it-> + + } + } + void RadiographyScene::ExportDicom(OrthancApiClient& orthanc, const Orthanc::DicomMap& dicom, const std::string& parentOrthancId, @@ -765,7 +786,7 @@ { Json::Value createDicomRequestContent; - Export(createDicomRequestContent, dicom, pixelSpacingX, pixelSpacingY, invert, interpolation, usePam); + ExportToCreateDicomRequest(createDicomRequestContent, dicom, pixelSpacingX, pixelSpacingY, invert, interpolation, usePam); if (!parentOrthancId.empty()) { @@ -781,7 +802,7 @@ // Export using PAM is faster than using PNG, but requires Orthanc // core >= 1.4.3 - void RadiographyScene::Export(Json::Value& createDicomRequestContent, + void RadiographyScene::ExportToCreateDicomRequest(Json::Value& createDicomRequestContent, const Orthanc::DicomMap& dicom, double pixelSpacingX, double pixelSpacingY, diff -r 660fe6f6bf4a -r 3f9017db1738 Framework/Radiography/RadiographyScene.h --- a/Framework/Radiography/RadiographyScene.h Thu Nov 22 23:15:24 2018 +0100 +++ b/Framework/Radiography/RadiographyScene.h Fri Nov 23 16:06:23 2018 +0100 @@ -155,12 +155,15 @@ bool usePam); // temporary version used by VSOL because we need to send the same request at another url - void Export(Json::Value& createDicomRequestContent, + void ExportToCreateDicomRequest(Json::Value& createDicomRequestContent, const Orthanc::DicomMap& dicom, double pixelSpacingX, double pixelSpacingY, bool invert, ImageInterpolation interpolation, bool usePam); + + // temporary version used by VSOL + void ExportToJson(Json::Value& output); }; }