Commit 3c31fdaa2df83f0333dafc18b0be580f9b7270e3
1 parent
18fab3c4
1. extract is maintained on layer change if exist.
2. if user first click on extract without selecting any body part then nothing happens. Now if user click on any body part, extract is done.
Showing
2 changed files
with
60 additions
and
15 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -84,7 +84,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
84 | 84 | $rootScope.updatedWhiteImageMRDataList = []; |
85 | 85 | |
86 | 86 | //normal mode |
87 | - $rootScope.isNormalMode = false; | |
87 | + $rootScope.isNormalMode = true; | |
88 | 88 | $rootScope.isZoomed = false; |
89 | 89 | |
90 | 90 | //navigator man functionality |
... | ... | @@ -1294,6 +1294,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1294 | 1294 | } |
1295 | 1295 | var RGBColor = (Red + Green + Blue); |
1296 | 1296 | |
1297 | + $rootScope.previousHighlightList.push(RGBColor); | |
1298 | + | |
1299 | + | |
1297 | 1300 | if ($rootScope.isHighLight) { |
1298 | 1301 | |
1299 | 1302 | if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { |
... | ... | @@ -1331,15 +1334,21 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1331 | 1334 | } |
1332 | 1335 | } |
1333 | 1336 | |
1334 | - $rootScope.previousHighlightList.push(RGBColor); | |
1337 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1335 | 1338 | |
1336 | 1339 | $scope.highLightBodyBasedOnIcolor(RGBColor); |
1337 | 1340 | } |
1338 | 1341 | |
1339 | - if ($rootScope.isNormalMode == true) { | |
1342 | + //if ($rootScope.isNormalMode == true) { | |
1340 | 1343 | |
1341 | 1344 | |
1342 | - $rootScope.previousHighlightList.push(RGBColor); | |
1345 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1346 | + //} | |
1347 | + | |
1348 | + //extarct clicked body part is extarct button is already enabled. | |
1349 | + debugger; | |
1350 | + if ($rootScope.isExtract == true) { | |
1351 | + $scope.enableExtract(false); | |
1343 | 1352 | } |
1344 | 1353 | |
1345 | 1354 | var annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); |
... | ... | @@ -1618,6 +1627,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1618 | 1627 | |
1619 | 1628 | } |
1620 | 1629 | |
1630 | + $rootScope.previousHighlightList.push(RGBColor); | |
1621 | 1631 | |
1622 | 1632 | if ($rootScope.isHighLight == true) { |
1623 | 1633 | if ($scope.machedIcolorInBodyRegion != null || $scope.machedIcolorInBodyRegion != undefined) { |
... | ... | @@ -1656,7 +1666,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1656 | 1666 | } |
1657 | 1667 | } |
1658 | 1668 | |
1659 | - $rootScope.previousHighlightList.push(RGBColor); | |
1669 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1660 | 1670 | |
1661 | 1671 | |
1662 | 1672 | if (maskCanvasId.match('modestyImg') && RGBColor != '000000') { } |
... | ... | @@ -1667,8 +1677,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1667 | 1677 | |
1668 | 1678 | } |
1669 | 1679 | |
1670 | - if ($rootScope.isNormalMode == true) { | |
1671 | - $rootScope.previousHighlightList.push(RGBColor); | |
1680 | + //if ($rootScope.isNormalMode == true) { | |
1681 | + // $rootScope.previousHighlightList.push(RGBColor); | |
1682 | + //} | |
1683 | + | |
1684 | + debugger; | |
1685 | + //extarct clisked body part is extarct button is already enabled. | |
1686 | + if ($rootScope.isExtract == true) { | |
1687 | + $scope.enableExtract(false); | |
1672 | 1688 | } |
1673 | 1689 | |
1674 | 1690 | if ($('#speechBubbleTrns').length > 0) |
... | ... | @@ -1842,7 +1858,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1842 | 1858 | |
1843 | 1859 | |
1844 | 1860 | $scope.HighlightBodyOnExtract = function () { |
1845 | - | |
1861 | + console.log(' insode HighlightBodyOnExtract. $rootScope.MaskCanvasData length= ' + $rootScope.MaskCanvasData.length + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length) | |
1846 | 1862 | |
1847 | 1863 | var multiTermList = []; |
1848 | 1864 | var CallBackBodyRegion = []; |
... | ... | @@ -5012,7 +5028,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5012 | 5028 | } |
5013 | 5029 | } |
5014 | 5030 | |
5015 | - $scope.enableExtract = function () { | |
5031 | + $scope.enableExtract = function (isCalledFromButton) { | |
5032 | + | |
5033 | + console.log('isCalledFromButton= ' + isCalledFromButton); | |
5016 | 5034 | |
5017 | 5035 | $rootScope.isHighlightBodyByBodySystem = false; |
5018 | 5036 | |
... | ... | @@ -5042,10 +5060,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5042 | 5060 | $scope.terminateCurrentlyRunningWPs(); |
5043 | 5061 | |
5044 | 5062 | //3. |
5045 | - if ($rootScope.isExtract == true) { | |
5063 | + //if extarct is alraedy enabled and user cliked on any body part then extract that. | |
5064 | + if (isCalledFromButton == false) { | |
5046 | 5065 | |
5047 | - } | |
5048 | - else { | |
5049 | 5066 | $rootScope.isExtract = true; |
5050 | 5067 | //disable transparency button |
5051 | 5068 | |
... | ... | @@ -5058,7 +5075,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5058 | 5075 | $rootScope.isNormalMode = false; |
5059 | 5076 | } |
5060 | 5077 | else { |
5061 | - $rootScope.isNormalMode = false; | |
5078 | + | |
5062 | 5079 | $rootScope.isHighLight = false; |
5063 | 5080 | } |
5064 | 5081 | |
... | ... | @@ -5066,7 +5083,34 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5066 | 5083 | console.log('highLightBody from enableExtract') |
5067 | 5084 | $scope.highLightBody(); |
5068 | 5085 | |
5086 | + } | |
5087 | + else { | |
5088 | + if ($rootScope.isExtract == true) { | |
5089 | + | |
5090 | + } | |
5091 | + else { | |
5092 | + $rootScope.isExtract = true; | |
5093 | + //disable transparency button | |
5094 | + | |
5095 | + $("#btnTranparency").addClass("disabled"); | |
5096 | + | |
5097 | + | |
5098 | + if ($rootScope.isNormalMode == true) { | |
5099 | + | |
5100 | + $rootScope.isHighLight = false; | |
5101 | + $rootScope.isNormalMode = false; | |
5102 | + } | |
5103 | + else { | |
5104 | + | |
5105 | + $rootScope.isHighLight = false; | |
5106 | + } | |
5069 | 5107 | |
5108 | + //4. | |
5109 | + console.log('highLightBody from enableExtract') | |
5110 | + $scope.highLightBody(); | |
5111 | + | |
5112 | + | |
5113 | + } | |
5070 | 5114 | } |
5071 | 5115 | |
5072 | 5116 | //5. unhighlight other |
... | ... | @@ -5329,7 +5373,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5329 | 5373 | |
5330 | 5374 | $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50); |
5331 | 5375 | |
5332 | - | |
5376 | + console.log('highlightboy. $rootScope.isExtract= '+$rootScope.isExtract+', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length) | |
5333 | 5377 | if ($rootScope.isExtract == true) { |
5334 | 5378 | if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) { |
5335 | 5379 | console.log('1. $rootScope.isExtract=true and $rootScope.previousHighlightList != null') |
... | ... | @@ -5351,6 +5395,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5351 | 5395 | |
5352 | 5396 | else { |
5353 | 5397 | // This code will execute when user will select normal Mode but this time isHighlight will be false |
5398 | + console.log('highlightboy ELSE. $rootScope.isExtract= ' + $rootScope.isExtract + ', $rootScope.previousHighlightList.length= ' + $rootScope.previousHighlightList.length) | |
5354 | 5399 | |
5355 | 5400 | angular.forEach($scope.ColoredImageSRC, function (value, key) { |
5356 | 5401 | var id; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -159,7 +159,7 @@ |
159 | 159 | <button id="btnNormalMode" class="btn btn-primary btn-sm marginTop5 tooltip-custom" ng-click="enableNormalMode()" data-toggle="tooltip" data-placement="bottom" title="Normal"> <img src="content/images/bulb1.png" alt=""></button> |
160 | 160 | </div> |
161 | 161 | <div class="col-sm-6"> |
162 | - <button id="btnExtract" 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=""></button> | |
162 | + <button id="btnExtract" class="btn btn-black btn-sm pull-right marginTop5 tooltip-custom" ng-click="enableExtract(true)" data-toggle="tooltip" data-placement="bottom" title="Extract"><img src="content/images/bulb1.png" alt=""></button> | |
163 | 163 | </div> |
164 | 164 | |
165 | 165 | <div class="col-sm-6"> | ... | ... |