Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographySceneReader.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 | d2c0e347ddc2 |
children | 238693c3bc51 |
comparison
equal
deleted
inserted
replaced
730:fe938bddb932 | 772:cfb4d39065a4 |
---|---|
58 unsigned int version = input["version"].asUInt(); | 58 unsigned int version = input["version"].asUInt(); |
59 | 59 |
60 if (version != 1) | 60 if (version != 1) |
61 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | 61 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); |
62 | 62 |
63 if (input.isMember("hasWindowing") && input["hasWindowing"].asBool()) | |
64 { | |
65 scene_.SetWindowing(input["windowCenter"].asFloat(), input["windowWidth"].asFloat()); | |
66 } | |
67 | |
63 RadiographyDicomLayer* dicomLayer = NULL; | 68 RadiographyDicomLayer* dicomLayer = NULL; |
64 for(size_t layerIndex = 0; layerIndex < input["layers"].size(); layerIndex++) | 69 for(size_t layerIndex = 0; layerIndex < input["layers"].size(); layerIndex++) |
65 { | 70 { |
66 const Json::Value& jsonLayer = input["layers"][(int)layerIndex]; | 71 const Json::Value& jsonLayer = input["layers"][(int)layerIndex]; |
67 RadiographyLayer::Geometry geometry; | 72 RadiographyLayer::Geometry geometry; |
140 { | 145 { |
141 unsigned int version = input["version"].asUInt(); | 146 unsigned int version = input["version"].asUInt(); |
142 | 147 |
143 if (version != 1) | 148 if (version != 1) |
144 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); | 149 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); |
150 | |
151 if (input.isMember("hasWindowing") && input["hasWindowing"].asBool()) | |
152 { | |
153 scene_.SetWindowing(input["windowCenter"].asFloat(), input["windowWidth"].asFloat()); | |
154 } | |
145 | 155 |
146 RadiographyDicomLayer* dicomLayer = NULL; | 156 RadiographyDicomLayer* dicomLayer = NULL; |
147 for(size_t layerIndex = 0; layerIndex < input["layers"].size(); layerIndex++) | 157 for(size_t layerIndex = 0; layerIndex < input["layers"].size(); layerIndex++) |
148 { | 158 { |
149 const Json::Value& jsonLayer = input["layers"][(int)layerIndex]; | 159 const Json::Value& jsonLayer = input["layers"][(int)layerIndex]; |