Commit 6df89740086c4673bf19593608451abec5258ae2
1 parent
9b2ebaff
Refs: #4463
Implemented extract.
Showing
6 changed files
with
475 additions
and
96 deletions
400-SOURCECODE/AIAHTML5.Web/AIAHTML5.Web.csproj
... | ... | @@ -42905,6 +42905,7 @@ |
42905 | 42905 | <Content Include="login.html" /> |
42906 | 42906 | <Content Include="app\widget\MainView.html" /> |
42907 | 42907 | <Content Include="match-pixel-wp.js" /> |
42908 | + <Content Include="extract-wp.js" /> | |
42908 | 42909 | <Content Include="term-number-wp.js" /> |
42909 | 42910 | <Content Include="themes\default\css\bootstrap\3.3.6\bootstrap-theme.css" /> |
42910 | 42911 | <Content Include="themes\default\css\bootstrap\3.3.6\easyTree.css" /> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -46,7 +46,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
46 | 46 | $scope.zoomInOut = 75; |
47 | 47 | $scope.i = 0; |
48 | 48 | $scope.speachBubbleArray = []; |
49 | - $scope.multiAnnotationIsON = true; | |
49 | + $scope.multiAnnotationIsON = false; | |
50 | 50 | $scope.previousGrayImageDataVar; |
51 | 51 | $scope.previousGrayCanvas; |
52 | 52 | |
... | ... | @@ -1379,8 +1379,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1379 | 1379 | } |
1380 | 1380 | $scope.highLightBodyBasedOnIcolor = function (RGBColor) { |
1381 | 1381 | |
1382 | - // console.log(' $scope.highLightBodyBasedOnIcolor') | |
1383 | - | |
1382 | + debugger; | |
1384 | 1383 | //terminate previous running workers to create space for new workers |
1385 | 1384 | var workerCount = $scope.runningWorkers.length; |
1386 | 1385 | if (workerCount > 0) { |
... | ... | @@ -1420,67 +1419,96 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1420 | 1419 | var coloredImageDataVar; |
1421 | 1420 | var grayImageDataVar; |
1422 | 1421 | |
1422 | + var white; | |
1423 | + | |
1423 | 1424 | if (canvasId.match('_MR')) { |
1424 | 1425 | coloredImageDataVar = $rootScope.coloredImageMRCanvasList[bodyRegionId]; |
1425 | - | |
1426 | 1426 | |
1427 | - if ($scope.multiAnnotationIsON == true) | |
1428 | - { | |
1429 | 1427 | |
1430 | - grayImageDataVar = $rootScope.grayImageMRDataListCurrent[bodyRegionId] | |
1428 | + | |
1429 | + if ($rootScope.isExtract) { | |
1430 | + if ($scope.multiAnnotationIsON == true) { | |
1431 | + | |
1432 | + grayImageDataVar = $rootScope.grayImageMRDataListCurrent[bodyRegionId] | |
1433 | + } | |
1434 | + else | |
1435 | + white = $rootScope.whiteImageMRDataList[bodyRegionId]; | |
1431 | 1436 | } |
1432 | 1437 | else |
1433 | - grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
1434 | - | |
1435 | - if ($rootScope.isExtract) { | |
1438 | + { | |
1436 | 1439 | if ($scope.multiAnnotationIsON == true) { |
1437 | 1440 | |
1438 | 1441 | grayImageDataVar = $rootScope.grayImageMRDataListCurrent[bodyRegionId] |
1439 | 1442 | } |
1440 | 1443 | else |
1441 | - grayImageDataVar = $rootScope.whiteImageMRDataList[bodyRegionId]; | |
1444 | + grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
1445 | + | |
1442 | 1446 | } |
1447 | + | |
1443 | 1448 | } |
1444 | 1449 | |
1445 | 1450 | else { |
1446 | 1451 | |
1447 | 1452 | coloredImageDataVar = $rootScope.coloredImageCanvasList[bodyRegionId - 1]; |
1448 | - if ($scope.multiAnnotationIsON == true) { | |
1449 | - grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId - 1] | |
1450 | - } | |
1451 | - else | |
1452 | - grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; | |
1453 | - | |
1453 | + | |
1454 | 1454 | |
1455 | 1455 | if ($rootScope.isExtract) { |
1456 | 1456 | if ($scope.multiAnnotationIsON == true) { |
1457 | 1457 | |
1458 | - grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId] | |
1458 | + grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId-1] | |
1459 | + } | |
1460 | + else | |
1461 | + white = $rootScope.whiteImageDataList[bodyRegionId-1]; | |
1462 | + } | |
1463 | + else | |
1464 | + { | |
1465 | + if ($scope.multiAnnotationIsON == true) { | |
1466 | + grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId - 1] | |
1459 | 1467 | } |
1460 | 1468 | else |
1461 | - grayImageDataVar = $rootScope.whiteImageDataList[bodyRegionId]; | |
1469 | + grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; | |
1470 | + | |
1462 | 1471 | } |
1463 | 1472 | } |
1464 | 1473 | |
1465 | - //var coloredImageDataVar = $rootScope.coloredImageCanvasList[bodyRegionId - 1]; | |
1466 | - //var grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; | |
1474 | + if ($rootScope.isExtract == true) | |
1475 | + { | |
1476 | + var worker = new Worker('extract-wp.js'); | |
1477 | + | |
1478 | + //push workers in array to further used the refernece to delete the workers | |
1479 | + $scope.runningWorkers.push({ 'workerName': worker }) | |
1480 | + | |
1481 | + // console.log('for bodyRegionId = ' + bodyRegionId+ ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) | |
1482 | + worker.postMessage({ | |
1467 | 1483 | |
1468 | - var worker = new Worker('term-number-wp.js'); | |
1484 | + 'termList': TermList, | |
1485 | + 'maskCanvasData': maskData, | |
1486 | + 'coloredImageData': coloredImageDataVar, | |
1487 | + 'grayImageData': white, | |
1488 | + 'bodyRegionId': bodyRegionId, | |
1489 | + 'canvasId': canvasId | |
1469 | 1490 | |
1470 | - //push workers in array to further used the refernece to delete the workers | |
1471 | - $scope.runningWorkers.push({ 'workerName': worker }) | |
1491 | + }); | |
1492 | + } | |
1493 | + else { | |
1472 | 1494 | |
1473 | - // console.log('for bodyRegionId = ' + bodyRegionId+ ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) | |
1474 | - worker.postMessage({ | |
1495 | + var worker = new Worker('term-number-wp.js'); | |
1475 | 1496 | |
1476 | - 'termList': TermList, | |
1477 | - 'maskCanvasData': maskData, | |
1478 | - 'coloredImageData': coloredImageDataVar, | |
1479 | - 'grayImageData': grayImageDataVar, | |
1480 | - 'bodyRegionId': bodyRegionId, | |
1481 | - 'canvasId': canvasId | |
1497 | + //push workers in array to further used the refernece to delete the workers | |
1498 | + $scope.runningWorkers.push({ 'workerName': worker }) | |
1482 | 1499 | |
1483 | - }); | |
1500 | + // console.log('for bodyRegionId = ' + bodyRegionId+ ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) | |
1501 | + worker.postMessage({ | |
1502 | + | |
1503 | + 'termList': TermList, | |
1504 | + 'maskCanvasData': maskData, | |
1505 | + 'coloredImageData': coloredImageDataVar, | |
1506 | + 'grayImageData': grayImageDataVar, | |
1507 | + 'bodyRegionId': bodyRegionId, | |
1508 | + 'canvasId': canvasId | |
1509 | + | |
1510 | + }); | |
1511 | + } | |
1484 | 1512 | |
1485 | 1513 | //} |
1486 | 1514 | |
... | ... | @@ -3235,8 +3263,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3235 | 3263 | |
3236 | 3264 | } |
3237 | 3265 | |
3238 | - $scope.enableExtract = function () | |
3239 | - { | |
3266 | + $scope.enableExtract = function () { | |
3240 | 3267 | alert('extract called'); |
3241 | 3268 | |
3242 | 3269 | debugger; |
... | ... | @@ -3249,16 +3276,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3249 | 3276 | |
3250 | 3277 | //1. |
3251 | 3278 | $scope.highLightBody(); |
3252 | - | |
3279 | + | |
3253 | 3280 | |
3254 | 3281 | } |
3255 | 3282 | } |
3256 | 3283 | |
3257 | - | |
3284 | + | |
3258 | 3285 | |
3259 | 3286 | $scope.highLightBody = function () { |
3260 | 3287 | |
3261 | - // debugger; | |
3288 | + debugger; | |
3262 | 3289 | |
3263 | 3290 | if ($rootScope.isHighLight == true) { |
3264 | 3291 | |
... | ... | @@ -3293,8 +3320,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3293 | 3320 | |
3294 | 3321 | } |
3295 | 3322 | |
3296 | - | |
3297 | - | |
3298 | 3323 | |
3299 | 3324 | var context_gray = imageCanvas.getContext('2d'); |
3300 | 3325 | |
... | ... | @@ -3310,10 +3335,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3310 | 3335 | |
3311 | 3336 | img.onload = function () { |
3312 | 3337 | //console.log(Math.max(img.width) + ', ' + Math.max(img.height)) |
3313 | - // debugger; | |
3338 | + debugger; | |
3314 | 3339 | var DAData = new BitmapData(Math.max(img.width), Math.max(img.height)); |
3315 | 3340 | DAData.draw(img); |
3316 | - | |
3341 | + | |
3317 | 3342 | var colorMode; |
3318 | 3343 | |
3319 | 3344 | if ($rootScope.isExtract) { |
... | ... | @@ -3322,7 +3347,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3322 | 3347 | else { |
3323 | 3348 | colorMode = $scope.applyGrayMatrix(); |
3324 | 3349 | } |
3325 | - // debugger; | |
3350 | + // debugger; | |
3326 | 3351 | |
3327 | 3352 | var zeroPoint = new Point(); |
3328 | 3353 | DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); |
... | ... | @@ -3336,46 +3361,52 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3336 | 3361 | var grayImageImageDataVar = grayImageData.data; |
3337 | 3362 | |
3338 | 3363 | |
3339 | - if (value.haveMirror == 'true') { | |
3340 | - $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
3341 | - } | |
3342 | - else { | |
3343 | - //$rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId - 1)] = 1; | |
3344 | - | |
3345 | - $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
3346 | - } | |
3347 | - | |
3364 | + | |
3348 | 3365 | if ($rootScope.isExtract) { |
3349 | 3366 | |
3350 | 3367 | if (value.haveMirror == 'true') { |
3351 | - $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = coloredImageDataVar; | |
3368 | + $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
3352 | 3369 | } |
3353 | 3370 | else { |
3354 | 3371 | //$rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId - 1)] = 1; |
3355 | 3372 | |
3356 | - $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar; | |
3373 | + $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
3357 | 3374 | |
3358 | 3375 | } |
3359 | 3376 | } |
3377 | + | |
3378 | + else | |
3379 | + { | |
3380 | + if (value.haveMirror == 'true') { | |
3381 | + $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; | |
3382 | + } | |
3383 | + else { | |
3384 | + //$rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId - 1)] = 1; | |
3385 | + | |
3386 | + $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData; | |
3387 | + } | |
3388 | + | |
3389 | + } | |
3360 | 3390 | } |
3361 | 3391 | |
3362 | 3392 | $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50); |
3363 | 3393 | }) |
3364 | 3394 | |
3365 | - | |
3366 | - | |
3367 | 3395 | if ($rootScope.isExtract) { |
3368 | 3396 | if ($rootScope.previousHighlightList.length > 0) { |
3369 | 3397 | angular.forEach($rootScope.previousHighlightList, function (value, key) { |
3370 | 3398 | |
3371 | - $scope.highLightBodyBasedOnIcolor(value); | |
3399 | + | |
3400 | + $timeout(function () { $scope.highLightBodyBasedOnIcolor(value)}, 50); | |
3372 | 3401 | |
3373 | 3402 | }); |
3374 | 3403 | } |
3375 | 3404 | } |
3405 | + } | |
3406 | + | |
3376 | 3407 | |
3377 | 3408 | } |
3378 | - } | |
3409 | + | |
3379 | 3410 | |
3380 | 3411 | |
3381 | 3412 | |
... | ... | @@ -3393,7 +3424,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3393 | 3424 | var rgbPx2 = rgbPx.concat(RGB3); |
3394 | 3425 | var matrix = rgbPx2.concat(ALPHA); |
3395 | 3426 | |
3396 | - | |
3427 | + | |
3397 | 3428 | var grayScale = new ColorMatrixFilter(matrix); |
3398 | 3429 | |
3399 | 3430 | return grayScale; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
1 | -<!--<style> | |
1 | +<!--<style> | |
2 | 2 | .slider label { |
3 | 3 | position: absolute; |
4 | 4 | width: 20px; |
... | ... | @@ -15,40 +15,105 @@ |
15 | 15 | </style>--> |
16 | 16 | |
17 | 17 | <style> |
18 | - | |
19 | 18 | #wrapper { |
20 | 19 | position: relative; |
21 | 20 | width: 100%; |
22 | 21 | height: 100%; |
23 | 22 | margin: 20px auto; |
24 | 23 | } |
24 | + .tooltip-custom + .tooltip > .tooltip-inner { | |
25 | + background-color: #fff; | |
26 | + border: 1px solid #000; | |
27 | + color: #000; | |
28 | + border-radius: 0; | |
29 | + } | |
30 | + | |
31 | + .tooltip-custom + .tooltip > .tooltip-arrow { | |
32 | + display: none; | |
33 | + } | |
34 | + | |
35 | + .custom-tooltip { | |
36 | + background-color: #fff; | |
37 | + border: 0 none; | |
38 | + color: #000; | |
39 | + left: -52px; | |
40 | + opacity: 0.9; | |
41 | + padding: 3px 0; | |
42 | + position: absolute; | |
43 | + text-align: center; | |
44 | + top: 45px; | |
45 | + width: 120px; | |
46 | + display: none; | |
47 | + z-index: 10000; | |
48 | + border: 1px solid #000; | |
49 | + color: #000; | |
50 | + border-radius: 0; | |
51 | + } | |
52 | + | |
53 | + .custom-tooltip1 { | |
54 | + background-color: #fff; | |
55 | + border: 0 none; | |
56 | + color: #000; | |
57 | + left: 2px; | |
58 | + opacity: 0.9; | |
59 | + padding: 3px 0; | |
60 | + position: absolute; | |
61 | + text-align: center; | |
62 | + top: 45px; | |
63 | + width: 70px; | |
64 | + display: none; | |
65 | + z-index: 10000; | |
66 | + border: 1px solid #000; | |
67 | + color: #000; | |
68 | + border-radius: 0; | |
69 | + } | |
70 | + | |
71 | + .custom-tooltip2 { | |
72 | + background-color: #fff; | |
73 | + border: 0 none; | |
74 | + color: #000; | |
75 | + right: 10px; | |
76 | + opacity: 0.9; | |
77 | + padding: 3px 0; | |
78 | + position: absolute; | |
79 | + text-align: center; | |
80 | + top: 45px; | |
81 | + width: 60px; | |
82 | + display: none; | |
83 | + z-index: 10000; | |
84 | + border: 1px solid #000; | |
85 | + color: #000; | |
86 | + border-radius: 0; | |
87 | + } | |
25 | 88 | </style> |
26 | 89 | <div class=" " id="daView" ng-controller="DAController"> |
27 | 90 | <div class="pos-relative leftToolBar tools pull-left"> |
28 | 91 | <div class="toggle-icon toggleBar toggleHeadingButton" title="Show/Hide Sidebar" style="top:20px;"></div> |
29 | 92 | <div class="" style="top:20px"> |
30 | - <div class="col-sm-6" title="Identify"> | |
31 | - <button id="btnIdentity" class="btn btn-primary btn-sm" ng-click="OnIdentityClick()"> <img src="content/images/icon-identity.png" alt="" title=""></button> | |
93 | + <div class="col-sm-6"> | |
94 | + <button id="btnIdentity" class="btn btn-primary btn-sm tooltip-custom" ng-click="OnIdentityClick()" data-toggle="tooltip" data-placement="bottom" title="Identify"> <img src="content/images/icon-identity.png" alt="" title=""></button> | |
32 | 95 | </div> |
33 | - <div class="col-sm-6 pull-right" title="Zoom-in/Zoom-out"> | |
34 | - <button class="btn btn-black btn-sm pull-right" ng-click="Zoom()"><img src="content/images/icon-zoom.png" alt="" title=""></button> | |
96 | + <div class="col-sm-6 pull-right"> | |
97 | + <button class="btn btn-black btn-sm pull-right tooltip-custom" ng-click="Zoom()" data-toggle="tooltip" data-placement="bottom" title="Zoom-in/Zoom-out"> | |
98 | + <img src="content/images/icon-zoom.png" alt="" title=""></button> | |
35 | 99 | </div> |
36 | - <div class="col-sm-12" title="Transparency Box"> | |
37 | - <button id="btnTranparency" class="btn btn-black btn-sm btn-block marginTop5" ng-click="createTransparencyBox()"><img src="content/images/icon-transparency.png" alt="" title=""></button> | |
100 | + <div class="col-sm-12"> | |
101 | + <button id="btnTranparency" class="btn btn-black btn-sm btn-block marginTop5 tooltip-custom" ng-click="createTransparencyBox()" data-toggle="tooltip" data-placement="bottom" title="Transparency Box"><img src="content/images/icon-transparency.png" alt="" title=""></button> | |
38 | 102 | </div> |
39 | - <div class="col-sm-6" title="Normal"> | |
40 | - <button class="btn btn-primary btn-sm marginTop5"> <img src="content/images/bulb1.png" alt="" title=""></button> | |
103 | + <div class="col-sm-6"> | |
104 | + <button class="btn btn-primary btn-sm marginTop5 tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Normal"> <img src="content/images/bulb1.png" alt="" title=""></button> | |
41 | 105 | </div> |
42 | - <div class="col-sm-6" title="Extract"> | |
43 | - <button class="btn btn-black btn-sm pull-right marginTop5" ng-click="enableExtract()"><img src="content/images/bulb1.png" alt="" title=""></button> | |
106 | + <div class="col-sm-6"> | |
107 | + <button class="btn btn-black btn-sm pull-right marginTop5 tooltip-custom" ng-click="enableExtract()" data-toggle="tooltip" data-placement="bottom" title="Extract"><img src="content/images/bulb1.png" alt="" title=""></button> | |
44 | 108 | </div> |
45 | - <div class="col-sm-6" title="Highlight"> | |
46 | - <button id="btnHighLight" class="btn btn-black btn-sm marginTop5" ng-click="enableHighlight()"> <img src="content/images/bulb.png" alt="" title=""></button> | |
109 | + <div class="col-sm-6"> | |
110 | + <button id="btnHighLight" class="btn btn-black btn-sm marginTop5 tooltip-custom" ng-click="enableHighlight()" data-toggle="tooltip" data-placement="bottom" title="Highlight"> <img src="content/images/bulb.png" alt="" title=""></button> | |
47 | 111 | </div> |
48 | - <div class="col-sm-6 dropdown" title="Highlight Options"> | |
49 | - <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" ng-click="LoadBodySystemList()"><img src="content/images/icon-highlight.png" alt="" title=""></button> | |
112 | + <div class="col-sm-6 dropdown hover-tool"> | |
113 | + <div class="custom-tooltip">Highlight Options</div> | |
114 | + <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" ng-click="LoadBodySystemList()"><img src="content/images/icon-highlight.png" alt="" title=""></button> | |
50 | 115 | <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
51 | - <li><a href="#" title="Current Structure" >Current Structure</a></li> | |
116 | + <li><a href="#" title="Current Structure">Current Structure</a></li> | |
52 | 117 | <li role="separator" class="divider"></li> |
53 | 118 | <li><a href="#" title="Cardiovascular" id="1" ng-click="HighlightBodysystem($event)">Cardiovascular</a></li> |
54 | 119 | <li><a href="#" title="Digestive" id="2" ng-click="HighlightBodysystem($event)">Digestive</a></li> |
... | ... | @@ -64,14 +129,16 @@ |
64 | 129 | <li><a href="#" title="Urinary" id="12" ng-click="HighlightBodysystem($event)">Urinary</a></li> |
65 | 130 | </ul> |
66 | 131 | </div> |
67 | - <div class="col-sm-6" title="Gender"> | |
132 | + <div class="col-sm-6 hover-gender-tool" title="Gender"> | |
133 | + <div class="custom-tooltip1">Gender</div> | |
68 | 134 | <button class="btn btn-black btn-sm marginTop5 dropdown-toggle" type="button" id="dropdownMenu4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <i class=" fa fa-intersex font16"></i></button> |
69 | 135 | <ul class="dropdown-menu" aria-labelledby="dropdownMenu3"> |
70 | 136 | <li><a href="#" title="Male" ng-click="OnGenderChange($event)">Male</a></li> |
71 | 137 | <li><a href="#" title="Female" ng-click="OnGenderChange($event)">Female</a></li> |
72 | 138 | </ul> |
73 | 139 | </div> |
74 | - <div class="col-sm-6" title="View"> | |
140 | + <div class="col-sm-6 tooltip-View-custom" title="View"> | |
141 | + <div class="custom-tooltip2">View</div> | |
75 | 142 | <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><img src="content/images/view.png" alt="" title=""></button> |
76 | 143 | <ul class="dropdown-menu" aria-labelledby="dropdownMenu3"> |
77 | 144 | <li><a href="#" title="Anterior" ng-click="OnViewChange($event)">Anterior</a></li> |
... | ... | @@ -82,8 +149,8 @@ |
82 | 149 | <li><a href="#" title="Medial Arm" ng-click="OnViewChange($event)">Medial Arm</a></li> |
83 | 150 | </ul> |
84 | 151 | </div> |
85 | - <div class="col-sm-12" title="Show/Hide Structure Name Boxes"> | |
86 | - <button class="btn btn-primary btn-sm marginTop5 btn-block"> <img src="content/images/comment-box.png" alt="" title=""></button> | |
152 | + <div class="col-sm-12"> | |
153 | + <button class="btn btn-primary btn-sm marginTop5 btn-block tooltip-custom" data-toggle="tooltip" data-placement="bottom" title="Show/Hide Structure Name Boxes"> <img src="content/images/comment-box.png" alt="" title=""></button> | |
87 | 154 | </div> |
88 | 155 | </div> |
89 | 156 | <div class=""> |
... | ... | @@ -94,7 +161,7 @@ |
94 | 161 | <div id="layerChangeSlider" style="height:140px;" class="vert_slider " ng-model="layerNumber"></div> |
95 | 162 | </div> |
96 | 163 | </div> |
97 | - | |
164 | + | |
98 | 165 | <div class="main2"> |
99 | 166 | <div class="col-sm-12 stickey-area"> |
100 | 167 | <div class="breadcrumb "> |
... | ... | @@ -132,7 +199,7 @@ |
132 | 199 | </div> |
133 | 200 | <!--<div id="canvasDiv" style=" width: 95% !important;top:0px;overflow:scroll;background-color:white;">--> |
134 | 201 | <!--<div id="daLoaderLabel">Loading....</div>--> |
135 | - | |
202 | + | |
136 | 203 | </div> |
137 | 204 | <div class="clearfix"></div> |
138 | 205 | </div> |
... | ... | @@ -180,8 +247,8 @@ |
180 | 247 | </div> |
181 | 248 | </div>--> |
182 | 249 | <div class="ui-widget-content" id="transparencyScale" style="width: 350px; height: 150px;visibility:hidden;display:block;float:left"> |
183 | - <div > | |
184 | - <div > | |
250 | + <div> | |
251 | + <div> | |
185 | 252 | <div class="modal-header annotation-modal-header"> |
186 | 253 | <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseTransparencyBox()"><span aria-hidden="true">×</span></button> |
187 | 254 | <h4>Transparency</h4> |
... | ... | @@ -213,9 +280,9 @@ $(window).load(function () { |
213 | 280 | //value: 0, |
214 | 281 | |
215 | 282 | slide: function (event, ui) { |
216 | - | |
283 | + | |
217 | 284 | // $("#txtlayerNumber").val(100 - ui.value); // basic math operation.. |
218 | - | |
285 | + | |
219 | 286 | // $("#txtlayerNumber").val($("#layerChangeSlider").slider("value")); |
220 | 287 | |
221 | 288 | }, |
... | ... | @@ -244,12 +311,12 @@ $(window).load(function () { |
244 | 311 | |
245 | 312 | }); |
246 | 313 | }, |
247 | - | |
314 | + | |
248 | 315 | }) |
249 | 316 | }); |
250 | 317 | |
251 | - | |
252 | - </script> | |
318 | + | |
319 | +</script> | |
253 | 320 | |
254 | 321 | |
255 | 322 | <!--<script> |
... | ... | @@ -268,6 +335,68 @@ $(window).load(function () { |
268 | 335 | |
269 | 336 | <script> |
270 | 337 | $(function () { |
338 | + | |
339 | + $("#dropdownMenu2").mouseover(function () { | |
340 | + $(".custom-tooltip").css("display", "block"); | |
341 | + }); | |
342 | + $("#dropdownMenu2").mouseout(function () { | |
343 | + $(".custom-tooltip").css("display", "none"); | |
344 | + }); | |
345 | + | |
346 | + $("#dropdownMenu4").mouseover(function () { | |
347 | + $(".custom-tooltip1").css("display", "block"); | |
348 | + }); | |
349 | + $("#dropdownMenu4").mouseout(function () { | |
350 | + $(".custom-tooltip1").css("display", "none"); | |
351 | + }); | |
352 | + | |
353 | + $("#dropdownMenu3").mouseover(function () { | |
354 | + $(".custom-tooltip2").css("display", "block"); | |
355 | + }); | |
356 | + $("#dropdownMenu3").mouseout(function () { | |
357 | + $(".custom-tooltip2").css("display", "none"); | |
358 | + }); | |
359 | + | |
360 | + $(".hover-tool").on('click', function () { | |
361 | + | |
362 | + | |
363 | + if ($(".hover-tool").hasClass("open")) { | |
364 | + $(".custom-tooltip").css("display", "block"); | |
365 | + } | |
366 | + else { | |
367 | + | |
368 | + $(".custom-tooltip").css("display", "none"); | |
369 | + | |
370 | + } | |
371 | + }); | |
372 | + | |
373 | + $(".hover-gender-tool").on('click', function () { | |
374 | + | |
375 | + | |
376 | + if ($(".hover-gender-tool").hasClass("open")) { | |
377 | + $(".custom-tooltip1").css("display", "block"); | |
378 | + } | |
379 | + else { | |
380 | + | |
381 | + $(".custom-tooltip1").css("display", "none"); | |
382 | + | |
383 | + } | |
384 | + }); | |
385 | + | |
386 | + $(".hover-view-tool").on('click', function () { | |
387 | + | |
388 | + | |
389 | + if ($(".hover-view-tool").hasClass("open")) { | |
390 | + $(".custom-tooltip1").css("display", "block"); | |
391 | + } | |
392 | + else { | |
393 | + | |
394 | + $(".custom-tooltip1").css("display", "none"); | |
395 | + | |
396 | + } | |
397 | + }); | |
398 | + | |
399 | + | |
271 | 400 | $("#slider-range-min-2").slider({ |
272 | 401 | range: "min", |
273 | 402 | min: 1, |
... | ... | @@ -306,11 +435,11 @@ $(window).load(function () { |
306 | 435 | step: "10" |
307 | 436 | }); |
308 | 437 | |
309 | - | |
438 | + | |
310 | 439 | </script> |
311 | 440 | <script> |
312 | 441 | $(document).ready(function () { |
313 | - $('[data-toggle="tooltip"]').tooltip(); | |
442 | + $('[data-toggle="tooltip"]').tooltip({ trigger: 'hover', 'placement': 'bottom'}); | |
314 | 443 | }); |
315 | 444 | </script> |
316 | 445 | <script> |
... | ... | @@ -326,7 +455,7 @@ $(window).load(function () { |
326 | 455 | var bar = $('.tools'); |
327 | 456 | var main = $('.main2'); |
328 | 457 | $('.toggleBar').click(function () { |
329 | - | |
458 | + | |
330 | 459 | bar.toggleClass('active'); |
331 | 460 | main.toggleClass('active'); |
332 | 461 | }); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
1 | -<div class="bodyWrap row container-fluid" > | |
1 | +<div class="bodyWrap row container-fluid"> | |
2 | 2 | <div class="col-sm-12 col-md-12 pageHeading"> |
3 | 3 | <!--<button type="button" class="btn btn-success pull-left toggleBar btn-sm" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"> <i class="fa fa-bars"></i> </button>--> |
4 | 4 | <div class=" pull-left toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar" style="padding-left: 15px; "> <i class="fa fa-bars"></i> </div> |
... | ... | @@ -67,6 +67,114 @@ |
67 | 67 | $(function () { |
68 | 68 | $('[data-toggle="tooltip"]').tooltip(); |
69 | 69 | }) |
70 | + | |
71 | + | |
72 | + if (window.location.pathname == "/AIA/da-view-list") { | |
73 | + | |
74 | + $(".nav-sidebar li a").removeClass('active'); | |
75 | + $(".nav-sidebar li:first-child a").addClass('active'); | |
76 | + | |
77 | + } | |
78 | + else if (window.location.pathname == "/AIA/3dAnatomy") { | |
79 | + | |
80 | + $(".nav-sidebar li a").removeClass('active'); | |
81 | + $(".nav-sidebar li:nth-child(2) a").addClass('active'); | |
82 | + | |
83 | + } | |
84 | + else if (window.location.pathname == "/AIA/clinical-illustrations") { | |
85 | + | |
86 | + $(".nav-sidebar li a").removeClass('active'); | |
87 | + $(".nav-sidebar li:nth-child(3) a").addClass('active'); | |
88 | + | |
89 | + | |
90 | + } | |
91 | + else if (window.location.pathname == "/AIA/clinical-animations") { | |
92 | + | |
93 | + $(".nav-sidebar li a").removeClass('active'); | |
94 | + $(".nav-sidebar li:nth-child(4) a").addClass('active'); | |
95 | + | |
96 | + | |
97 | + } | |
98 | + else if (window.location.pathname == "/AIA/Link/encyclopedia") { | |
99 | + | |
100 | + $(".nav-sidebar li a").removeClass('active'); | |
101 | + $(".nav-sidebar li:nth-child(5) a").addClass('active'); | |
102 | + | |
103 | + | |
104 | + } | |
105 | + else if (window.location.pathname == "/AIA/curriculum-builder") { | |
106 | + | |
107 | + $(".nav-sidebar li a").removeClass('active'); | |
108 | + $(".nav-sidebar li:nth-child(6) a").addClass('active'); | |
109 | + | |
110 | + | |
111 | + } | |
112 | + | |
113 | + else if (window.location.pathname == "/AIA/anatomy-test") { | |
114 | + | |
115 | + $(".nav-sidebar li a").removeClass('active'); | |
116 | + $(".nav-sidebar li:nth-child(7) a").addClass('active'); | |
117 | + | |
118 | + | |
119 | + } | |
120 | + | |
121 | + else if (window.location.pathname == "/AIA/Link/IP-10") { | |
122 | + | |
123 | + $(".nav-sidebar li a").removeClass('active'); | |
124 | + $(".nav-sidebar li:nth-child(8) a").addClass('active'); | |
125 | + | |
126 | + } | |
127 | + else if (window.location.pathname == "/AIA/lab-exercises") { | |
128 | + | |
129 | + $(".nav-sidebar li a").removeClass('active'); | |
130 | + $(".nav-sidebar li:nth-child(9) a").addClass('active'); | |
131 | + | |
132 | + } | |
133 | + else if (window.location.pathname == "/AIA/Link/indepth-reports") { | |
134 | + | |
135 | + $(".nav-sidebar li a").removeClass('active'); | |
136 | + $(".nav-sidebar li:nth-child(10) a").addClass('active'); | |
137 | + | |
138 | + } | |
139 | + else if (window.location.pathname == "/AIA/Link/complementary-and-alternate-medicine") { | |
140 | + | |
141 | + $(".nav-sidebar li a").removeClass('active'); | |
142 | + $(".nav-sidebar li:nth-child(11) a").addClass('active'); | |
143 | + | |
144 | + } | |
145 | + else if (window.location.pathname == "/AIA/ADAM-Images") { | |
146 | + | |
147 | + $(".nav-sidebar li a").removeClass('active'); | |
148 | + $(".nav-sidebar li:nth-child(12) a").addClass('active'); | |
149 | + | |
150 | + } | |
151 | + | |
152 | + else if (window.location.pathname == "/AIA/Link/bodyguide") { | |
153 | + | |
154 | + $(".nav-sidebar li a").removeClass('active'); | |
155 | + $(".nav-sidebar li:nth-child(13) a").addClass('active'); | |
156 | + | |
157 | + } | |
158 | + else if (window.location.pathname == "/AIA/Link/symptom-navigator") { | |
159 | + | |
160 | + $(".nav-sidebar li a").removeClass('active'); | |
161 | + $(".nav-sidebar li:nth-child(14) a").addClass('active'); | |
162 | + | |
163 | + } | |
164 | + else if (window.location.pathname == "/AIA/Link/wellness-tools") { | |
165 | + | |
166 | + $(".nav-sidebar li a").removeClass('active'); | |
167 | + $(".nav-sidebar li:nth-child(15) a").addClass('active'); | |
168 | + | |
169 | + } | |
170 | + else if (window.location.pathname == "/AIA/ADAM-on-demand") { | |
171 | + | |
172 | + $(".nav-sidebar li a").removeClass('active'); | |
173 | + $(".nav-sidebar li:nth-child(16) a").addClass('active'); | |
174 | + | |
175 | + } | |
176 | + | |
177 | + | |
70 | 178 | }); |
71 | 179 | </script> |
72 | 180 | <script> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/extract-wp.js
0 → 100644
1 | +var doneBRID = []; | |
2 | +var abc = 'hello'; | |
3 | +var previousGrayImageDataList = []; | |
4 | +getLocationForMatchedTermsInWholeBody = function (termList, maskCanvasData, coloredImageData, grayImageData, bodyRegionId, canvasId) { | |
5 | + // console.log('for bodyRegionId: ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) | |
6 | + var matchedRGBLocationInBodyRegion = []; | |
7 | + var matched; | |
8 | + | |
9 | + // debugger; | |
10 | + var n = maskCanvasData.data.length; | |
11 | + var maskData = maskCanvasData.data; | |
12 | + for (var z = 0; z < termList.length; z++) { | |
13 | + | |
14 | + if (previousGrayImageDataList[parseInt(bodyRegionId - 1)] != null) { | |
15 | + grayImageData = previousGrayImageDataList[parseInt(bodyRegionId - 1)]; | |
16 | + | |
17 | + } | |
18 | + | |
19 | + var grayImageDataVar; | |
20 | + if (grayImageData != null) { | |
21 | + grayImageDataVar = grayImageData.data; | |
22 | + } | |
23 | + var coloredImageDataVar = coloredImageData.data; | |
24 | + | |
25 | + for (var i = 0; i < n; i += 4) { | |
26 | + | |
27 | + | |
28 | + var RED = maskData[i] - 9; | |
29 | + var GREEN = maskData[i + 1] - 9; | |
30 | + var BLUE = maskData[i + 2] - 9; | |
31 | + | |
32 | + var Red; | |
33 | + var Green; | |
34 | + var Blue; | |
35 | + var zero = "0"; | |
36 | + | |
37 | + if ((RED).toString().length != 2) { | |
38 | + Red = zero.concat((RED).toString()) | |
39 | + } | |
40 | + else { | |
41 | + Red = (RED).toString() | |
42 | + } | |
43 | + if ((GREEN).toString().length != 2) { | |
44 | + Green = zero.concat((GREEN).toString()) | |
45 | + } | |
46 | + else { | |
47 | + Green = (GREEN).toString() | |
48 | + | |
49 | + } | |
50 | + if ((BLUE).toString().length != 2) { | |
51 | + Blue = zero.concat((BLUE).toString()) | |
52 | + } | |
53 | + else { | |
54 | + Blue = (BLUE).toString() | |
55 | + | |
56 | + } | |
57 | + | |
58 | + var Icolor = (Red + Green + Blue); | |
59 | + // alert('Icolor: ' + Icolor) | |
60 | + | |
61 | + if (parseInt(termList[z]._TermNumber) == parseInt(Icolor)) { | |
62 | + | |
63 | + // debugger; | |
64 | + | |
65 | + | |
66 | + // matchedRGBLocationInBodyRegion.push({ "BRId": bodyRegionId, "location": i }); | |
67 | + | |
68 | + | |
69 | + // matched = true; | |
70 | + | |
71 | + var RED_coloredImage = coloredImageDataVar[i]; | |
72 | + | |
73 | + grayImageDataVar[i] = RED_coloredImage; | |
74 | + | |
75 | + | |
76 | + var GREEN_coloredImage = coloredImageDataVar[i + 1]; | |
77 | + grayImageDataVar[i + 1] = GREEN_coloredImage; | |
78 | + | |
79 | + var BLUE_coloredImage = coloredImageDataVar[i + 2]; | |
80 | + grayImageDataVar[i + 2] = BLUE_coloredImage; | |
81 | + | |
82 | + | |
83 | + var ALPHA_coloredImage = coloredImageDataVar[i + 3]; | |
84 | + grayImageDataVar[i + 3] = ALPHA_coloredImage; | |
85 | + | |
86 | + } | |
87 | + | |
88 | + | |
89 | + } | |
90 | + // debugger; | |
91 | + previousGrayImageDataList[parseInt(bodyRegionId - 1)] = grayImageData; | |
92 | + | |
93 | + // if (matched == true) { | |
94 | + | |
95 | + // } | |
96 | + | |
97 | + } | |
98 | + self.postMessage({ | |
99 | + 'bodyRegionId': bodyRegionId, | |
100 | + 'value': grayImageData, | |
101 | + 'canvasId': canvasId | |
102 | + | |
103 | + }); | |
104 | + | |
105 | +} | |
106 | + | |
107 | +self.onmessage = function (e) { | |
108 | + getLocationForMatchedTermsInWholeBody(e.data.termList, e.data.maskCanvasData, e.data.coloredImageData, | |
109 | + e.data.grayImageData, e.data.bodyRegionId, e.data.canvasId); | |
110 | + | |
111 | +} | ... | ... |
400-SOURCECODE/AIAHTML5.Web/term-number-wp.js
1 | -var UpdatedGrayImageDataList = []; | |
2 | -var doneBRID = []; | |
1 | +var doneBRID = []; | |
3 | 2 | var abc = 'hello'; |
4 | -previousGrayImageDataList = []; | |
3 | +var previousGrayImageDataList = []; | |
5 | 4 | getLocationForMatchedTermsInWholeBody = function (termList, maskCanvasData, coloredImageData, grayImageData, bodyRegionId, canvasId) { |
6 | 5 | // console.log('for bodyRegionId: ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) |
7 | 6 | var matchedRGBLocationInBodyRegion = []; | ... | ... |