Commit 2145f31087fe6cf7c12dff7578817d13a87fec42
1 parent
a96e4e23
medial arm was not loading in other than white skintone beacuse the data for bod…
…yregion 1 was only for W skintone in json. Fixed now
Showing
1 changed file
with
156 additions
and
83 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -813,7 +813,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
813 | 813 | var gender; |
814 | 814 | if (localStorage.getItem("genderId") == 'Female') { |
815 | 815 | gender = 'F'; |
816 | - } | |
816 | + } | |
817 | 817 | else { |
818 | 818 | gender = 'M'; |
819 | 819 | } |
... | ... | @@ -986,7 +986,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
986 | 986 | |
987 | 987 | } |
988 | 988 | |
989 | - | |
990 | 989 | $scope.GetImageSource = function (bodyRegionId) { |
991 | 990 | // debugger; |
992 | 991 | var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; |
... | ... | @@ -996,27 +995,39 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
996 | 995 | // debugger |
997 | 996 | $('#txtLayerNumber').attr('max', $scope.totalLayers); |
998 | 997 | $('#layerChangeSlider').slider("option", "max", $scope.totalLayers); |
999 | - // $('#layerChangeSlider').slider("option", "value",parseInt($scope.totalLayers)-parseInt($rootScope.layerNumber)); | |
998 | + // $('#layerChangeSlider').slider("option", "value",parseInt($scope.totalLayers)-parseInt($scope.layerNumber)); | |
1000 | 999 | |
1001 | 1000 | $scope.one = 1; |
1002 | 1001 | |
1003 | - $scope.userInput = parseInt($rootScope.layerNumber); | |
1002 | + $scope.userInput = parseInt($scope.layerNumber); | |
1004 | 1003 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
1005 | 1004 | |
1006 | 1005 | var SelectedLayerData = []; |
1007 | 1006 | SelectedLayerData = $rootScope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1]; |
1008 | 1007 | if ((SelectedLayerData != null || SelectedLayerData != undefined)) |
1009 | 1008 | |
1010 | - if ($rootScope.layerNumber == 0) { | |
1009 | + if ($scope.layerNumber == 0) { | |
1010 | + console.log('lNo: ' + $scope.layerNumber + ' and BodyRegion.length: ' + SelectedLayerData.BodyRegion.length); | |
1011 | + | |
1011 | 1012 | if (SelectedLayerData.BodyRegion.length > 0) { |
1012 | 1013 | for (var z = 0; z < SelectedLayerData.BodyRegion.length; z++) { |
1013 | 1014 | |
1014 | 1015 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; |
1015 | 1016 | var bodyRegionSkinTone = SelectedLayerData.BodyRegion[z].Image._SkintTone; |
1016 | 1017 | |
1017 | - if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { | |
1018 | + if ($rootScope.viewOrientationId == 3 && bodyRegionId==1) { | |
1019 | + console.log('$rootScope.voId: ' + $rootScope.voId); | |
1020 | + if (bodyRegion == bodyRegionId && bodyRegionSkinTone == 'W') { | |
1021 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/W/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1022 | + } | |
1023 | + } | |
1024 | + | |
1025 | + else { | |
1026 | + | |
1027 | + if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { | |
1018 | 1028 | |
1019 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1029 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1030 | + } | |
1020 | 1031 | } |
1021 | 1032 | } |
1022 | 1033 | } |
... | ... | @@ -1027,7 +1038,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1027 | 1038 | if (($rootScope.voId == '9') || ($rootScope.voId == '11') || ($rootScope.voId == '10') || ($rootScope.voId == '12')) { |
1028 | 1039 | var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId; |
1029 | 1040 | |
1030 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; | |
1041 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; | |
1031 | 1042 | |
1032 | 1043 | } |
1033 | 1044 | else // it is for other body view which have multiple body regions and layer no > 0 |
... | ... | @@ -1038,7 +1049,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1038 | 1049 | var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; |
1039 | 1050 | if (bodyRegion == bodyRegionId) { |
1040 | 1051 | |
1041 | - return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1052 | + return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $scope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1042 | 1053 | |
1043 | 1054 | |
1044 | 1055 | } |
... | ... | @@ -1048,6 +1059,67 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1048 | 1059 | } |
1049 | 1060 | |
1050 | 1061 | } |
1062 | + //$scope.GetImageSource = function (bodyRegionId) { | |
1063 | + // // debugger; | |
1064 | + // var dataLength = $rootScope.BodyLayerData.Layers.DataLayer.length; | |
1065 | + | |
1066 | + // //set max for LayerNumber input | |
1067 | + // $scope.totalLayers = dataLength - 1; | |
1068 | + // // debugger | |
1069 | + // $('#txtLayerNumber').attr('max', $scope.totalLayers); | |
1070 | + // $('#layerChangeSlider').slider("option", "max", $scope.totalLayers); | |
1071 | + // // $('#layerChangeSlider').slider("option", "value",parseInt($scope.totalLayers)-parseInt($rootScope.layerNumber)); | |
1072 | + | |
1073 | + // $scope.one = 1; | |
1074 | + | |
1075 | + // $scope.userInput = parseInt($rootScope.layerNumber); | |
1076 | + // $scope.skinTone = $rootScope.globalSetting.ethnicity; | |
1077 | + | |
1078 | + // var SelectedLayerData = []; | |
1079 | + // SelectedLayerData = $rootScope.BodyLayerData.Layers.DataLayer[dataLength - $scope.userInput - 1]; | |
1080 | + // if ((SelectedLayerData != null || SelectedLayerData != undefined)) | |
1081 | + | |
1082 | + // if ($rootScope.layerNumber == 0) { | |
1083 | + // if (SelectedLayerData.BodyRegion.length > 0) { | |
1084 | + // for (var z = 0; z < SelectedLayerData.BodyRegion.length; z++) { | |
1085 | + | |
1086 | + // var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; | |
1087 | + // var bodyRegionSkinTone = SelectedLayerData.BodyRegion[z].Image._SkintTone; | |
1088 | + | |
1089 | + // if (bodyRegion == bodyRegionId && bodyRegionSkinTone == $scope.skinTone) { | |
1090 | + | |
1091 | + // return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + $scope.skinTone + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1092 | + // } | |
1093 | + // } | |
1094 | + // } | |
1095 | + // } | |
1096 | + // else { | |
1097 | + // // debugger; | |
1098 | + // //below 4 bodyviews have only single body region | |
1099 | + // if (($rootScope.voId == '9') || ($rootScope.voId == '11') || ($rootScope.voId == '10') || ($rootScope.voId == '12')) { | |
1100 | + // var bodyRegion = SelectedLayerData.BodyRegion._BodyRegionId; | |
1101 | + | |
1102 | + // return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion.Image._ImageName; | |
1103 | + | |
1104 | + // } | |
1105 | + // else // it is for other body view which have multiple body regions and layer no > 0 | |
1106 | + // { | |
1107 | + // // debugger; | |
1108 | + // if (SelectedLayerData.BodyRegion.length > 0) { | |
1109 | + // for (var z = 0; z <= SelectedLayerData.BodyRegion.length; z++) { | |
1110 | + // var bodyRegion = SelectedLayerData.BodyRegion[z]._BodyRegionId; | |
1111 | + // if (bodyRegion == bodyRegionId) { | |
1112 | + | |
1113 | + // return "content/images/DA/" + $scope.zoomInOut + "/body-views/" + $rootScope.voId + "/layers/" + $rootScope.layerNumber + "/" + bodyRegionId + "/" + SelectedLayerData.BodyRegion[z].Image._ImageName; | |
1114 | + | |
1115 | + | |
1116 | + // } | |
1117 | + // } | |
1118 | + // } | |
1119 | + // } | |
1120 | + // } | |
1121 | + | |
1122 | + //} | |
1051 | 1123 | |
1052 | 1124 | $scope.GetBackgroundImgSource = function (bodyRegionId) { |
1053 | 1125 | // debugger; |
... | ... | @@ -1373,11 +1445,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1373 | 1445 | $rootScope.isLoading = true; |
1374 | 1446 | $('#spinner').css('visibility', 'visible'); |
1375 | 1447 | //$timeout(function () { |
1376 | - console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1377 | - $rootScope.isHighLight = true; | |
1378 | - console.log('just before highLightBody call'); | |
1379 | - $scope.highLightBody(); | |
1380 | - console.log('just after highLightBody call'); | |
1448 | + console.log('inside start of flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1449 | + $rootScope.isHighLight = true; | |
1450 | + console.log('just before highLightBody call'); | |
1451 | + $scope.highLightBody(); | |
1452 | + console.log('just after highLightBody call'); | |
1381 | 1453 | //}, 500); |
1382 | 1454 | } |
1383 | 1455 | } |
... | ... | @@ -1599,35 +1671,35 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1599 | 1671 | |
1600 | 1672 | console.log('1. annotationText: ' + annotationText); |
1601 | 1673 | |
1602 | - if ($('#dot').length > 0) { | |
1603 | - $('#dot').remove(); | |
1674 | + if ($('#dot').length > 0) { | |
1675 | + $('#dot').remove(); | |
1604 | 1676 | |
1605 | - if ($('#sppeachBubble').length > 0) { | |
1606 | - $('#sppeachBubble').remove(); | |
1607 | - } | |
1677 | + if ($('#sppeachBubble').length > 0) { | |
1678 | + $('#sppeachBubble').remove(); | |
1679 | + } | |
1608 | 1680 | |
1609 | 1681 | |
1610 | 1682 | |
1611 | - // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); | |
1683 | + // $scope.createDynamicSpeechBubble(evt, annotationText, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); | |
1612 | 1684 | |
1613 | 1685 | |
1614 | - $scope.MultiLanguageAnnationArray.push(annotationText); | |
1686 | + $scope.MultiLanguageAnnationArray.push(annotationText); | |
1615 | 1687 | |
1616 | - console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1688 | + console.log('2. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1617 | 1689 | |
1618 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1690 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1619 | 1691 | |
1620 | - } | |
1621 | - else { | |
1692 | + } | |
1693 | + else { | |
1622 | 1694 | |
1623 | 1695 | |
1624 | 1696 | |
1625 | - $scope.MultiLanguageAnnationArray = []; | |
1626 | - $scope.MultiLanguageAnnationArray.push(annotationText); | |
1697 | + $scope.MultiLanguageAnnationArray = []; | |
1698 | + $scope.MultiLanguageAnnationArray.push(annotationText); | |
1627 | 1699 | |
1628 | - console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1629 | - $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1630 | - } | |
1700 | + console.log('3. annotationText: ' + annotationText + ' , length: ' + $scope.MultiLanguageAnnationArray.length); | |
1701 | + $scope.createDynamicSpeechBubble(evt, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); | |
1702 | + } | |
1631 | 1703 | |
1632 | 1704 | |
1633 | 1705 | } |
... | ... | @@ -1693,11 +1765,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1693 | 1765 | $rootScope.isLoading = true; |
1694 | 1766 | $('#spinner').css('visibility', 'visible'); |
1695 | 1767 | //$timeout(function () { |
1696 | - console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1697 | - $rootScope.isHighLight = true; | |
1698 | - console.log('just before highLightBody call'); | |
1699 | - $scope.highLightBody(); | |
1700 | - console.log('just after highLightBody call'); | |
1768 | + console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) | |
1769 | + $rootScope.isHighLight = true; | |
1770 | + console.log('just before highLightBody call'); | |
1771 | + $scope.highLightBody(); | |
1772 | + console.log('just after highLightBody call'); | |
1701 | 1773 | //}, 500); |
1702 | 1774 | } |
1703 | 1775 | } |
... | ... | @@ -1707,7 +1779,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1707 | 1779 | } |
1708 | 1780 | } |
1709 | 1781 | |
1710 | - if (imgCanvas.id.match('_mci')) { | |
1782 | + if (imgCanvas.id.match('_mci')) { | |
1711 | 1783 | var maskImgData = context.getImageData(0, 0, w, h); |
1712 | 1784 | $rootScope.MaskCanvasData.push( |
1713 | 1785 | { |
... | ... | @@ -1840,7 +1912,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1840 | 1912 | //push workers in array to further used the refernece to delete the workers |
1841 | 1913 | $scope.runningWorkers.push({ 'workerName': worker }) |
1842 | 1914 | |
1843 | - console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white) | |
1915 | + console.log('for BRID = ' + bodyRegionId + ', coloredImageDataVar: ' + coloredImageDataVar + ', maskData= ' + maskData + ', white= ' + white) | |
1844 | 1916 | |
1845 | 1917 | if (coloredImageDataVar != null && maskData != null && white != null) { |
1846 | 1918 | worker.postMessage({ |
... | ... | @@ -1880,26 +1952,26 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1880 | 1952 | grayCanvasContext.putImageData(updatedData, 0, 0); |
1881 | 1953 | |
1882 | 1954 | |
1883 | - //to resolve lateral arm black issue in highlight mode | |
1955 | + //to resolve lateral arm black issue in highlight mode | |
1884 | 1956 | |
1885 | - if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { | |
1957 | + if ($rootScope.viewOrientationId == 5 && (bodyRegionId == 6 || bodyRegionId == 4)) { | |
1886 | 1958 | |
1887 | - var canavsWidth = parseInt(grayCanvas.width) ; | |
1888 | - var canavsHeight = parseInt(grayCanvas.height); | |
1959 | + var canavsWidth = parseInt(grayCanvas.width) ; | |
1960 | + var canavsHeight = parseInt(grayCanvas.height); | |
1889 | 1961 | |
1890 | - console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) | |
1962 | + console.log('canavsWidth= ' + canavsWidth + ', canavsHeight= ' + canavsHeight) | |
1891 | 1963 | |
1892 | - var imgData = grayCanvasContext.getImageData(0, 0, canavsWidth, canavsHeight); | |
1893 | - var data = imgData.data; | |
1894 | - var c = 0; | |
1895 | - for (var i = 0; i < data.length; i += 4) { | |
1896 | - if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
1897 | - data[i + 3] = 0; | |
1898 | - } | |
1964 | + var imgData = grayCanvasContext.getImageData(0, 0, canavsWidth, canavsHeight); | |
1965 | + var data = imgData.data; | |
1966 | + var c = 0; | |
1967 | + for (var i = 0; i < data.length; i += 4) { | |
1968 | + if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
1969 | + data[i + 3] = 0; | |
1970 | + } | |
1899 | 1971 | |
1972 | + } | |
1973 | + grayCanvasContext.putImageData(imgData, 0, 0); | |
1900 | 1974 | } |
1901 | - grayCanvasContext.putImageData(imgData, 0, 0); | |
1902 | - } | |
1903 | 1975 | |
1904 | 1976 | |
1905 | 1977 | if ($rootScope.multiAnnotationIsON == true) { |
... | ... | @@ -1995,22 +2067,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1995 | 2067 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
1996 | 2068 | } |
1997 | 2069 | } |
1998 | - else | |
2070 | + else | |
1999 | 2071 | |
2000 | 2072 | { |
2001 | - if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2073 | + if ($rootScope.updatedGrayDataList[bodyRegionId - 1] == null || $rootScope.updatedGrayDataList[bodyRegionId - 1] == undefined) { | |
2002 | 2074 | |
2003 | - if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { | |
2004 | - grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
2075 | + if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { | |
2076 | + grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; | |
2077 | + } | |
2005 | 2078 | } |
2006 | - } | |
2007 | - else { | |
2008 | - if ($rootScope.updatedGrayMRDataList[bodyRegionId] != null || $rootScope.updatedGrayMRDataList[bodyRegionId] != undefined) { | |
2009 | - grayImageDataVar = $rootScope.updatedGrayMRDataList[bodyRegionId] | |
2079 | + else { | |
2080 | + if ($rootScope.updatedGrayMRDataList[bodyRegionId] != null || $rootScope.updatedGrayMRDataList[bodyRegionId] != undefined) { | |
2081 | + grayImageDataVar = $rootScope.updatedGrayMRDataList[bodyRegionId] | |
2082 | + } | |
2010 | 2083 | } |
2011 | 2084 | } |
2012 | 2085 | } |
2013 | - } | |
2014 | 2086 | else { |
2015 | 2087 | if ($rootScope.grayImageMRDataList[bodyRegionId] != null || $rootScope.grayImageMRDataList[bodyRegionId] != undefined) { |
2016 | 2088 | grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; |
... | ... | @@ -2053,7 +2125,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2053 | 2125 | grayImageDataVar = $rootScope.updatedGrayDataList[bodyRegionId - 1]; |
2054 | 2126 | } |
2055 | 2127 | } |
2056 | - } | |
2128 | + } | |
2057 | 2129 | } |
2058 | 2130 | else |
2059 | 2131 | if ($rootScope.grayImageDataList[bodyRegionId - 1] != null || $rootScope.grayImageDataList[bodyRegionId - 1] != undefined) { |
... | ... | @@ -2431,7 +2503,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2431 | 2503 | $('#btnHighLight').addClass('btn-primary'); |
2432 | 2504 | |
2433 | 2505 | console.log('highLightBody call from DisableProgressBar') |
2434 | - // $scope.highLightBody(); | |
2506 | + // $scope.highLightBody(); | |
2435 | 2507 | |
2436 | 2508 | |
2437 | 2509 | |
... | ... | @@ -4733,7 +4805,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4733 | 4805 | |
4734 | 4806 | $scope.highLightBody = function () { |
4735 | 4807 | |
4736 | - // console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length + ' and $rootScope.viewOrientationId= ' + $rootScope.viewOrientationId); | |
4808 | + // console.log('highLightBody is called and ColoredImageSRC length: ' + $scope.ColoredImageSRC.length + ' and $rootScope.viewOrientationId= ' + $rootScope.viewOrientationId); | |
4737 | 4809 | |
4738 | 4810 | $scope.terminateCurrentlyRunningWPs(); |
4739 | 4811 | |
... | ... | @@ -4792,14 +4864,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4792 | 4864 | } |
4793 | 4865 | |
4794 | 4866 | |
4795 | - var context_gray = imageCanvas.getContext('2d'); | |
4867 | + var context_gray = imageCanvas.getContext('2d'); | |
4796 | 4868 | |
4797 | - var dataURL = imageCanvas.toDataURL(); | |
4869 | + var dataURL = imageCanvas.toDataURL(); | |
4798 | 4870 | |
4799 | 4871 | |
4800 | - var img = new Image(); | |
4872 | + var img = new Image(); | |
4801 | 4873 | |
4802 | - img.src = dataURL; | |
4874 | + img.src = dataURL; | |
4803 | 4875 | |
4804 | 4876 | img.onload = function () { |
4805 | 4877 | |
... | ... | @@ -4821,27 +4893,27 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
4821 | 4893 | DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); |
4822 | 4894 | |
4823 | 4895 | |
4824 | - context_gray.putImageData(DAData.data, 0, 0) | |
4896 | + context_gray.putImageData(DAData.data, 0, 0) | |
4825 | 4897 | |
4826 | - // to resolve lateral arm black issue in highlight mode | |
4898 | + // to resolve lateral arm black issue in highlight mode | |
4827 | 4899 | |
4828 | - if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) { | |
4900 | + if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) { | |
4829 | 4901 | |
4830 | - var imgData = context_gray.getImageData(0, 0, width, ht); | |
4831 | - var data = imgData.data; | |
4832 | - var c=0; | |
4833 | - for (var i = 0; i < data.length; i += 4) { | |
4834 | - if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
4835 | - data[i + 3] = 0; | |
4836 | - } | |
4837 | - | |
4902 | + var imgData = context_gray.getImageData(0, 0, width, ht); | |
4903 | + var data = imgData.data; | |
4904 | + var c=0; | |
4905 | + for (var i = 0; i < data.length; i += 4) { | |
4906 | + if (data[i] == data[i + 1] && data[i + 1] == data[i + 2] && data[i + 2] === 0) { | |
4907 | + data[i + 3] = 0; | |
4838 | 4908 | } |
4839 | - context_gray.putImageData(imgData, 0, 0); | |
4909 | + | |
4840 | 4910 | } |
4911 | + context_gray.putImageData(imgData, 0, 0); | |
4912 | + } | |
4841 | 4913 | |
4842 | - // | |
4843 | - //push BRID into array | |
4844 | - $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); | |
4914 | + // | |
4915 | + //push BRID into array | |
4916 | + $scope.grayedBR.push({ 'BRID': value.bodyRegionId }); | |
4845 | 4917 | |
4846 | 4918 | var grayImageData = context_gray.getImageData(0, 0, width, ht); |
4847 | 4919 | var grayImageImageDataVar = grayImageData.data; |
... | ... | @@ -5473,7 +5545,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5473 | 5545 | $rootScope.voId = currentBodyViewId; |
5474 | 5546 | |
5475 | 5547 | $scope.skinTone = $rootScope.globalSetting.ethnicity; |
5476 | - | |
5548 | + if($scope.NavigatorData!=null || $scope.NavigatorData!=undefined){ | |
5477 | 5549 | var navdtlOrient = new jinqJs() |
5478 | 5550 | .from($scope.NavigatorData.Navigtor.ViewOrientation) |
5479 | 5551 | .where("_ViewOrientationId == " + $scope.voId) |
... | ... | @@ -5507,6 +5579,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5507 | 5579 | } |
5508 | 5580 | } |
5509 | 5581 | } |
5582 | + } | |
5510 | 5583 | |
5511 | 5584 | //Annotation tool event lsitener |
5512 | 5585 | ... | ... |