Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkFiberBundleThreadMonitor.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
19 
20 
21 
23 : m_monitorBracketOpen("[")
24 , m_monitorBracketClose("]")
25 , m_monitorHeading("Monitoring Fiberprocessing Threads")
26 , m_monitorMask("Thread Status:\nStarted: Finished: Terminated:")
27 , m_monitorStatus("_initialized")
28 , m_monitorStarted(0)
29 , m_monitorFinished(0)
30 , m_monitorTerminated(0)
31 {
32  m_monitorBracketOpenPosition[0] = 0;
33  m_monitorBracketOpenPosition[1] = 0;
34  m_monitorBracketClosePosition[0] = 0;
35  m_monitorBracketClosePosition[1] = 0;
36  m_monitorHeadingPosition[0] = 0;
37  m_monitorHeadingPosition[1] = 0;
38  m_monitorMaskPosition[0] = 0;
39  m_monitorMaskPosition[1] = 0;
40  m_monitorStatusPosition[0] = 0;
41  m_monitorStatusPosition[1] = 0;
42  m_monitorStartedPosition[0] = 0;
43  m_monitorStartedPosition[1] = 0;
44  m_monitorFinishedPosition[0] = 0;
45  m_monitorFinishedPosition[1] = 0;
46  m_monitorTerminatedPosition[0] = 0;
47  m_monitorTerminatedPosition[1] = 0;
48 
49 
50  m_monitorHeadingOpacity = 0;
51  m_monitorMaskOpacity = 0;
52  m_monitorTerminatedOpacity = 0;
53  m_monitorFinishedOpacity = 0;
54  m_monitorStartedOpacity = 0;
55  m_monitorStatusOpacity = 0;
56 }
57 
59 {
60 
61 }
62 
63 
65  return m_monitorBracketOpen;
66 }
68  return m_monitorBracketOpenPosition;
69 }
71  m_monitorBracketOpenPosition[0] = pnt[0];
72  m_monitorBracketOpenPosition[1] = pnt[1];
73 }
74 
75 
76 
77 
79  return m_monitorBracketClose;
80 }
82  return m_monitorBracketClosePosition;
83 }
85  m_monitorBracketClosePosition[0] = pnt[0];
86  m_monitorBracketClosePosition[1] = pnt[1];
87 }
88 
89 
90 
92  return m_monitorHeading;
93 }
95  return m_monitorHeadingPosition;
96 }
98  m_monitorHeadingPosition[0] = pnt[0];
99  m_monitorHeadingPosition[1] = pnt[1];
100 }
102  return m_monitorHeadingOpacity;
103 }
105  m_monitorHeadingOpacity = opacity;
106 }
107 
108 
109 
110 
112  return m_monitorMask;
113 }
115  return m_monitorMaskPosition;
116 }
118  m_monitorMaskPosition[0] = pnt[0];
119  m_monitorMaskPosition[1] = pnt[1];
120 }
122  return m_monitorMaskOpacity;
123 }
125  m_monitorMaskOpacity = opacity;
126 }
127 
128 
129 
130 
131 
133  return m_monitorStatus;
134 }
136  m_statusMutex.lock();
137  m_monitorStatus = status;
138  m_statusMutex.unlock();
139 }
141  return m_monitorStatusPosition;
142 }
144  m_monitorStatusPosition[0] = pnt[0];
145  m_monitorStatusPosition[1] = pnt[1];
146 }
148  return m_monitorStatusOpacity;
149 }
151  m_monitorStatusOpacity = opacity;
152 }
153 
154 
156  return m_monitorStarted;
157 }
158 /* is thread safe :) */
160 {
161  m_startedMutex.lock();
162  m_monitorStarted = val;
163  m_startedMutex.unlock();
164 }
166  return m_monitorStartedPosition;
167 }
169  m_monitorStartedPosition[0] = pnt[0];
170  m_monitorStartedPosition[1] = pnt[1];
171 }
173  return m_monitorStartedOpacity;
174 }
176  m_monitorStartedOpacity = opacity;
177 }
178 
179 
180 
181 
183  return m_monitorFinished;
184 }
186 {
187  m_finishedMutex.lock();
188  m_monitorFinished = val;
189  m_finishedMutex.unlock();
190 }
192  return m_monitorFinishedPosition;
193 }
195  m_monitorFinishedPosition[0] = pnt[0];
196  m_monitorFinishedPosition[1] = pnt[1];
197 }
199  return m_monitorFinishedOpacity;
200 }
202  m_monitorFinishedOpacity = opacity;
203 }
204 
205 
206 
207 
209  return m_monitorTerminated;
210 }
212 {
213  m_terminatedMutex.lock();
214  m_monitorTerminated = val;
215  m_terminatedMutex.unlock();
216 }
218  return m_monitorTerminatedPosition;
219 }
221  m_monitorTerminatedPosition[0] = pnt[0];
222  m_monitorTerminatedPosition[1] = pnt[1];
223 }
225  return m_monitorTerminatedOpacity;
226 }
228  m_monitorTerminatedOpacity = opacity;
229 }
230 
231 
232 
233 /* ESSENTIAL IMPLEMENTATION OF SUPERCLASS METHODS */
235 {
236 
237 }
239 {
240 
241 }
243 {
244  return false;
245 }
247 {
248  return true;
249 }
250 void mitk::FiberBundleThreadMonitor::SetRequestedRegion(const itk::DataObject *data )
251 {
252 
253 }
254 
virtual void SetRequestedRegion(const itk::DataObject *data)
Set the requested region from this data object to match the requested region of the data object passe...
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion()
Determine whether the RequestedRegion is outside of the BufferedRegion.
virtual void SetRequestedRegionToLargestPossibleRegion()
Set the RequestedRegion to the LargestPossibleRegion.
virtual bool VerifyRequestedRegion()
Verify that the RequestedRegion is within the LargestPossibleRegion.