comparison Applications/Samples/SingleVolumeApplication.h @ 316:ce48c3b3b0e9

fix for new ImageAccessor API
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Oct 2018 12:45:27 +0200
parents 5412adf19980
children 557c8ff1db5c
comparison
equal deleted inserted replaced
310:348e00b837b9 316:ce48c3b3b0e9
172 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 172 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
173 } 173 }
174 174
175 std::auto_ptr<LayerWidget> widget(new LayerWidget); 175 std::auto_ptr<LayerWidget> widget(new LayerWidget);
176 176
177 #if 0 177 #if 1
178 std::auto_ptr<OrthancVolumeImage> volume(new OrthancVolumeImage(context.GetWebService(), true)); 178 std::auto_ptr<OrthancVolumeImage> volume(new OrthancVolumeImage(context.GetWebService(), true));
179 if (series.empty()) 179 if (series.empty())
180 { 180 {
181 volume->ScheduleLoadInstance(instance); 181 volume->ScheduleLoadInstance(instance);
182 } 182 }
188 widget->AddLayer(new VolumeImageSource(*volume)); 188 widget->AddLayer(new VolumeImageSource(*volume));
189 189
190 context.AddInteractor(new Interactor(*volume, *widget, projection, 0)); 190 context.AddInteractor(new Interactor(*volume, *widget, projection, 0));
191 context.AddSlicedVolume(volume.release()); 191 context.AddSlicedVolume(volume.release());
192 192
193 if (1)
194 {
195 RenderStyle s;
196 //s.drawGrid_ = true;
197 s.alpha_ = 1;
198 s.windowing_ = ImageWindowing_Bone;
199 widget->SetLayerStyle(0, s);
200 }
201 else
193 { 202 {
194 RenderStyle s; 203 RenderStyle s;
195 s.alpha_ = 1; 204 s.alpha_ = 1;
196 s.applyLut_ = true; 205 s.applyLut_ = true;
197 s.lut_ = Orthanc::EmbeddedResources::COLORMAP_JET; 206 s.lut_ = Orthanc::EmbeddedResources::COLORMAP_JET;