comparison Framework/Radiography/RadiographySceneReader.cpp @ 1029:0f100d0b9caf

merge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Oct 2019 21:58:30 +0200
parents 9889c819db01
children d7887f88710f f417a0ae282b
comparison
equal deleted inserted replaced
1028:6d5382fa45e1 1029:0f100d0b9caf
138 else 138 else
139 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); 139 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
140 } 140 }
141 } 141 }
142 142
143
144 void RadiographySceneReader::Read(const Json::Value& input) 143 void RadiographySceneReader::Read(const Json::Value& input)
145 { 144 {
146 unsigned int version = input["version"].asUInt(); 145 unsigned int version = input["version"].asUInt();
147 146
148 if (version != 1) 147 if (version != 1)
223 layer.SetForegroundValue((float)(jsonLayer["foreground"].asDouble())); 222 layer.SetForegroundValue((float)(jsonLayer["foreground"].asDouble()));
224 } 223 }
225 } 224 }
226 else 225 else
227 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); 226 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
227 }
228 }
229
230 void RadiographySceneBuilder::ReadDicomLayerGeometry(RadiographyLayer::Geometry& geometry, const Json::Value& input)
231 {
232 for(size_t layerIndex = 0; layerIndex < input["layers"].size(); layerIndex++)
233 {
234 const Json::Value& jsonLayer = input["layers"][(int)layerIndex];
235 if (jsonLayer["type"].asString() == "dicom")
236 {
237 ReadLayerGeometry(geometry, jsonLayer);
238 return;
239 }
228 } 240 }
229 } 241 }
230 242
231 void RadiographySceneBuilder::ReadLayerGeometry(RadiographyLayer::Geometry& geometry, const Json::Value& jsonLayer) 243 void RadiographySceneBuilder::ReadLayerGeometry(RadiographyLayer::Geometry& geometry, const Json::Value& jsonLayer)
232 { 244 {