MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
CSOScopeEvents.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2012, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13
18
19#pragma once
20
21#include "MLCSOIncludes.h"
22#include "CSOEvent.h"
23
25
26class CSO;
27class CSOList;
28
30
43
45
49{
50public:
51 CSOModuleEventGroupScope(CSOList* csoList, const std::string& senderType = "", const std::string& senderName = "",
52 const std::string& customMessage = "", CSOIdVector csoIds = CSOIdVector());
53
55
57 {
58 return _uniqueId;
59 }
60
61private:
62 MLuint64 _uniqueId;
63
64 std::string _senderType;
65 std::string _senderName;
66 std::string _customMessage;
67
68 CSOList* _csoList;
69};
70
72
75{
76public:
77 CSOAttributeChangeScope(CSOList* csoList, unsigned int csoId, CSOEvent::CSOEventType eventType);
78};
79
81
84{
85public:
86 CSOGeometryChangeScope(CSOList* csoList, unsigned int csoId);
88};
89
91
94{
95public:
96 CSOModificationScope(CSOList* csoList, unsigned int csoId);
98};
99
101
114
116
123
125
128{
129public:
132 void setId(unsigned int groupId)
133 {
134 _groupId = groupId;
135 }
136
137private:
138 CSOList* _csoList;
139 unsigned int _groupId;
140};
141
143
146{
147public:
150 void setId(unsigned int csoId)
151 {
152 _csoId = csoId;
153 }
154
155private:
156 CSOList* _csoList;
157 unsigned int _csoId;
158};
159
161
164{
165public:
168 void setId(unsigned int csoId)
169 {
170 _csoId = csoId;
171 }
172
173private:
174 CSOList* _csoList;
175 unsigned int _csoId;
176};
177
178
180
183{
184public:
185 CSOSelectionChangeScope(CSOList* csoList, unsigned int csoId);
188
189private:
190 void _sendPreEvent();
191 CSOList* _csoList;
192 CSOIdVector _csoIds;
193};
194
196
199{
200public:
201 CSOGroupSelectionChangeScope(CSOList* csoList, unsigned int groupId);
204
205private:
206 void _sendPreEvent();
207 CSOList* _csoList;
208 CSOIdVector _groupIds;
209};
210
212
214
217{
218public:
219 CSOAddToGroupScope(CSOList* csoList, unsigned int csoId, unsigned int groupId);
221
222private:
223 CSOList* _csoList;
224 unsigned int _csoId;
225 unsigned int _groupId;
226};
227
229
232{
233public:
234 CSORemoveFromGroupScope(CSOList* csoList, unsigned int csoId, unsigned int groupId);
235 CSORemoveFromGroupScope(CSOList* csoList, const CSOIdVector& csoIds, unsigned int groupId);
236 CSORemoveFromGroupScope(CSOList* csoList, unsigned int csoId, const CSOIdVector& groupIds);
238
239private:
240 bool _shouldSendEvents();
241 void _sendPreEvent();
242 CSOList* _csoList;
243 CSOIdVector _csoIds;
244 CSOIdVector _groupIds;
245};
246
std::vector< unsigned int > CSOIdVector
Defines a vector to hold CSO and CSOGroup IDs.
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Definition MLCSOSystem.h:23
Class for sending event when a CSO has been added.
void setId(unsigned int csoId)
CSOAddScope(CSOList *csoList)
Class for sending events when a CSO was added to a CSOGroup.
CSOAddToGroupScope(CSOList *csoList, unsigned int csoId, unsigned int groupId)
Class for sending events when visual attribute of a CSO have changed.
CSOAttributeChangeScope(CSOList *csoList, unsigned int csoId, CSOEvent::CSOEventType eventType)
Base class for event grouping / pre-/post-command of changes of a CSO.
CSOChangeEventScope(CSOList *csoList, unsigned int id, CSOEvent::CSOEventType eventType)
CSOEvent::CSOEventType _eventType
Class for sending event when a CSO has been created.
CSOCreationScope(CSOList *csoList)
void setId(unsigned int csoId)
CSOEventType
Enumeration for specifying the exact type of event.
Definition CSOEvent.h:47
Class for sending events when the geometry of a CSO has changed.
CSOGeometryChangeScope(CSOList *csoList, unsigned int csoId)
Class for sending events when a CSOGroup has been added.
void setId(unsigned int groupId)
CSOGroupAddScope(CSOList *csoList)
Class for sending events when visual attributes of a CSOGroup have changed.
CSOGroupAttributeChangeScope(CSOList *csoList, unsigned int csoId, CSOEvent::CSOEventType eventType)
Base class for event grouping / pre-/post-command of changes of a CSOGroup.
CSOGroupChangeEventScope(CSOList *csoList, unsigned int groupId, CSOEvent::CSOEventType eventType)
CSOEvent::CSOEventType _eventType
Class for sending events when the selection of CSOGroups has been changed.
CSOGroupSelectionChangeScope(CSOList *csoList, unsigned int groupId)
CSOGroupSelectionChangeScope(CSOList *csoList, const CSOIdVector &groupIds)
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition CSOList.h:61
Class for sending events when a CSO was changed by an algorithm.
CSOModificationScope(CSOList *csoList, unsigned int csoId)
This class is to be used in modules, not in the CSO base library.
CSOModuleEventGroupScope(CSOList *csoList, const std::string &senderType="", const std::string &senderName="", const std::string &customMessage="", CSOIdVector csoIds=CSOIdVector())
Class for sending events when a CSO was removed from a CSOGroup.
CSORemoveFromGroupScope(CSOList *csoList, const CSOIdVector &csoIds, unsigned int groupId)
CSORemoveFromGroupScope(CSOList *csoList, unsigned int csoId, const CSOIdVector &groupIds)
CSORemoveFromGroupScope(CSOList *csoList, unsigned int csoId, unsigned int groupId)
Class for sending events when the selection of CSOs has been changed.
CSOSelectionChangeScope(CSOList *csoList, const CSOIdVector &csoIds)
CSOSelectionChangeScope(CSOList *csoList, unsigned int csoId)
The CSO represents a contour segmentation object.
Definition CSO.h:44
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
UINT64 MLuint64
Introduce platform-independent 64-bit unsigned integer type.
Definition mlTypeDefs.h:424