~ubuntu-branches/ubuntu/utopic/ginkgocadx/utopic-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/main/controllers/hangingprotocolcontroller.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2014-01-09 07:37:09 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20140109073709-rpuh5x3p3finvtze
Tags: 3.6.0.1228.33+dfsg-1
New upstream release [December 2013]

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
                };
151
151
 
152
152
                /**
153
 
                * window level setting
154
 
                */
155
 
                class WindowLevelSetting 
156
 
                {
157
 
                public:
158
 
                        WindowLevelSetting();
159
 
                        WindowLevelSetting(double window, double level, const std::string& label);
160
 
                        WindowLevelSetting(wxXmlNode* node);
161
 
                        WindowLevelSetting(const WindowLevelSetting& other);
162
 
                        ~WindowLevelSetting();
163
 
                        /**
164
 
                        serialize to XML
165
 
                        */
166
 
                        wxXmlNode* serialize();
167
 
 
168
 
                        double getWindow() const;
169
 
                        double getLevel() const;
170
 
                        const std::string& getLabel() const;
171
 
 
172
 
                        std::string toString() const;
173
 
 
174
 
                        void setWindow(double window);
175
 
                        void setLevel(double level);
176
 
                        void setLabel(const std::string& label);
177
 
                        
178
 
                protected:
179
 
                        double window;
180
 
                        double level;
181
 
                        std::string label;
182
 
                };
183
 
 
184
 
                /**
185
 
                * default modality settings
186
 
                */
187
 
                class DefaultModalitySettings 
188
 
                {
189
 
                public:
190
 
                        typedef enum TInterpolationMode{
191
 
                                TIM_NEAREST_NEIGHBOUR,
192
 
                                TIM_LINEAR,
193
 
                                TIM_CUBIC
194
 
                        }TInterpolationMode;
195
 
                        typedef std::list<GNC::GCS::Ptr<WindowLevelSetting> > TListOfWLSettings;
196
 
                        DefaultModalitySettings();
197
 
                        DefaultModalitySettings(wxXmlNode* node);
198
 
                        DefaultModalitySettings(const DefaultModalitySettings& other);
199
 
                        ~DefaultModalitySettings();
200
 
                        /**
201
 
                        serialize to XML
202
 
                        */
203
 
                        wxXmlNode* serialize();
204
 
 
205
 
                        static std::string getDefaultWindowLevelLabel();
206
 
                        static std::string getAutocalculateWindowLevelLabel();
207
 
 
208
 
                        const TListOfWLSettings& getWLSettings() const;
209
 
                        const std::string& getModality() const;
210
 
                        const std::string& getInitialWindowLevelLabel() const;
211
 
                        TInterpolationMode getInterpolationMode() const;
212
 
 
213
 
                        void addWindowLevel(const GNC::GCS::Ptr<WindowLevelSetting>& wlSetting);
214
 
                        void clearWindowLevels();
215
 
                        void setModality(const std::string& modality);
216
 
                        void setInitialWindowLevelLabel(const std::string& label);
217
 
                        void setInterpolationMode(TInterpolationMode mode);
218
 
                protected:
219
 
                        std::string modality;
220
 
                        std::string initialWindowLevelLabel;
221
 
                        TInterpolationMode interpolationMode;
222
 
                        TListOfWLSettings listOfWLSettings;
223
 
                };
224
 
 
225
 
                /**
226
153
                HangingProtocol class, defines a hanging protocol
227
154
                */
228
155
                class HangingProtocol {
229
156
                public:
230
157
                        typedef std::list<GNC::GCS::Ptr<Layout> > TListOfLayouts;
231
 
                        typedef std::map<std::string, GNC::GCS::Ptr<DefaultModalitySettings> > TMapOfModalitySettings;
232
158
                        HangingProtocol();
233
159
                        /**
234
160
                        deserialize from xml
236
162
                        HangingProtocol(wxXmlNode* node);
237
163
                        HangingProtocol(const HangingProtocol& other);
238
164
                        ~HangingProtocol();
239
 
                        void LoadDefaultModalitySettings();
240
165
                        /**
241
166
                        serialize to XML
242
167
                        */
262
187
                        const TListOfLayouts& getLayouts();
263
188
                        void addLayout(const GNC::GCS::Ptr<Layout>& layout);
264
189
                        void clearLayouts();
265
 
                        const TMapOfModalitySettings& getModalitySettingsMap();
266
 
                        void addModalitySettings(const GNC::GCS::Ptr<DefaultModalitySettings>& settings);
267
 
                        void clearModalitySettings();
268
 
                        GNC::GCS::Ptr<DefaultModalitySettings> getModalitySettings(const std::string& modality);
269
190
                        std::map<std::string, std::string>& getProperties();
270
191
                        void setProperties(const std::map<std::string, std::string>& properties);
271
192
                        bool isActive();
294
215
                        layout of the protocol
295
216
                        */
296
217
                        TListOfLayouts layouts;
297
 
                        /**
298
 
                        visualization modality settings
299
 
                        */
300
 
                        TMapOfModalitySettings modalitySettings;
301
218
                        /*
302
219
                        here modules can insert key/value properies
303
220
                        */