Commit 69379ea4d878177e4223f24bd516f6882e316596
1 parent
ad64cee0
highlight body system is working on switching the body system at same kayer one after another.
extract code variables are introduced
Showing
2 changed files
with
41 additions
and
27 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -30,30 +30,40 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
30 | 30 | $scope.TBDrawStartY; |
31 | 31 | |
32 | 32 | $rootScope.isHighLight = false; |
33 | + | |
34 | + // grayHighlight | |
33 | 35 | $rootScope.coloredImageCanvasList = []; |
34 | 36 | $rootScope.coloredImageMRCanvasList = []; |
35 | 37 | $rootScope.ColoredCanvasData = []; |
36 | 38 | $rootScope.grayImageDataList = []; |
37 | 39 | $rootScope.grayImageMRDataList = []; |
38 | - | |
39 | - $rootScope.grayImageDataListCurrent = []; | |
40 | - $rootScope.grayImageMRDataListCurrent = []; | |
41 | - | |
42 | - $scope.zoomInOut = 75; | |
43 | - $scope.i = 0; | |
44 | - $scope.speachBubbleArray = []; | |
45 | - $scope.multiAnnotationIsON = false; | |
40 | + $rootScope.updatedGrayDataList = []; | |
41 | + $rootScope.updatedGrayMRDataList = []; | |
46 | 42 | $scope.previousGrayImageDataVar; |
47 | 43 | $scope.previousGrayCanvas; |
48 | - | |
49 | 44 | $scope.previousSelectedTermList = []; |
50 | 45 | $scope.runningWorkers = []; |
51 | - $scope.highlightedBR=[]; | |
46 | + $scope.highlightedBR = []; | |
52 | 47 | // This variable is used for unhighlight previously highlighted body portion, if multiAnnotation is false. |
53 | 48 | $scope.machedIcolorInBodyRegion = []; |
54 | 49 | |
55 | 50 | $scope.MaskCanvasData = []; |
56 | 51 | |
52 | + //Extract | |
53 | + $rootScope.isExtract = false; | |
54 | + $rootScope.whiteImageDataList = []; | |
55 | + $rootScope.whiteImageMRDataList = []; | |
56 | + $rootScope.updatedWhiteDataList = []; | |
57 | + $rootScope.updatedWhiteMRDataList = []; | |
58 | + | |
59 | + //zoom | |
60 | + $scope.zoomInOut = 75; | |
61 | + $scope.i = 0; | |
62 | + $scope.speachBubbleArray = []; | |
63 | + $scope.multiAnnotationIsON = false; | |
64 | + | |
65 | + | |
66 | + | |
57 | 67 | //array for bodyviewid correspoing to male female(used for gender change) |
58 | 68 | $scope.correspondingBodyViewIds = { |
59 | 69 | '1': '5', |
... | ... | @@ -1410,7 +1420,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1410 | 1420 | |
1411 | 1421 | // console.log('Start time taken for term: ' + TermList[i]._TermNumber + 'in posting: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); |
1412 | 1422 | //debugger |
1413 | - console.log('fjfhdjkfhdjf') | |
1414 | 1423 | $timeout(function () { |
1415 | 1424 | for (var x = 0; x < 9; x++) { |
1416 | 1425 | // console.log('$rootScope.MaskCanvasData.length= ' + n) |
... | ... | @@ -1429,7 +1438,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1429 | 1438 | |
1430 | 1439 | if ($scope.multiAnnotationIsON == true) { |
1431 | 1440 | |
1432 | - grayImageDataVar = $rootScope.grayImageMRDataListCurrent[bodyRegionId] | |
1441 | + grayImageDataVar =$rootScope.updatedGrayMRDataList[bodyRegionId] | |
1433 | 1442 | } |
1434 | 1443 | else |
1435 | 1444 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
... | ... | @@ -1437,7 +1446,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1437 | 1446 | if ($rootScope.isExtract) { |
1438 | 1447 | if ($scope.multiAnnotationIsON == true) { |
1439 | 1448 | |
1440 | - grayImageDataVar = $rootScope.grayImageMRDataListCurrent[bodyRegionId] | |
1449 | + grayImageDataVar =$rootScope.updatedGrayMRDataList[bodyRegionId] | |
1441 | 1450 | } |
1442 | 1451 | else |
1443 | 1452 | grayImageDataVar = $rootScope.whiteImageMRDataList[bodyRegionId]; |
... | ... | @@ -1448,7 +1457,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1448 | 1457 | |
1449 | 1458 | coloredImageDataVar = $rootScope.coloredImageCanvasList[bodyRegionId - 1]; |
1450 | 1459 | if ($scope.multiAnnotationIsON == true) { |
1451 | - grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId - 1] | |
1460 | + grayImageDataVar = $rootScope.updatedGrayDataList [bodyRegionId - 1] | |
1452 | 1461 | } |
1453 | 1462 | else |
1454 | 1463 | grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; |
... | ... | @@ -1457,7 +1466,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1457 | 1466 | if ($rootScope.isExtract) { |
1458 | 1467 | if ($scope.multiAnnotationIsON == true) { |
1459 | 1468 | |
1460 | - grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId] | |
1469 | + grayImageDataVar = $rootScope.updatedGrayDataList [bodyRegionId] | |
1461 | 1470 | } |
1462 | 1471 | else |
1463 | 1472 | grayImageDataVar = $rootScope.whiteImageDataList[bodyRegionId]; |
... | ... | @@ -1515,18 +1524,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1515 | 1524 | |
1516 | 1525 | |
1517 | 1526 | if (canvasId.match('_MR')) |
1518 | - $rootScope.grayImageMRDataListCurrent[bodyRegionId] = updatedData; | |
1527 | + $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; | |
1519 | 1528 | else |
1520 | - $rootScope.grayImageDataListCurrent[bodyRegionId - 1] = updatedData; | |
1529 | + $rootScope.updatedGrayDataList [bodyRegionId - 1] = updatedData; | |
1521 | 1530 | |
1522 | 1531 | $scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); |
1523 | 1532 | if ($scope.highlightedBR.length == 9) { |
1524 | 1533 | |
1525 | - if ($scope.HighlightBodysystem == true) | |
1534 | + if ($scope.isHighlightBodysystem == true) | |
1526 | 1535 | |
1527 | 1536 | $rootScope.isLoading = false; |
1528 | 1537 | |
1529 | 1538 | $('#spinner').css('visibility', 'hidden'); |
1539 | + | |
1540 | + $scope.isHighlightBodysystem = false; | |
1530 | 1541 | } |
1531 | 1542 | |
1532 | 1543 | }; |
... | ... | @@ -3656,7 +3667,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3656 | 3667 | //} |
3657 | 3668 | |
3658 | 3669 | //body highlight options functinality |
3659 | - $scope.LoadBodySystemList = function () { | |
3670 | + $scope.LoadBodySystemData = function () { | |
3660 | 3671 | |
3661 | 3672 | var currentBodyViewId = $scope.voId; |
3662 | 3673 | var systemListHtml = '<ul class="dropdown-menu" aria-labelledby="dropdownMenu2"><li><a href="#" title="Current Structure">Current Structure</a></li> <li role="separator" class="divider"></li>' |
... | ... | @@ -3685,22 +3696,25 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
3685 | 3696 | |
3686 | 3697 | } |
3687 | 3698 | |
3688 | - $scope.HighlightBodysystem = function (event) { | |
3689 | - var systemMatchedTermList = new jinqJs() | |
3699 | + $scope.HighlightBodysystem = function (event) { | |
3700 | + | |
3701 | + var systemMatchedTermList = new jinqJs() | |
3690 | 3702 | .from($rootScope.BodySystemData.BodySystem.BodySystemTerm) |
3691 | 3703 | .where('_SystemNumber == ' + event.currentTarget.id) |
3692 | 3704 | .select(); |
3693 | 3705 | |
3694 | - //color the body gray | |
3695 | - $rootScope.isHighLight = true | |
3696 | - $scope.highLightBody(); | |
3706 | + if($rootScope.isHighLight ==false){ | |
3707 | + //color the body gray | |
3708 | + $rootScope.isHighLight = true | |
3709 | + $scope.highLightBody(); | |
3710 | + } | |
3697 | 3711 | //now highlight the selected body system in whole body |
3698 | 3712 | |
3699 | 3713 | |
3700 | - $rootScope.isLoading = true; | |
3714 | + //$rootScope.isLoading = true; | |
3701 | 3715 | $('#spinner').css('visibility', 'visible'); |
3702 | 3716 | |
3703 | - $scope.HighlightBodysystem = true; | |
3717 | + $scope.isHighlightBodysystem = true; | |
3704 | 3718 | |
3705 | 3719 | $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100); |
3706 | 3720 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 | <button id="btnHighLight" class="btn btn-black btn-sm marginTop5" ng-click="enableHighlight()"> <img src="content/images/bulb.png" alt="" title=""></button> |
47 | 47 | </div> |
48 | 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> | |
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="LoadBodySystemData()"><img src="content/images/icon-highlight.png" alt="" title=""></button> | |
50 | 50 | <ul class="dropdown-menu" aria-labelledby="dropdownMenu2"> |
51 | 51 | <li><a href="#" title="Current Structure" >Current Structure</a></li> |
52 | 52 | <li role="separator" class="divider"></li> | ... | ... |