3
* $Id: hangingprotocolcontroller.h $
6
* Copyright 2008-12 MetaEmotion S.L. All rights reserved.
7
* http://ginkgo-cadx.com
9
* This file is licensed under LGPL v3 license.
10
* See License.txt for details
3
* $Id: hangingprotocolcontroller.h $
6
* Copyright 2008-14 MetaEmotion S.L. All rights reserved.
7
* http://ginkgo-cadx.com
9
* This file is licensed under LGPL v3 license.
10
* See License.txt for details
39
39
class IHangingProtocolContract
42
virtual wxWindow* createSeriesViewer(const std::map<std::string, std::string>& properties, long pk = -1, const GNC::GCS::Ptr<GNC::GCS::Matcher>& pMatcher = NULL) = 0;
42
virtual wxWindow* createSeriesSlot(const std::map<std::string, std::string>& properties, long pk = -1, const GNC::GCS::Ptr<GNC::GCS::Matcher>& pMatcher = NULL) = 0;
43
43
virtual const std::list<long>& getOpeningSeries() = 0;
153
* window level setting
155
class WindowLevelSetting
158
WindowLevelSetting();
159
WindowLevelSetting(double window, double level, const std::string& label);
160
WindowLevelSetting(wxXmlNode* node);
161
WindowLevelSetting(const WindowLevelSetting& other);
162
~WindowLevelSetting();
166
wxXmlNode* serialize();
168
double getWindow() const;
169
double getLevel() const;
170
const std::string& getLabel() const;
172
std::string toString() const;
174
void setWindow(double window);
175
void setLevel(double level);
176
void setLabel(const std::string& label);
185
* default modality settings
187
class DefaultModalitySettings
190
typedef enum TInterpolationMode{
191
TIM_NEAREST_NEIGHBOUR,
195
typedef std::list<GNC::GCS::Ptr<WindowLevelSetting> > TListOfWLSettings;
196
DefaultModalitySettings();
197
DefaultModalitySettings(wxXmlNode* node);
198
DefaultModalitySettings(const DefaultModalitySettings& other);
199
~DefaultModalitySettings();
203
wxXmlNode* serialize();
205
static std::string getDefaultWindowLevelLabel();
206
static std::string getAutocalculateWindowLevelLabel();
208
const TListOfWLSettings& getWLSettings() const;
209
const std::string& getModality() const;
210
const std::string& getInitialWindowLevelLabel() const;
211
TInterpolationMode getInterpolationMode() const;
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);
219
std::string modality;
220
std::string initialWindowLevelLabel;
221
TInterpolationMode interpolationMode;
222
TListOfWLSettings listOfWLSettings;
153
226
HangingProtocol class, defines a hanging protocol
155
228
class HangingProtocol {
157
230
typedef std::list<GNC::GCS::Ptr<Layout> > TListOfLayouts;
231
typedef std::map<std::string, GNC::GCS::Ptr<DefaultModalitySettings> > TMapOfModalitySettings;
158
232
HangingProtocol();
160
234
deserialize from xml
187
262
const TListOfLayouts& getLayouts();
188
263
void addLayout(const GNC::GCS::Ptr<Layout>& layout);
189
264
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);
190
269
std::map<std::string, std::string>& getProperties();
191
270
void setProperties(const std::map<std::string, std::string>& properties);