Mercurial > hg > orthanc-stone
changeset 427:3f9017db1738 am-vsol-upgrade-radiography-export
wip
author | am@osimis.io |
---|---|
date | Fri, 23 Nov 2018 16:06:23 +0100 |
parents | 660fe6f6bf4a |
children | b85f635f1eb5 f36e00439fee |
files | Framework/Radiography/RadiographyScene.cpp Framework/Radiography/RadiographyScene.h |
diffstat | 2 files changed, 35 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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); }; }