Merge lp:~forsslundsystems/forssim/forssim_0.2.6 into lp:forssim
- forssim_0.2.6
- Merge into development
Proposed by
Ulrika Dreifaldt
Status: | Needs review |
---|---|
Proposed branch: | lp:~forsslundsystems/forssim/forssim_0.2.6 |
Merge into: | lp:forssim |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~forsslundsystems/forssim/forssim_0.2.6 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
JohanO (community) | Approve | ||
Forsslund Systems | Pending | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
- 345. By Ulrika Dreifaldt
-
updated changelog
Unmerged revisions
- 345. By Ulrika Dreifaldt
-
updated changelog
- 344. By Ulrika Dreifaldt
-
updated CHANGELOG, INSTALL and VersionNo
- 343. By Ulrika Dreifaldt
- 342. By Ulrika Dreifaldt
-
lp:~daniel-stehn/forssim/MemoryFix_for_Perform_selected_exercise
- 341. By Ulrika Dreifaldt
-
merged from lp:~jocke-karlsson/forssim/removedVoxels
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CHANGELOG' |
2 | --- CHANGELOG 2009-09-11 12:29:09 +0000 |
3 | +++ CHANGELOG 2009-09-18 09:55:28 +0000 |
4 | @@ -1,138 +1,135 @@ |
5 | - |
6 | ------------------------------------------------------------- |
7 | -revno: 343 |
8 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
9 | -branch nick: forssim |
10 | -timestamp: Fri 2009-09-11 14:22:53 +0200 |
11 | -message: |
12 | - Updated version number |
13 | ------------------------------------------------------------- |
14 | -revno: 342 |
15 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
16 | -branch nick: forssim |
17 | -timestamp: Fri 2009-09-11 14:21:37 +0200 |
18 | -message: |
19 | - Merged from lp:~jonas.forsslund/forssim/403552 |
20 | - ------------------------------------------------------------ |
21 | - revno: 327.5.1 |
22 | - committer: funkis <funkis@ubuntu> |
23 | - branch nick: 403552 |
24 | - timestamp: Tue 2009-08-18 19:49:45 +0200 |
25 | - message: |
26 | - Solved 403552 by description in INSTALL |
27 | ------------------------------------------------------------- |
28 | -revno: 341 |
29 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
30 | -branch nick: forssim |
31 | -timestamp: Fri 2009-09-11 14:06:59 +0200 |
32 | -message: |
33 | - merged lp:~johan-schonning/forssim/dialogboxes_added |
34 | - ------------------------------------------------------------ |
35 | - revno: 336.2.1 |
36 | - committer: johansc <johansc@hiq-desktop> |
37 | - branch nick: dialogbox |
38 | - timestamp: Wed 2009-09-09 14:07:42 +0200 |
39 | - message: |
40 | - Dialog boxes added |
41 | ------------------------------------------------------------- |
42 | -revno: 340 |
43 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
44 | -branch nick: forssim |
45 | -timestamp: Fri 2009-09-11 13:59:10 +0200 |
46 | -message: |
47 | - merged lp:~jimmy-jonsson-hiq/forssim/Bug_423041_2 |
48 | - ------------------------------------------------------------ |
49 | - revno: 332.1.2 |
50 | - committer: Jimmy Jonsson <jimmy.jonsson@hiq.se> |
51 | - branch nick: Bug_423041 |
52 | - timestamp: Wed 2009-09-09 14:22:21 +0200 |
53 | - message: |
54 | - Bug_423041_2 |
55 | - ------------------------------------------------------------ |
56 | - revno: 332.1.1 |
57 | - committer: Jimmy Jonsson <jimmy.jonsson@hiq.se> |
58 | - branch nick: Bug_423041 |
59 | - timestamp: Mon 2009-09-07 16:13:58 +0200 |
60 | - message: |
61 | - Bug_423041 |
62 | -ulrikadr@ubuntu:~/forssim$ bzr log -r 3~.. |
63 | -bzr: ERROR: No namespace registered for string: u'3~' |
64 | -ulrikadr@ubuntu:~/forssim$ bzr log -r 335.. |
65 | ------------------------------------------------------------- |
66 | -revno: 343 |
67 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
68 | -branch nick: forssim |
69 | -timestamp: Fri 2009-09-11 14:22:53 +0200 |
70 | -message: |
71 | - Updated version number |
72 | ------------------------------------------------------------- |
73 | -revno: 342 |
74 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
75 | -branch nick: forssim |
76 | -timestamp: Fri 2009-09-11 14:21:37 +0200 |
77 | -message: |
78 | - Merged from lp:~jonas.forsslund/forssim/403552 |
79 | - ------------------------------------------------------------ |
80 | - revno: 327.5.1 |
81 | - committer: funkis <funkis@ubuntu> |
82 | - branch nick: 403552 |
83 | - timestamp: Tue 2009-08-18 19:49:45 +0200 |
84 | - message: |
85 | - Solved 403552 by description in INSTALL |
86 | ------------------------------------------------------------- |
87 | -revno: 341 |
88 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
89 | -branch nick: forssim |
90 | -timestamp: Fri 2009-09-11 14:06:59 +0200 |
91 | -message: |
92 | - merged lp:~johan-schonning/forssim/dialogboxes_added |
93 | - ------------------------------------------------------------ |
94 | - revno: 336.2.1 |
95 | - committer: johansc <johansc@hiq-desktop> |
96 | - branch nick: dialogbox |
97 | - timestamp: Wed 2009-09-09 14:07:42 +0200 |
98 | - message: |
99 | - Dialog boxes added |
100 | ------------------------------------------------------------- |
101 | -revno: 340 |
102 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
103 | -branch nick: forssim |
104 | -timestamp: Fri 2009-09-11 13:59:10 +0200 |
105 | -message: |
106 | - merged lp:~jimmy-jonsson-hiq/forssim/Bug_423041_2 |
107 | - ------------------------------------------------------------ |
108 | - revno: 332.1.2 |
109 | - committer: Jimmy Jonsson <jimmy.jonsson@hiq.se> |
110 | - branch nick: Bug_423041 |
111 | - timestamp: Wed 2009-09-09 14:22:21 +0200 |
112 | - message: |
113 | - Bug_423041_2 |
114 | - ------------------------------------------------------------ |
115 | - revno: 332.1.1 |
116 | - committer: Jimmy Jonsson <jimmy.jonsson@hiq.se> |
117 | - branch nick: Bug_423041 |
118 | - timestamp: Mon 2009-09-07 16:13:58 +0200 |
119 | - message: |
120 | - Bug_423041 |
121 | ------------------------------------------------------------- |
122 | -revno: 339 |
123 | -committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
124 | -branch nick: forssim |
125 | -timestamp: Fri 2009-09-11 11:42:12 +0200 |
126 | -message: |
127 | - merged from lp:~daniel-stehn/forssim/VolumeModelMemleakFix |
128 | - ------------------------------------------------------------ |
129 | - revno: 337.1.1 |
130 | - committer: daniel stehn <danielst@HIQSTOW047> |
131 | - branch nick: VolumeModelMemleakFix |
132 | - timestamp: Thu 2009-09-10 13:41:44 +0200 |
133 | - message: |
134 | - Fixed memory leaking ptr startTime |
135 | ------------------------------------------------------------- |
136 | -revno: 338 |
137 | +------------------------------------------------------------ |
138 | +revno: 343 |
139 | +committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
140 | +branch nick: forssim |
141 | +timestamp: Fri 2009-09-18 11:49:33 +0200 |
142 | +message: |
143 | + lp:~johan-schonning/forssim/warning_message_login |
144 | + ------------------------------------------------------------ |
145 | + revno: 336.2.2 |
146 | + committer: johansc <johansc@hiq-desktop> |
147 | + branch nick: dialogbox |
148 | + timestamp: Mon 2009-09-14 14:29:12 +0200 |
149 | + message: |
150 | + Warning_message_login |
151 | +------------------------------------------------------------ |
152 | +revno: 342 |
153 | +committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
154 | +branch nick: forssim |
155 | +timestamp: Fri 2009-09-18 11:48:14 +0200 |
156 | +message: |
157 | + lp:~daniel-stehn/forssim/MemoryFix_for_Perform_selected_exercise |
158 | + ------------------------------------------------------------ |
159 | + revno: 339.1.4 |
160 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
161 | + branch nick: forssimmemoryfixbranch |
162 | + timestamp: Fri 2009-09-18 08:49:45 +0200 |
163 | + message: |
164 | + added function CleanupX3dWindows |
165 | + ------------------------------------------------------------ |
166 | + revno: 339.1.3 |
167 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
168 | + branch nick: forssimmemoryfixbranch |
169 | + timestamp: Thu 2009-09-17 12:00:49 +0200 |
170 | + message: |
171 | + fixed memory leaks by destroying the windows and their resources |
172 | + ------------------------------------------------------------ |
173 | + revno: 339.1.2 |
174 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
175 | + branch nick: forssimmemoryfixbranch |
176 | + timestamp: Wed 2009-09-16 14:32:26 +0200 |
177 | + message: |
178 | + fix_for_bug_419190 |
179 | + ------------------------------------------------------------ |
180 | + revno: 339.1.1 |
181 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
182 | + branch nick: forssimmemoryfixbranch |
183 | + timestamp: Tue 2009-09-15 14:03:38 +0200 |
184 | + message: |
185 | + Initializing variables and pointers |
186 | +------------------------------------------------------------ |
187 | +revno: 341 |
188 | +committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
189 | +branch nick: forssim |
190 | +timestamp: Fri 2009-09-18 11:46:53 +0200 |
191 | +message: |
192 | + merged from lp:~jocke-karlsson/forssim/removedVoxels |
193 | + ------------------------------------------------------------ |
194 | + revno: 340.1.1 |
195 | + committer: Jocke Karlsson <jocke.karlsson@hiq.se> |
196 | + branch nick: removedVoxels |
197 | + timestamp: Fri 2009-09-18 10:23:43 +0200 |
198 | + message: |
199 | + Voxels drilled in forbidden segments are now stored for each drillstep seperately. |
200 | +------------------------------------------------------------ |
201 | +revno: 340 |
202 | committer: Jocke Karlsson <jocke.karlsson@hiq.se> |
203 | branch nick: forssim |
204 | -timestamp: Thu 2009-09-10 15:44:23 +0200 |
205 | -message: |
206 | - Removed some debug cout. |
207 | +timestamp: Wed 2009-09-16 13:04:14 +0200 |
208 | +message: |
209 | + Minor byggfix in volumemodel. |
210 | +ulrikadr@ubuntu:~/forssim$ bzr log -r338.. |
211 | +------------------------------------------------------------ |
212 | +revno: 343 |
213 | +committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
214 | +branch nick: forssim |
215 | +timestamp: Fri 2009-09-18 11:49:33 +0200 |
216 | +message: |
217 | + lp:~johan-schonning/forssim/warning_message_login |
218 | + ------------------------------------------------------------ |
219 | + revno: 336.2.2 |
220 | + committer: johansc <johansc@hiq-desktop> |
221 | + branch nick: dialogbox |
222 | + timestamp: Mon 2009-09-14 14:29:12 +0200 |
223 | + message: |
224 | + Warning_message_login |
225 | +------------------------------------------------------------ |
226 | +revno: 342 |
227 | +committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
228 | +branch nick: forssim |
229 | +timestamp: Fri 2009-09-18 11:48:14 +0200 |
230 | +message: |
231 | + lp:~daniel-stehn/forssim/MemoryFix_for_Perform_selected_exercise |
232 | + ------------------------------------------------------------ |
233 | + revno: 339.1.4 |
234 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
235 | + branch nick: forssimmemoryfixbranch |
236 | + timestamp: Fri 2009-09-18 08:49:45 +0200 |
237 | + message: |
238 | + added function CleanupX3dWindows |
239 | + ------------------------------------------------------------ |
240 | + revno: 339.1.3 |
241 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
242 | + branch nick: forssimmemoryfixbranch |
243 | + timestamp: Thu 2009-09-17 12:00:49 +0200 |
244 | + message: |
245 | + fixed memory leaks by destroying the windows and their resources |
246 | + ------------------------------------------------------------ |
247 | + revno: 339.1.2 |
248 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
249 | + branch nick: forssimmemoryfixbranch |
250 | + timestamp: Wed 2009-09-16 14:32:26 +0200 |
251 | + message: |
252 | + fix_for_bug_419190 |
253 | + ------------------------------------------------------------ |
254 | + revno: 339.1.1 |
255 | + committer: daniel-stehn <daniel.stehn@hiq.se> |
256 | + branch nick: forssimmemoryfixbranch |
257 | + timestamp: Tue 2009-09-15 14:03:38 +0200 |
258 | + message: |
259 | + Initializing variables and pointers |
260 | +------------------------------------------------------------ |
261 | +revno: 341 |
262 | +committer: Ulrika-Dreifaldt <ulrika.dreifaldt@hiq.se> |
263 | +branch nick: forssim |
264 | +timestamp: Fri 2009-09-18 11:46:53 +0200 |
265 | +message: |
266 | + merged from lp:~jocke-karlsson/forssim/removedVoxels |
267 | + ------------------------------------------------------------ |
268 | + revno: 340.1.1 |
269 | + committer: Jocke Karlsson <jocke.karlsson@hiq.se> |
270 | + branch nick: removedVoxels |
271 | + timestamp: Fri 2009-09-18 10:23:43 +0200 |
272 | + message: |
273 | + Voxels drilled in forbidden segments are now stored for each drillstep seperately. |
274 | |
275 | |
276 | === modified file 'FsWisdom/ApplicationNode.cpp' |
277 | --- FsWisdom/ApplicationNode.cpp 2009-09-07 14:13:58 +0000 |
278 | +++ FsWisdom/ApplicationNode.cpp 2009-09-18 09:48:14 +0000 |
279 | @@ -40,7 +40,16 @@ |
280 | forsDatabase(QSqlDatabase::addDatabase("QMYSQL")), |
281 | userId(-1), |
282 | forsCaseVersionId(-1), |
283 | -ftpAborted(false) |
284 | +myCDcommand(-1), |
285 | +ftpAborted(false), |
286 | +isMirrored(false), |
287 | +isStereo(false), |
288 | +isPlayback(false), |
289 | +volumeModel(NULL), |
290 | +materialSegmentationModel(NULL), |
291 | +forbiddenSegmentationModel(NULL), |
292 | +loggingNode(NULL), |
293 | +drillingStepsNode(NULL) |
294 | { |
295 | this->setOverrideCursor(QCursor(Qt::WaitCursor)); |
296 | |
297 | @@ -337,7 +346,9 @@ |
298 | |
299 | void ApplicationNode::exitX3DWithStandardGuiWindow() |
300 | { |
301 | - glWindow->stopTimer(); |
302 | + if( glWindow.get() ) |
303 | + glWindow->stopTimer(); |
304 | + |
305 | cout << "exitX3DWithStandardGuiWindow" <<endl; |
306 | if (this->isPlayback) |
307 | { |
308 | @@ -347,13 +358,15 @@ |
309 | { |
310 | case QMessageBox::Yes: |
311 | // back to select case menu |
312 | - glWindow->close(); |
313 | selectCaseWindow->setGeometry(QApplication::desktop()->availableGeometry(0)); |
314 | selectCaseWindow->showFullScreen(); |
315 | - removeWisdomToothWindow->close(); |
316 | + CleanupX3dWindows(); |
317 | + |
318 | return; |
319 | default: |
320 | - glWindow->startTimer(); |
321 | + if( glWindow.get() ) |
322 | + glWindow->startTimer(); |
323 | + |
324 | return; |
325 | } |
326 | } |
327 | @@ -417,7 +430,7 @@ |
328 | query.bindValue(":userCaseId", index ); |
329 | query.bindValue(":segmentId", -(*segmentIdFieldIterator)); |
330 | query.bindValue(":drillingStep", drillingStep); |
331 | - query.bindValue(":voxelsRemoved", forbiddenSegmentationModel->noOfVoxelsBoredByUser->getValue()[(*segmentIdFieldIterator)]); |
332 | + query.bindValue(":voxelsRemoved", forbiddenSegmentationModel->noOfForbiddenVoxelsDrilledByUser((*segmentIdFieldIterator),drillingStep)); |
333 | query.bindValue(":noVoxelsEqualToExpert", 0); |
334 | |
335 | if(query.exec()) |
336 | @@ -436,7 +449,6 @@ |
337 | query.bindValue(":voxelsRemoved", drillingStepsNode->noOfNonExpertVoxelsDrilledByUser(i,drillingStep) + drillingStepsNode->noOfExpertVoxelsDrilledByUser(i,drillingStep)); |
338 | query.bindValue(":noVoxelsEqualToExpert", drillingStepsNode->noOfExpertVoxelsDrilledByUser(i,drillingStep)); |
339 | |
340 | - |
341 | if(query.exec()){ |
342 | cout << "Added segment data to database" << query.lastError().databaseText ().toStdString()<< endl; |
343 | } |
344 | @@ -451,10 +463,10 @@ |
345 | // falls down into no |
346 | case QMessageBox::No: |
347 | // back to select case menu |
348 | - glWindow->close(); |
349 | selectCaseWindow->setGeometry(QApplication::desktop()->availableGeometry(0)); |
350 | selectCaseWindow->showFullScreenAndUpdate(); |
351 | - removeWisdomToothWindow->close(); |
352 | + CleanupX3dWindows(); |
353 | + |
354 | return; |
355 | default: |
356 | glWindow->startTimer(); |
357 | @@ -463,6 +475,25 @@ |
358 | } |
359 | } |
360 | |
361 | +bool ApplicationNode::CleanupX3dWindows() |
362 | +{ |
363 | + if( !glWindow.get() ) |
364 | + return false; |
365 | + |
366 | + if( !removeWisdomToothWindow.get() ) |
367 | + return false; |
368 | + |
369 | + //Destroy the RemovewisdomToothwindow and clear the autoptr |
370 | + removeWisdomToothWindow->DestroyRemoveWisdomToothWindow(); |
371 | + removeWisdomToothWindow.reset(); |
372 | + |
373 | + //Destroy the openGL window and all its data. Clear the autoptr |
374 | + glWindow->DestroyOpenGLWindow(); |
375 | + glWindow.reset(); |
376 | + |
377 | + return true; |
378 | +} |
379 | + |
380 | void ApplicationNode::launchX3D(const QDir& x3dFilePath) |
381 | { |
382 | if(!glWindow.get()) |
383 | |
384 | === modified file 'FsWisdom/ApplicationNode.h' |
385 | --- FsWisdom/ApplicationNode.h 2009-09-07 14:13:58 +0000 |
386 | +++ FsWisdom/ApplicationNode.h 2009-09-18 09:48:14 +0000 |
387 | @@ -64,6 +64,7 @@ |
388 | class SelectCaseWindow; |
389 | class RemoveWisdomToothWindow; |
390 | class GlWindowNode; |
391 | +class ForbiddenSegmentationModel; |
392 | |
393 | //old code |
394 | class Updater_QButton_SaveAndExit; |
395 | @@ -196,6 +197,7 @@ |
396 | * Data is stored in the database. Forbidden segements are stored with their segmentID negative. |
397 | */ |
398 | void exitX3DWithStandardGuiWindow(); |
399 | + bool CleanupX3dWindows(); |
400 | |
401 | void ftpCommandFinished(int commandID, bool error); |
402 | void ftpCommandStarted(int id); |
403 | |
404 | === modified file 'FsWisdom/GlWindowNode.cpp' |
405 | --- FsWisdom/GlWindowNode.cpp 2009-05-20 08:27:38 +0000 |
406 | +++ FsWisdom/GlWindowNode.cpp 2009-09-17 10:00:49 +0000 |
407 | @@ -110,18 +110,44 @@ |
408 | |
409 | void GlWindowNode::release() |
410 | { |
411 | - scene->window->clear(); |
412 | + if( scene.get() ) |
413 | + { |
414 | + if( scene->window.get() ) |
415 | + scene->window->clear(); |
416 | + } |
417 | } |
418 | |
419 | GlWindowNode::~GlWindowNode() |
420 | { |
421 | cout << "Destroying GlWindowNode" << endl; |
422 | - timer->stop(); |
423 | - defNodes->clear(); |
424 | - group->children->clear(); |
425 | + |
426 | + ClearAll(); |
427 | + |
428 | cout << "Destroyed GlWindowNode" << endl; |
429 | } |
430 | |
431 | +void GlWindowNode::ClearAll() |
432 | +{ |
433 | + |
434 | + if( timer.get() ) |
435 | + timer->stop(); |
436 | + |
437 | + if( defNodes.get() ) |
438 | + defNodes->clear(); |
439 | + |
440 | + if( group.get() ) |
441 | + { |
442 | + if( group->children.get() ) |
443 | + group->children->clear(); |
444 | + } |
445 | +} |
446 | + |
447 | +void GlWindowNode::DestroyOpenGLWindow() |
448 | +{ |
449 | + release(); |
450 | + ClearAll(); |
451 | +} |
452 | + |
453 | void GlWindowNode::initWindow() |
454 | { |
455 | glInit(); |
456 | |
457 | === modified file 'FsWisdom/GlWindowNode.h' |
458 | --- FsWisdom/GlWindowNode.h 2009-05-20 08:27:38 +0000 |
459 | +++ FsWisdom/GlWindowNode.h 2009-09-17 10:00:49 +0000 |
460 | @@ -81,6 +81,7 @@ |
461 | public slots: |
462 | /// refreshes the scene in a periodic fashion |
463 | void updateScene(); |
464 | + void DestroyOpenGLWindow(); |
465 | |
466 | protected: |
467 | void initializeGL(); |
468 | @@ -91,6 +92,7 @@ |
469 | static H3DNodeDatabase database; |
470 | |
471 | private: |
472 | + void ClearAll(); |
473 | |
474 | // the timer used to update the scene in the gl window |
475 | auto_ptr<QTimer> timer; |
476 | |
477 | === modified file 'FsWisdom/LocalCaseList.cpp' |
478 | --- FsWisdom/LocalCaseList.cpp 2009-09-09 12:22:21 +0000 |
479 | +++ FsWisdom/LocalCaseList.cpp 2009-09-15 12:03:38 +0000 |
480 | @@ -3,7 +3,9 @@ |
481 | using namespace FS; |
482 | |
483 | LocalCaseList::LocalCaseList(ApplicationNode *applicationNode, const QDir& caseDirectory, QFtp* Ftp) |
484 | - : caseDirectory(caseDirectory) |
485 | + : caseDirectory(caseDirectory), |
486 | +ftp(NULL), |
487 | +fileFtp(NULL) |
488 | { |
489 | this->applicationNode = applicationNode; |
490 | // build up a list of locally installed cases |
491 | |
492 | === modified file 'FsWisdom/ProgressDialog.cpp' |
493 | --- FsWisdom/ProgressDialog.cpp 2009-09-09 12:22:21 +0000 |
494 | +++ FsWisdom/ProgressDialog.cpp 2009-09-15 12:03:38 +0000 |
495 | @@ -17,7 +17,8 @@ |
496 | using namespace FS; |
497 | |
498 | ProgressDialog::ProgressDialog(ApplicationNode *a_applicationNode, const QString & labelText, const QString & cancelButtonText, int minimum, int maximum, QWidget *parent) |
499 | -:QProgressDialog(labelText,cancelButtonText,minimum,maximum,parent) |
500 | +:QProgressDialog(labelText,cancelButtonText,minimum,maximum,parent), |
501 | +maxValue(-1) |
502 | { |
503 | applicationNode = a_applicationNode; |
504 | aborted = false; |
505 | |
506 | === modified file 'FsWisdom/RegisterUserWindow.cpp' |
507 | --- FsWisdom/RegisterUserWindow.cpp 2009-08-14 10:57:29 +0000 |
508 | +++ FsWisdom/RegisterUserWindow.cpp 2009-09-14 12:29:12 +0000 |
509 | @@ -61,9 +61,15 @@ |
510 | } |
511 | else if((ui.usernameLineEdit->text()!="") && (ui.passwordLineEdit->text()=="")) |
512 | { |
513 | + QMessageBox::warning( this, "FsWisdom", |
514 | + "\nPlease enter password!\n"); |
515 | ui.passwordLineEdit->setFocus(); |
516 | + |
517 | } |
518 | - else |
519 | + else{ |
520 | + QMessageBox::warning( this, "FsWisdom", |
521 | + "\nPlease enter user name!\n"); |
522 | ui.usernameLineEdit->setFocus(); |
523 | + } |
524 | } |
525 | |
526 | |
527 | === modified file 'FsWisdom/RemoveWisdomToothWindow.cpp' |
528 | --- FsWisdom/RemoveWisdomToothWindow.cpp 2009-09-04 11:25:02 +0000 |
529 | +++ FsWisdom/RemoveWisdomToothWindow.cpp 2009-09-17 10:00:49 +0000 |
530 | @@ -3,9 +3,44 @@ |
531 | using namespace FS; |
532 | |
533 | RemoveWisdomToothWindow::RemoveWisdomToothWindow(ApplicationNode *applicationNode, bool playback, QWidget* parent) |
534 | -: QMainWindow(parent) |
535 | +: QMainWindow(parent), |
536 | +applicationNode(NULL), |
537 | +volumeModel(NULL), |
538 | +room(NULL), |
539 | +fakeCamera(NULL), |
540 | +patient(NULL), |
541 | +teeth(NULL), |
542 | +head(NULL), |
543 | +gumCut(NULL), |
544 | +teethGum(NULL), |
545 | +lowerTeeth(NULL), |
546 | +upperTeeth(NULL), |
547 | +floorOfMouth(NULL), |
548 | +tongue(NULL), |
549 | +hook(NULL), |
550 | +aDrillableNode(NULL), |
551 | +hapticDeviceNode(NULL), |
552 | +drillingStepsNode(NULL), |
553 | +materialSegmentationModel(NULL), |
554 | +forbiddenSegmentationModel(NULL), |
555 | +highlightNode(NULL), |
556 | +playbackNode(NULL), |
557 | +defaultValues(NULL), |
558 | +saveVolume(NULL), |
559 | +showHead(NULL), |
560 | +showRoom(NULL), |
561 | +drillable(NULL), |
562 | +showTeeth(NULL), |
563 | +deviceShape(NULL), |
564 | +vibrations(NULL), |
565 | +stateMachine(NULL), |
566 | +loggingNode(NULL), |
567 | +isPlayback(false), |
568 | +orgAngle(0.0), |
569 | +orgRot(0.0, 0.0, 0.0) |
570 | { |
571 | this->applicationNode = applicationNode; |
572 | + |
573 | ui.setupUi(this); |
574 | |
575 | ui.statisticsTableWidget->horizontalHeader()->setDefaultSectionSize(173); |
576 | @@ -323,6 +358,11 @@ |
577 | cout << "Destroying RemoveWisdomToothWindow"<<endl; |
578 | } |
579 | |
580 | +void RemoveWisdomToothWindow::DestroyRemoveWisdomToothWindow() |
581 | +{ |
582 | + this->destroy(true, true ); |
583 | +} |
584 | + |
585 | void RemoveWisdomToothWindow::decrementCurrentDrillingStep() |
586 | { |
587 | drillingStepsNode->decrementCurrentDrillingStep(); |
588 | |
589 | === modified file 'FsWisdom/RemoveWisdomToothWindow.h' |
590 | --- FsWisdom/RemoveWisdomToothWindow.h 2009-09-02 09:21:36 +0000 |
591 | +++ FsWisdom/RemoveWisdomToothWindow.h 2009-09-17 10:00:49 +0000 |
592 | @@ -66,9 +66,9 @@ |
593 | ~RemoveWisdomToothWindow(); |
594 | |
595 | void initialize(bool playback); |
596 | - |
597 | void setupStatistics(); |
598 | void setupObjectives(); |
599 | + void DestroyRemoveWisdomToothWindow(); |
600 | |
601 | private slots: |
602 | |
603 | |
604 | === modified file 'FsWisdom/SelectCaseWindow.cpp' |
605 | --- FsWisdom/SelectCaseWindow.cpp 2009-09-11 12:06:59 +0000 |
606 | +++ FsWisdom/SelectCaseWindow.cpp 2009-09-16 12:32:26 +0000 |
607 | @@ -188,9 +188,20 @@ |
608 | "\nNo performed exercise selected! \n"); |
609 | } |
610 | else{ |
611 | - //Display application window |
612 | - cout<< " the File to be lauched now " << x3dFilePath.path().toStdString()<<endl; |
613 | - applicationNode->launchX3DWithStandardGuiWindow(x3dFilePath, isPlayback, forsCaseVersionId); |
614 | + //Check if x3d file exists |
615 | + QFileInfo fi( x3dFilePath.path()); |
616 | + |
617 | + if( !fi.exists() ) |
618 | + { |
619 | + cout<< "Missing file " << x3dFilePath.path().toStdString() << "aborting launch" <<endl; |
620 | + QMessageBox::critical( this, "FsWisdom", "\nYour cases has been deleted! Please log out and log in again to reload cases.\n"); |
621 | + } |
622 | + else |
623 | + { |
624 | + //Display application window |
625 | + cout<< " the File to be lauched now " << x3dFilePath.path().toStdString()<<endl; |
626 | + applicationNode->launchX3DWithStandardGuiWindow(x3dFilePath, isPlayback, forsCaseVersionId); |
627 | + } |
628 | } |
629 | |
630 | |
631 | |
632 | === modified file 'FsWisdom/SelectCaseWindow.h' |
633 | --- FsWisdom/SelectCaseWindow.h 2009-08-12 06:49:46 +0000 |
634 | +++ FsWisdom/SelectCaseWindow.h 2009-09-16 12:32:26 +0000 |
635 | @@ -2,6 +2,7 @@ |
636 | #define SELECTCASEWINDOW_H |
637 | |
638 | #include <QtGui/QMainWindow> |
639 | +#include <QFileInfo> |
640 | #include "ui_SelectCaseWindow.h" |
641 | #include "ApplicationNode.h" |
642 | #include "QDebugStream.h" |
643 | |
644 | === modified file 'FsWisdom/VersionNo.h' |
645 | --- FsWisdom/VersionNo.h 2009-09-11 12:22:53 +0000 |
646 | +++ FsWisdom/VersionNo.h 2009-09-18 09:55:28 +0000 |
647 | @@ -8,6 +8,6 @@ |
648 | #ifndef VERSIONNO_H_ |
649 | #define VERSIONNO_H_ |
650 | |
651 | -#define PRODUCTVER "0.2.5" |
652 | +#define PRODUCTVER "0.2.6" |
653 | |
654 | #endif /* VERSIONNO_H_ */ |
655 | |
656 | === modified file 'INSTALL' |
657 | --- INSTALL 2009-09-11 12:29:09 +0000 |
658 | +++ INSTALL 2009-09-18 09:55:28 +0000 |
659 | @@ -1,6 +1,6 @@ |
660 | - |
661 | Forssim 0.2.4 |
662 | + |
663 | Forssim 0.2.6 |
664 | |
665 | -This release is corresponding to forssim_dependencies_0.2.5 |
666 | which has to be installed before you install Forssim 0.2.5. |
667 | +This release is corresponding to forssim_dependencies_0.2.5 |
668 | which has to be installed before you install Forssim 0.2.6. |
669 | Download and install dependencies: |
670 | |
671 | forssim_dependencies_0.2.5.tar.gz |
672 | @@ -19,10 +19,10 @@ |
673 | ./make -j3 |
674 | to build all dependencies and locally install some shaders for the volume rendering. |
675 | |
676 | -When all dependencies are installed, you need to download and install Forssim 0.2.5. |
677 | -Download forssim_0.2.5.tar.gz |
678 | -tar -xzvf forssim_0.2.5.tar.gz |
679 | -cd forssim_0.2.5 |
680 | +When all dependencies are installed, you need to download and install Forssim 0.2.6. |
681 | +Download forssim_0.2.6.tar.gz |
682 | +tar -xzvf forssim_0.2.6.tar.gz |
683 | +cd forssim_0.2.6 |
684 | |
685 | |
686 | ./makeAll -j3 |
687 | @@ -32,9 +32,9 @@ |
688 | ./makedoc |
689 | |
690 | |
691 | -You will find the generated pdf-document in folder /forssim_0.2.5/Doxypaper/latex. |
692 | +You will find the generated pdf-document in folder /forssim_0.2.6/Doxypaper/latex. |
693 | |
694 | -To try the simulator run ./run_one_cylinder in /forssim_0.2.5. |
695 | +To try the simulator run ./run_one_cylinder in /forssim_0.2.6. |
696 | |
697 | |
698 | To run FsWisdom you need to have obtained a user name and password from |
699 | |
700 | === modified file 'src/DrillingStepsNode.cpp' |
701 | --- src/DrillingStepsNode.cpp 2009-08-12 11:49:25 +0000 |
702 | +++ src/DrillingStepsNode.cpp 2009-09-18 08:23:43 +0000 |
703 | @@ -255,14 +255,13 @@ |
704 | hasUserBoredThisDrillingStep = false; |
705 | currentDrillingStepId = (currentDrillingStepId%noOfDrillingSteps)+1; |
706 | |
707 | - |
708 | - |
709 | cout << "Current Drilling Step Id: "<< (unsigned int)currentDrillingStepId<<endl; |
710 | cout << "StartTime: " << drillingStepData[currentDrillingStepId-1].startTime<<endl; |
711 | cout << "FinishTime: " << drillingStepData[currentDrillingStepId-1].finishTime<<endl; |
712 | |
713 | // Inform the highlight module to redraw information based on new expert step |
714 | engageHighlightField->setValue(true,this->id); |
715 | + forbiddenSegmentationModelNode->incrementCurrentDrillingStep(); |
716 | } |
717 | |
718 | void DrillingStepsNode::decrementCurrentDrillingStep() |
719 | @@ -280,6 +279,7 @@ |
720 | |
721 | // Inform the highlight module to redraw information based on new expert step |
722 | engageHighlightField->setValue(true,this->id); |
723 | + forbiddenSegmentationModelNode->decrementCurrentDrillingStep(); |
724 | } |
725 | |
726 | void DrillingStepsNode::addDrillingStep() |
727 | |
728 | === modified file 'src/ForbiddenSegmentationModel.cpp' |
729 | --- src/ForbiddenSegmentationModel.cpp 2009-05-04 08:14:06 +0000 |
730 | +++ src/ForbiddenSegmentationModel.cpp 2009-09-18 08:23:43 +0000 |
731 | @@ -67,15 +67,34 @@ |
732 | } |
733 | |
734 | // initialize the noOfVoxelsBoredByUser list with zeros |
735 | + //noOfVoxelsBoredByUser is kept for now. It is used (only?) for displaying number |
736 | + //of voxels removed in the GUI (the GUI should use vForbiddenDrillingStepData). |
737 | + //This is total number removed, not removed in each drillstep. |
738 | unsigned int size = (segmentIdField->getValue()).size()+1; |
739 | - H3DInt32* data = new H3DInt32[size]; |
740 | + H3DInt32* data2 = new H3DInt32[size]; |
741 | for(unsigned int i = 0; i< size;i++) |
742 | - data[i] = 0; |
743 | - noOfVoxelsBoredByUser->setValueFromVoidPtr(data,size,size*sizeof(H3DInt32),this->id); |
744 | - delete[] data; |
745 | + data2[i] = 0; |
746 | + noOfVoxelsBoredByUser->setValueFromVoidPtr(data2,size,size*sizeof(H3DInt32),this->id); |
747 | + delete[] data2; |
748 | + |
749 | + //A vector with struct containing drilled data in each drill step. |
750 | + forbiddenDrillingStepData_t sForbiddenDrillingStepData; |
751 | + noOfDrillingSteps = 2; |
752 | + |
753 | + for(unsigned char i = 1; i<=noOfDrillingSteps;i++) |
754 | + { |
755 | + cout <<"Adding initializingdata to struct, Forbidden Segmentation Model "<<endl; |
756 | + H3DInt32* data = new H3DInt32[size]; |
757 | + for(unsigned int i = 0; i< size;i++) |
758 | + data[i] = 0; |
759 | + sForbiddenDrillingStepData.noOfForbiddenVoxelsBoredByUser.setValueFromVoidPtr(data,size,size*sizeof(H3DInt32),this->id); |
760 | + delete[] data; |
761 | + this->vForbiddenDrillingStepData.push_back(sForbiddenDrillingStepData); |
762 | + } |
763 | + |
764 | + currentDrillingStepId = 1; |
765 | |
766 | X3DChildNode::initialize(); |
767 | - |
768 | cout<<"Forbidden Segmentation Model Initialized"<<endl; |
769 | } |
770 | |
771 | @@ -94,8 +113,11 @@ |
772 | else |
773 | index = getSegmentIdFieldIndex(segmentId)+1; |
774 | |
775 | - unsigned int currentValue = noOfVoxelsBoredByUser->getValue(this->id)[index]; |
776 | - noOfVoxelsBoredByUser->setValue(index, ++currentValue,this->id); |
777 | + unsigned int currentValue2 = noOfVoxelsBoredByUser->getValue(this->id)[index]; |
778 | + noOfVoxelsBoredByUser->setValue(index, ++currentValue2,this->id); |
779 | + |
780 | + unsigned int currentValue = this->vForbiddenDrillingStepData[currentDrillingStepId-1].noOfForbiddenVoxelsBoredByUser.getValue(this->id)[index]; |
781 | + this->vForbiddenDrillingStepData[currentDrillingStepId-1].noOfForbiddenVoxelsBoredByUser.setValue(index, ++currentValue,this->id); |
782 | } |
783 | |
784 | const std::vector<unsigned char> ForbiddenSegmentationModel::getSegmentIds() |
785 | @@ -159,3 +181,20 @@ |
786 | return false; |
787 | } |
788 | |
789 | +void ForbiddenSegmentationModel::incrementCurrentDrillingStep() |
790 | +{ |
791 | + //currentDrillingStepId = (currentDrillingStepId%noOfDrillingSteps)+1; |
792 | + currentDrillingStepId++; |
793 | +} |
794 | + |
795 | +void ForbiddenSegmentationModel::decrementCurrentDrillingStep() |
796 | +{ |
797 | + //currentDrillingStepId = (currentDrillingStepId%noOfDrillingSteps)+1; |
798 | + currentDrillingStepId--; |
799 | +} |
800 | + |
801 | +int ForbiddenSegmentationModel::noOfForbiddenVoxelsDrilledByUser(int segmentID, int drillingStepId) |
802 | +{ |
803 | + return vForbiddenDrillingStepData[drillingStepId-1].noOfForbiddenVoxelsBoredByUser.getValue()[segmentID]; |
804 | +} |
805 | + |
806 | |
807 | === modified file 'src/ForbiddenSegmentationModel.h' |
808 | --- src/ForbiddenSegmentationModel.h 2009-03-26 08:28:57 +0000 |
809 | +++ src/ForbiddenSegmentationModel.h 2009-09-18 08:23:43 +0000 |
810 | @@ -28,6 +28,16 @@ |
811 | class ForbiddenSegmentationModel : public H3D::X3DChildNode |
812 | { |
813 | public: |
814 | + |
815 | + /** |
816 | + * Information about Forbidden segments drilled in each drilling step |
817 | + */ |
818 | + struct forbiddenDrillingStepData_t |
819 | + { |
820 | + //The amount bored in each Forbidden segment by the user. |
821 | + H3D::MFInt32 noOfForbiddenVoxelsBoredByUser; |
822 | + }; |
823 | + |
824 | /** |
825 | * Constructor |
826 | * \param segmentIdField A list of Forbidden Segment Ids, INITIALIZE_ONLY Field |
827 | @@ -57,6 +67,22 @@ |
828 | const std::vector<unsigned char> getSegmentIds(); |
829 | |
830 | /** |
831 | + * Increment by one the current drilling step. |
832 | + */ |
833 | + void incrementCurrentDrillingStep(); |
834 | + |
835 | + /** |
836 | + * Decrement by one the current drilling step. |
837 | + */ |
838 | + void decrementCurrentDrillingStep(); |
839 | + |
840 | + /** |
841 | + * Returns the number of voxels drilled by the user in each drillstep for each forbidden segment, |
842 | + * with the undefined segment value stored as the first value in the noOfForbiddenVoxelsBoredByUser field. |
843 | + */ |
844 | + int noOfForbiddenVoxelsDrilledByUser(int segmentID, int drillingStepId); |
845 | + |
846 | + /** |
847 | * The H3DNodeDatabase for this node. |
848 | */ |
849 | static H3D::H3DNodeDatabase database; |
850 | @@ -97,6 +123,9 @@ |
851 | const bool existsInSegmentIdField(const unsigned char& segmentId); |
852 | const bool existsInSegmentNameField(const string& segmentName); |
853 | const unsigned char getSegmentIdFieldIndex(const unsigned char& segmentId); |
854 | + std::vector<forbiddenDrillingStepData_t> vForbiddenDrillingStepData; //Vector with amount bored in each Forbidden segment and in each drilling step by the user. |
855 | + int noOfDrillingSteps; |
856 | + int currentDrillingStepId; |
857 | }; |
858 | } |
859 |
Ok. All previous bugs rechecked.