Mercurial > hg > orthanc-stone
comparison Framework/Volumes/StructureSetLoader.cpp @ 377:8eb4fe74000f
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 05 Nov 2018 16:18:27 +0100 |
parents | b4abaeb783b1 |
children | ba4ace20454e |
comparison
equal
deleted
inserted
replaced
376:70256a53ff21 | 377:8eb4fe74000f |
---|---|
35 } | 35 } |
36 | 36 |
37 | 37 |
38 void StructureSetLoader::OnReferencedSliceLoaded(const OrthancApiClient::JsonResponseReadyMessage& message) | 38 void StructureSetLoader::OnReferencedSliceLoaded(const OrthancApiClient::JsonResponseReadyMessage& message) |
39 { | 39 { |
40 OrthancPlugins::FullOrthancDataset dataset(message.Response); | 40 OrthancPlugins::FullOrthancDataset dataset(message.GetJson()); |
41 | 41 |
42 Orthanc::DicomMap slice; | 42 Orthanc::DicomMap slice; |
43 MessagingToolbox::ConvertDataset(slice, dataset); | 43 MessagingToolbox::ConvertDataset(slice, dataset); |
44 structureSet_->AddReferencedSlice(slice); | 44 structureSet_->AddReferencedSlice(slice); |
45 | 45 |
46 VolumeLoaderBase::NotifyContentChange(); | 46 VolumeLoaderBase::NotifyContentChange(); |
47 } | 47 } |
48 | 48 |
49 void StructureSetLoader::OnStructureSetLoaded(const OrthancApiClient::JsonResponseReadyMessage& message) | 49 void StructureSetLoader::OnStructureSetLoaded(const OrthancApiClient::JsonResponseReadyMessage& message) |
50 { | 50 { |
51 OrthancPlugins::FullOrthancDataset dataset(message.Response); | 51 OrthancPlugins::FullOrthancDataset dataset(message.GetJson()); |
52 structureSet_.reset(new DicomStructureSet(dataset)); | 52 structureSet_.reset(new DicomStructureSet(dataset)); |
53 | 53 |
54 std::set<std::string> instances; | 54 std::set<std::string> instances; |
55 structureSet_->GetReferencedInstances(instances); | 55 structureSet_->GetReferencedInstances(instances); |
56 | 56 |
64 VolumeLoaderBase::NotifyGeometryReady(); | 64 VolumeLoaderBase::NotifyGeometryReady(); |
65 } | 65 } |
66 | 66 |
67 void StructureSetLoader::OnLookupCompleted(const OrthancApiClient::JsonResponseReadyMessage& message) | 67 void StructureSetLoader::OnLookupCompleted(const OrthancApiClient::JsonResponseReadyMessage& message) |
68 { | 68 { |
69 Json::Value lookup = message.Response; | 69 const Json::Value& lookup = message.GetJson(); |
70 | 70 |
71 if (lookup.type() != Json::arrayValue || | 71 if (lookup.type() != Json::arrayValue || |
72 lookup.size() != 1 || | 72 lookup.size() != 1 || |
73 !lookup[0].isMember("Type") || | 73 !lookup[0].isMember("Type") || |
74 !lookup[0].isMember("Path") || | 74 !lookup[0].isMember("Path") || |