comparison Framework/Radiography/RadiographySceneWriter.cpp @ 772:cfb4d39065a4 am-dev

fix windowing + save windowing
author Alain Mazy <alain@mazy.be>
date Fri, 24 May 2019 11:05:06 +0200
parents 0c5398c3b994
children f417a0ae282b
comparison
equal deleted inserted replaced
730:fe938bddb932 772:cfb4d39065a4
28 namespace OrthancStone 28 namespace OrthancStone
29 { 29 {
30 void RadiographySceneWriter::Write(Json::Value& output, const RadiographyScene& scene) 30 void RadiographySceneWriter::Write(Json::Value& output, const RadiographyScene& scene)
31 { 31 {
32 output["version"] = 1; 32 output["version"] = 1;
33 float windowCenter, windowWidth;
34 bool hasWindowing = scene.GetWindowing(windowCenter, windowWidth);
35 output["hasWindowing"] = hasWindowing;
36 if (hasWindowing)
37 {
38 output["windowCenter"] = windowCenter;
39 output["windowWidth"] = windowWidth;
40 }
33 output["layers"] = Json::arrayValue; 41 output["layers"] = Json::arrayValue;
34 42
35 std::vector<size_t> layersIndexes; 43 std::vector<size_t> layersIndexes;
36 scene.GetLayersIndexes(layersIndexes); 44 scene.GetLayersIndexes(layersIndexes);
37 45