diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 37240cf..b13b5fa 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -81,6 +81,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.dragdivleft = 0; $scope.dragdivtop = 0; + $scope.drawnBodyRegions; + $scope.dragdivposition = { "left": $scope.dragdivleft, "top": $scope.dragdivtop @@ -595,7 +597,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //calculate coordinates for body region images $scope.CalculateImageCordinates = function (viewOrientationId) { - + $scope.drawnBodyRegions = []; //remove the previous layer mask data from array var n = $rootScope.MaskCanvasData.length @@ -642,7 +644,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo angular.forEach($scope.bodyRegionCoordinates, function (value, key) { - + if (value._HaveMirrorImage == 'Y') { @@ -815,7 +817,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } - + if ($rootScope.isHighLight == true && $scope.ColoredImageSRC.length == 9) { + console.log('$scope.ColoredImageSRC.length = ' + $scope.ColoredImageSRC.length) + $scope.highLightBody(); + } }); if ((DA[0].modesty == 'Y')) { @@ -880,7 +885,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } $('#draggable').css('width', dragdivw); - $('#draggable').css('height', dragdivh) + $('#draggable').css('height', dragdivh); + + } function scaleRectangle(x, y, height, width, mirrorValue) { @@ -4281,12 +4288,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.highLightBody = function () { - + console.log('htghlightbody') if ($rootScope.isHighLight == true) { $scope.grayeddBR = []; angular.forEach($scope.ColoredImageSRC, function (value, key) { + console.log('jjjj') + var id; if (value.haveMirror == 'true') { id = 'imageCanvas' + value.bodyRegionId + '_MR'; @@ -4324,7 +4333,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var dataURL = imageCanvas.toDataURL(); - + var img = new Image(); img.src = dataURL; @@ -4332,29 +4341,33 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo img.onload = function () { - //console.log(Math.max(img.width) + ', ' + Math.max(img.height)) + console.log('BRID= '+value.bodyRegionId +'IMGDATA= '+img.src) var DAData = new BitmapData(Math.max(img.width), Math.max(img.height)); DAData.draw(img); var colorMode; - if ($scope.isExtract == true) { + console.log('$scope.isExtract= ' + $scope.isExtract) colorMode = $scope.applyWhiteMatrix(img, context_gray); } else { + console.log('$scope.isExtract= ' + $scope.isExtract) + colorMode = $scope.applyGrayMatrix(img, context_gray); + console.log('colorMode= ' + colorMode) + } var zeroPoint = new Point(); - + DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode); context_gray.putImageData(DAData.data, 0, 0) var grayImageData = context_gray.getImageData(0, 0, width, ht); var grayImageImageDataVar = grayImageData.data; - + if ($scope.isExtract == true) { if (value.haveMirror == 'true') { $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData; @@ -4377,7 +4390,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } } - + $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);