diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 6c4be35..5115f84 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -30,30 +30,40 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.TBDrawStartY; $rootScope.isHighLight = false; + + // grayHighlight $rootScope.coloredImageCanvasList = []; $rootScope.coloredImageMRCanvasList = []; $rootScope.ColoredCanvasData = []; $rootScope.grayImageDataList = []; $rootScope.grayImageMRDataList = []; - - $rootScope.grayImageDataListCurrent = []; - $rootScope.grayImageMRDataListCurrent = []; - - $scope.zoomInOut = 75; - $scope.i = 0; - $scope.speachBubbleArray = []; - $scope.multiAnnotationIsON = false; + $rootScope.updatedGrayDataList = []; + $rootScope.updatedGrayMRDataList = []; $scope.previousGrayImageDataVar; $scope.previousGrayCanvas; - $scope.previousSelectedTermList = []; $scope.runningWorkers = []; - $scope.highlightedBR=[]; + $scope.highlightedBR = []; // This variable is used for unhighlight previously highlighted body portion, if multiAnnotation is false. $scope.machedIcolorInBodyRegion = []; $scope.MaskCanvasData = []; + //Extract + $rootScope.isExtract = false; + $rootScope.whiteImageDataList = []; + $rootScope.whiteImageMRDataList = []; + $rootScope.updatedWhiteDataList = []; + $rootScope.updatedWhiteMRDataList = []; + + //zoom + $scope.zoomInOut = 75; + $scope.i = 0; + $scope.speachBubbleArray = []; + $scope.multiAnnotationIsON = false; + + + //array for bodyviewid correspoing to male female(used for gender change) $scope.correspondingBodyViewIds = { '1': '5', @@ -1410,7 +1420,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // console.log('Start time taken for term: ' + TermList[i]._TermNumber + 'in posting: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")); //debugger - console.log('fjfhdjkfhdjf') $timeout(function () { for (var x = 0; x < 9; x++) { // console.log('$rootScope.MaskCanvasData.length= ' + n) @@ -1429,7 +1438,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.multiAnnotationIsON == true) { - grayImageDataVar = $rootScope.grayImageMRDataListCurrent[bodyRegionId] + grayImageDataVar =$rootScope.updatedGrayMRDataList[bodyRegionId] } else grayImageDataVar = $rootScope.grayImageMRDataList[bodyRegionId]; @@ -1437,7 +1446,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.isExtract) { if ($scope.multiAnnotationIsON == true) { - grayImageDataVar = $rootScope.grayImageMRDataListCurrent[bodyRegionId] + grayImageDataVar =$rootScope.updatedGrayMRDataList[bodyRegionId] } else grayImageDataVar = $rootScope.whiteImageMRDataList[bodyRegionId]; @@ -1448,7 +1457,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo coloredImageDataVar = $rootScope.coloredImageCanvasList[bodyRegionId - 1]; if ($scope.multiAnnotationIsON == true) { - grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId - 1] + grayImageDataVar = $rootScope.updatedGrayDataList [bodyRegionId - 1] } else grayImageDataVar = $rootScope.grayImageDataList[bodyRegionId - 1]; @@ -1457,7 +1466,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($rootScope.isExtract) { if ($scope.multiAnnotationIsON == true) { - grayImageDataVar = $rootScope.grayImageDataListCurrent[bodyRegionId] + grayImageDataVar = $rootScope.updatedGrayDataList [bodyRegionId] } else grayImageDataVar = $rootScope.whiteImageDataList[bodyRegionId]; @@ -1515,18 +1524,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if (canvasId.match('_MR')) - $rootScope.grayImageMRDataListCurrent[bodyRegionId] = updatedData; + $rootScope.updatedGrayMRDataList[bodyRegionId] = updatedData; else - $rootScope.grayImageDataListCurrent[bodyRegionId - 1] = updatedData; + $rootScope.updatedGrayDataList [bodyRegionId - 1] = updatedData; $scope.highlightedBR.push({ 'bodyRegionId': bodyRegionId }); if ($scope.highlightedBR.length == 9) { - if ($scope.HighlightBodysystem == true) + if ($scope.isHighlightBodysystem == true) $rootScope.isLoading = false; $('#spinner').css('visibility', 'hidden'); + + $scope.isHighlightBodysystem = false; } }; @@ -3656,7 +3667,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo //} //body highlight options functinality - $scope.LoadBodySystemList = function () { + $scope.LoadBodySystemData = function () { var currentBodyViewId = $scope.voId; var systemListHtml = '