comparison Applications/Samples/SingleVolumeApplication.h @ 121:e66b2c757790 wasm

displaying rt-struct
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 04 Oct 2017 17:53:47 +0200
parents 063f7f3d9f14
children e3433dabfb8d
comparison
equal deleted inserted replaced
120:063f7f3d9f14 121:e66b2c757790
28 #include "../../Framework/Layers/CircleMeasureTracker.h" 28 #include "../../Framework/Layers/CircleMeasureTracker.h"
29 29
30 #include <Core/Toolbox.h> 30 #include <Core/Toolbox.h>
31 #include <Core/Logging.h> 31 #include <Core/Logging.h>
32 32
33 #include <Plugins/Samples/Common/OrthancHttpConnection.h> // TODO REMOVE
34 #include "../../Framework/Layers/DicomStructureSetRendererFactory.h" // TODO REMOVE
35
33 namespace OrthancStone 36 namespace OrthancStone
34 { 37 {
35 namespace Samples 38 namespace Samples
36 { 39 {
37 class SingleVolumeApplication : public SampleApplicationBase 40 class SingleVolumeApplication : public SampleApplicationBase
78 size_t layer) : 81 size_t layer) :
79 VolumeImageInteractor(volume, widget, projection), 82 VolumeImageInteractor(volume, widget, projection),
80 widget_(widget), 83 widget_(widget),
81 layer_(layer) 84 layer_(layer)
82 { 85 {
83 printf("OOO\n");
84 } 86 }
85 }; 87 };
88
89
90 std::auto_ptr<DicomStructureSet> struct_;
91
86 92
87 public: 93 public:
88 virtual void DeclareCommandLineOptions(boost::program_options::options_description& options) 94 virtual void DeclareCommandLineOptions(boost::program_options::options_description& options)
89 { 95 {
90 boost::program_options::options_description generic("Sample options"); 96 boost::program_options::options_description generic("Sample options");
168 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 174 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
169 } 175 }
170 176
171 std::auto_ptr<LayerWidget> widget(new LayerWidget); 177 std::auto_ptr<LayerWidget> widget(new LayerWidget);
172 178
173 #if 0 179 #if 1
174 std::auto_ptr<OrthancVolumeImage> volume(new OrthancVolumeImage(context.GetWebService(), true)); 180 std::auto_ptr<OrthancVolumeImage> volume(new OrthancVolumeImage(context.GetWebService(), true));
175 if (series.empty()) 181 if (series.empty())
176 { 182 {
177 volume->ScheduleLoadInstance(instance); 183 volume->ScheduleLoadInstance(instance);
178 } 184 }
193 s.lut_ = Orthanc::EmbeddedResources::COLORMAP_JET; 199 s.lut_ = Orthanc::EmbeddedResources::COLORMAP_JET;
194 s.interpolation_ = ImageInterpolation_Linear; 200 s.interpolation_ = ImageInterpolation_Linear;
195 widget->SetLayerStyle(0, s); 201 widget->SetLayerStyle(0, s);
196 } 202 }
197 #else 203 #else
204 {
205 OrthancPlugins::OrthancHttpConnection orthanc;
206 struct_.reset(new DicomStructureSet(orthanc, "54460695-ba3885ee-ddf61ac0-f028e31d-a6e474d9")); // IBA
207 //struct_.reset(new DicomStructureSet(orthanc, "17cd032b-ad92a438-ca05f06a-f9e96668-7e3e9e20")); // 0522c0001 TCIA
208 }
209
198 std::auto_ptr<OrthancVolumeImage> ct(new OrthancVolumeImage(context.GetWebService(), false)); 210 std::auto_ptr<OrthancVolumeImage> ct(new OrthancVolumeImage(context.GetWebService(), false));
199 //ct->ScheduleLoadSeries("dd069910-4f090474-7d2bba07-e5c10783-f9e4fb1d"); 211 //ct->ScheduleLoadSeries("dd069910-4f090474-7d2bba07-e5c10783-f9e4fb1d");
200 ct->ScheduleLoadSeries("a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa"); // IBA 212 ct->ScheduleLoadSeries("a04ecf01-79b2fc33-58239f7e-ad9db983-28e81afa"); // IBA
201 //ct->ScheduleLoadSeries("03677739-1d8bca40-db1daf59-d74ff548-7f6fc9c0"); // 0522c0001 TCIA 213 //ct->ScheduleLoadSeries("03677739-1d8bca40-db1daf59-d74ff548-7f6fc9c0"); // 0522c0001 TCIA
202 214
207 //pet->ScheduleLoadInstance("830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb"); // IBA 3 219 //pet->ScheduleLoadInstance("830a69ff-8e4b5ee3-b7f966c8-bccc20fb-d322dceb"); // IBA 3
208 //pet->ScheduleLoadInstance("269f26f4-0c83eeeb-2e67abbd-5467a40f-f1bec90c"); // 0522c0001 TCIA 220 //pet->ScheduleLoadInstance("269f26f4-0c83eeeb-2e67abbd-5467a40f-f1bec90c"); // 0522c0001 TCIA
209 221
210 widget->AddLayer(new VolumeImageSource(*ct)); 222 widget->AddLayer(new VolumeImageSource(*ct));
211 widget->AddLayer(new VolumeImageSource(*pet)); 223 widget->AddLayer(new VolumeImageSource(*pet));
212 224 widget->AddLayer(new DicomStructureSetRendererFactory(*struct_));
213 //context.AddInteractor(new Interactor(*pet, *widget, projection, 1)); 225
214 context.AddInteractor(new VolumeImageInteractor(*ct, *widget, projection)); 226 context.AddInteractor(new Interactor(*pet, *widget, projection, 1));
227 //context.AddInteractor(new VolumeImageInteractor(*ct, *widget, projection));
215 context.AddVolume(ct.release()); 228 context.AddVolume(ct.release());
216 context.AddVolume(pet.release()); 229 context.AddVolume(pet.release());
217 230
218 { 231 {
219 RenderStyle s; 232 RenderStyle s;