Mercurial > hg > orthanc-stone
comparison Framework/Layers/ILayerSource.h @ 380:ba5ad93f935a
ILayerSource::LayerErrorMessage
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 06 Nov 2018 14:59:20 +0100 |
parents | 2308fe0b0b05 |
children | 19bd222283ae |
comparison
equal
deleted
inserted
replaced
379:2308fe0b0b05 | 380:ba5ad93f935a |
---|---|
58 | 58 |
59 | 59 |
60 class LayerReadyMessage : public OriginMessage<MessageType_LayerSource_LayerReady, ILayerSource> | 60 class LayerReadyMessage : public OriginMessage<MessageType_LayerSource_LayerReady, ILayerSource> |
61 { | 61 { |
62 private: | 62 private: |
63 std::auto_ptr<ILayerRenderer> renderer_; | 63 std::auto_ptr<ILayerRenderer> renderer_; |
64 const CoordinateSystem3D& slice_; | 64 const CoordinateSystem3D& slice_; |
65 bool isError_; | |
66 | 65 |
67 public: | 66 public: |
68 LayerReadyMessage(ILayerSource& origin, | 67 LayerReadyMessage(ILayerSource& origin, |
69 ILayerRenderer* renderer, // Takes ownership => TODO Remove this! | 68 ILayerRenderer* renderer, // Takes ownership => TODO Remove this! |
70 const CoordinateSystem3D& slice, | 69 const CoordinateSystem3D& slice) : |
71 bool isError // TODO => create NotifyLayerError | |
72 ) : | |
73 OriginMessage(origin), | 70 OriginMessage(origin), |
74 renderer_(renderer), | 71 renderer_(renderer), |
75 slice_(slice), | 72 slice_(slice) |
76 isError_(isError) | |
77 { | 73 { |
78 } | 74 } |
79 | 75 |
80 // TODO - Remove this function | 76 // TODO - Remove this function |
81 std::auto_ptr<ILayerRenderer>& GetRendererRaw() | 77 std::auto_ptr<ILayerRenderer>& GetRendererRaw() |
90 | 86 |
91 const CoordinateSystem3D& GetSlice() const | 87 const CoordinateSystem3D& GetSlice() const |
92 { | 88 { |
93 return slice_; | 89 return slice_; |
94 } | 90 } |
91 }; | |
95 | 92 |
96 bool IsError() const | 93 |
94 class LayerErrorMessage : public OriginMessage<MessageType_LayerSource_LayerError, ILayerSource> | |
95 { | |
96 private: | |
97 const CoordinateSystem3D& slice_; | |
98 | |
99 public: | |
100 LayerErrorMessage(ILayerSource& origin, | |
101 const CoordinateSystem3D& slice) : | |
102 OriginMessage(origin), | |
103 slice_(slice) | |
97 { | 104 { |
98 return isError_; | 105 } |
106 | |
107 const CoordinateSystem3D& GetSlice() const | |
108 { | |
109 return slice_; | |
99 } | 110 } |
100 }; | 111 }; |
101 | 112 |
102 | 113 |
103 // TODO: Rename "ImageReadyMessage" as "SliceReadyMessage" | 114 // TODO: Rename "ImageReadyMessage" as "SliceReadyMessage" |