MeVisLab Toolbox Reference
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 CSOList;
27
29
41
43
47{
48public:
50 const std::string& senderType="",
51 const std::string& senderName="",
52 const std::string& customMessage="",
53 CSOIdVector csoIds = CSOIdVector());
54
56
57 MLuint64 getUniqueId() { return _uniqueId; }
58
59private:
60 MLuint64 _uniqueId;
61
62 std::string _senderType;
63 std::string _senderName;
64 std::string _customMessage;
65
66 CSOList* _csoList;
67};
68
70
73{
74public:
75 CSOAttributeChangeScope(CSOList* csoList, unsigned int csoId, CSOEvent::CSOEventType eventType);
76};
77
79
82{
83public:
84 CSOGeometryChangeScope(CSOList* csoList, unsigned int csoId);
86};
87
89
92{
93public:
94 CSOModificationScope(CSOList* csoList, unsigned int csoId);
96};
97
99
111
113
120
122
125{
126public:
129 void setId(unsigned int groupId) { _groupId = groupId; }
130private:
131 CSOList* _csoList;
132 unsigned int _groupId;
133};
134
136
139{
140public:
143 void setId(unsigned int csoId) { _csoId = csoId; }
144private:
145 CSOList* _csoList;
146 unsigned int _csoId;
147};
148
150
153{
154public:
157 void setId(unsigned int csoId) { _csoId = csoId; }
158private:
159 CSOList* _csoList;
160 unsigned int _csoId;
161};
162
163
165
168{
169public:
170 CSOSelectionChangeScope(CSOList* csoList, unsigned int csoId);
173
174private:
175 void _sendPreEvent();
176 CSOList* _csoList;
177 CSOIdVector _csoIds;
178};
179
181
184{
185public:
186 CSOGroupSelectionChangeScope(CSOList* csoList, unsigned int groupId);
189
190private:
191 void _sendPreEvent();
192 CSOList* _csoList;
193 CSOIdVector _groupIds;
194};
195
197
199
202{
203public:
204 CSOAddToGroupScope(CSOList* csoList, unsigned int csoId, unsigned int groupId);
206private:
207 CSOList* _csoList;
208 unsigned int _csoId;
209 unsigned int _groupId;
210};
211
213
216{
217public:
218 CSORemoveFromGroupScope(CSOList* csoList, unsigned int csoId, unsigned int groupId);
219 CSORemoveFromGroupScope(CSOList* csoList, const CSOIdVector& csoIds, unsigned int groupId);
220 CSORemoveFromGroupScope(CSOList* csoList, unsigned int csoId, const CSOIdVector& groupIds);
222
223private:
224 bool _shouldSendEvents();
225 void _sendPreEvent();
226 CSOList* _csoList;
227 CSOIdVector _csoIds;
228 CSOIdVector _groupIds;
229};
230
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 if a CSO has been added.
void setId(unsigned int csoId)
CSOAddScope(CSOList *csoList)
Class for sending events if a CSO was added to a Group.
CSOAddToGroupScope(CSOList *csoList, unsigned int csoId, unsigned int groupId)
Class for sending events if 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 if 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:49
Class for sending events if the geometry of a CSO has changed.
CSOGeometryChangeScope(CSOList *csoList, unsigned int csoId)
Class for sending events if a CSOGroup has been added.
void setId(unsigned int groupId)
CSOGroupAddScope(CSOList *csoList)
Class for sending events if 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 if 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 if 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 if a CSO was removed from a Group.
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 if 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:425