comparison Applications/Samples/SingleVolumeApplication.h @ 389:3e6e10a5a6c8

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Nov 2018 17:28:32 +0100
parents 557c8ff1db5c
children 1d9dd542adfe
comparison
equal deleted inserted replaced
388:20f149669c1f 389:3e6e10a5a6c8
42 { 42 {
43 private: 43 private:
44 class Interactor : public VolumeImageInteractor 44 class Interactor : public VolumeImageInteractor
45 { 45 {
46 private: 46 private:
47 LayerWidget& widget_; 47 SliceViewerWidget& widget_;
48 size_t layer_; 48 size_t layer_;
49 49
50 protected: 50 protected:
51 virtual void NotifySliceChange(const ISlicedVolume& volume, 51 virtual void NotifySliceChange(const ISlicedVolume& volume,
52 const size_t& sliceIndex, 52 const size_t& sliceIndex,
68 const ViewportGeometry& view, 68 const ViewportGeometry& view,
69 double x, 69 double x,
70 double y, 70 double y,
71 IStatusBar* statusBar) 71 IStatusBar* statusBar)
72 { 72 {
73 const LayerWidget& w = dynamic_cast<const LayerWidget&>(widget); 73 const SliceViewerWidget& w = dynamic_cast<const SliceViewerWidget&>(widget);
74 Vector p = w.GetSlice().MapSliceToWorldCoordinates(x, y); 74 Vector p = w.GetSlice().MapSliceToWorldCoordinates(x, y);
75 printf("%f %f %f\n", p[0], p[1], p[2]); 75 printf("%f %f %f\n", p[0], p[1], p[2]);
76 } 76 }
77 77
78 public: 78 public:
79 Interactor(OrthancVolumeImage& volume, 79 Interactor(OrthancVolumeImage& volume,
80 LayerWidget& widget, 80 SliceViewerWidget& widget,
81 VolumeProjection projection, 81 VolumeProjection projection,
82 size_t layer) : 82 size_t layer) :
83 VolumeImageInteractor(volume, widget, projection), 83 VolumeImageInteractor(volume, widget, projection),
84 widget_(widget), 84 widget_(widget),
85 layer_(layer) 85 layer_(layer)
169 { 169 {
170 LOG(ERROR) << "Unknown projection: " << tmp; 170 LOG(ERROR) << "Unknown projection: " << tmp;
171 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 171 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
172 } 172 }
173 173
174 std::auto_ptr<LayerWidget> widget(new LayerWidget); 174 std::auto_ptr<SliceViewerWidget> widget(new SliceViewerWidget);
175 175
176 #if 1 176 #if 1
177 std::auto_ptr<OrthancVolumeImage> volume(new OrthancVolumeImage(context.GetWebService(), true)); 177 std::auto_ptr<OrthancVolumeImage> volume(new OrthancVolumeImage(context.GetWebService(), true));
178 if (series.empty()) 178 if (series.empty())
179 { 179 {