comparison Applications/Samples/SingleVolumeApplication.h @ 123:ed0003f6102c wasm

dynamic loading of rt-struct renderers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 07 Oct 2017 13:11:12 +0200
parents e3433dabfb8d
children c9e88e7935a4
comparison
equal deleted inserted replaced
122:e3433dabfb8d 123:ed0003f6102c
86 { 86 {
87 } 87 }
88 }; 88 };
89 89
90 90
91 std::auto_ptr<DicomStructureSet> struct_;
92
93
94 public: 91 public:
95 virtual void DeclareCommandLineOptions(boost::program_options::options_description& options) 92 virtual void DeclareCommandLineOptions(boost::program_options::options_description& options)
96 { 93 {
97 boost::program_options::options_description generic("Sample options"); 94 boost::program_options::options_description generic("Sample options");
98 generic.add_options() 95 generic.add_options()
200 s.lut_ = Orthanc::EmbeddedResources::COLORMAP_JET; 197 s.lut_ = Orthanc::EmbeddedResources::COLORMAP_JET;
201 s.interpolation_ = ImageInterpolation_Linear; 198 s.interpolation_ = ImageInterpolation_Linear;
202 widget->SetLayerStyle(0, s); 199 widget->SetLayerStyle(0, s);
203 } 200 }
204 #else 201 #else
205 {
206 const std::string s = "54460695-ba3885ee-ddf61ac0-f028e31d-a6e474d9"; // IBA
207 //const std::string s = "17cd032b-ad92a438-ca05f06a-f9e96668-7e3e9e20"; // 0522c0001 TCIA
208
209 OrthancPlugins::OrthancHttpConnection orthanc;
210 struct_.reset(DicomStructureSet::SynchronousLoad(orthanc, s));
211 }
212
213 std::auto_ptr<OrthancVolumeImage> ct(new OrthancVolumeImage(context.GetWebService(), false)); 202 std::auto_ptr<OrthancVolumeImage> ct(new OrthancVolumeImage(context.GetWebService(), false));
214 //ct->ScheduleLoadSeries("dd069910-4f090474-7d2bba07-e5c10783-f9e4fb1d"); 203 //ct->ScheduleLoadSeries("dd069910-4f090474-7d2bba07-e5c10783-f9e4fb1d");
215 ct->ScheduleLoadSeries("a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa"); // IBA 204 ct->ScheduleLoadSeries("a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa"); // IBA
216 //ct->ScheduleLoadSeries("03677739-1d8bca40-db1daf59-d74ff548-7f6fc9c0"); // 0522c0001 TCIA 205 //ct->ScheduleLoadSeries("03677739-1d8bca40-db1daf59-d74ff548-7f6fc9c0"); // 0522c0001 TCIA
217 206
220 pet->ScheduleLoadInstance("830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb"); // IBA 1 209 pet->ScheduleLoadInstance("830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb"); // IBA 1
221 //pet->ScheduleLoadInstance("337876a1-a68a9718-f15abccd-38faafa1-b99b496a"); // IBA 2 210 //pet->ScheduleLoadInstance("337876a1-a68a9718-f15abccd-38faafa1-b99b496a"); // IBA 2
222 //pet->ScheduleLoadInstance("830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb"); // IBA 3 211 //pet->ScheduleLoadInstance("830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb"); // IBA 3
223 //pet->ScheduleLoadInstance("269f26f4-0c83eeeb-2e67abbd-5467a40f-f1bec90c"); // 0522c0001 TCIA 212 //pet->ScheduleLoadInstance("269f26f4-0c83eeeb-2e67abbd-5467a40f-f1bec90c"); // 0522c0001 TCIA
224 213
214 const std::string s = "54460695-ba3885ee-ddf61ac0-f028e31d-a6e474d9"; // IBA
215 //const std::string s = "17cd032b-ad92a438-ca05f06a-f9e96668-7e3e9e20"; // 0522c0001 TCIA
216
225 widget->AddLayer(new VolumeImageSource(*ct)); 217 widget->AddLayer(new VolumeImageSource(*ct));
226 widget->AddLayer(new VolumeImageSource(*pet)); 218 widget->AddLayer(new VolumeImageSource(*pet));
227 widget->AddLayer(new DicomStructureSetRendererFactory(*struct_)); 219 widget->AddLayer(new DicomStructureSetRendererFactory(context.GetWebService(), s));
228 220
229 context.AddInteractor(new Interactor(*pet, *widget, projection, 1)); 221 context.AddInteractor(new Interactor(*pet, *widget, projection, 1));
230 //context.AddInteractor(new VolumeImageInteractor(*ct, *widget, projection)); 222 //context.AddInteractor(new VolumeImageInteractor(*ct, *widget, projection));
231 context.AddVolume(ct.release()); 223 context.AddVolume(ct.release());
232 context.AddVolume(pet.release()); 224 context.AddVolume(pet.release());