Commit fcaafcc9ecbc5e3f495579b0f5990f55f6604b25

Authored by Amrita Vishnoi
1 parent 963ba6b5

Refs: #4464

issues fixed
Case: if CTRL pressed first time and highlighted multiple regions then left CTRL, unhighlight other regions and highlight only the recently clicked region.
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -1039,6 +1039,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
1039 1039 {
1040 1040 $scope.multiAnnotationIsON = true;
1041 1041 }
  1042 + else
  1043 + {
  1044 + $scope.multiAnnotationIsON = false;
  1045 + }
1042 1046  
1043 1047 // debugger;
1044 1048 var annotationText;
... ... @@ -3108,7 +3112,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3108 3112  
3109 3113 img.src = dataURL;
3110 3114  
3111   -
3112 3115 var DAData = new BitmapData(img.width, img.height);
3113 3116 DAData.draw(img);
3114 3117 var RED = 0.3086; // luminance contrast value for red
... ... @@ -3133,7 +3136,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3133 3136 var grayImageData = context_gray.getImageData(0, 0, width, ht);
3134 3137 var grayImageImageDataVar = grayImageData.data;
3135 3138  
3136   -
3137 3139 if (value.haveMirror == 'true') {
3138 3140 $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
3139 3141 }
... ... @@ -3150,6 +3152,33 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3150 3152  
3151 3153 }
3152 3154  
  3155 + $scope.applyGrayMatrix = function (img, context_gray)
  3156 + {
  3157 + var DAData = new BitmapData(img.width, img.height);
  3158 + DAData.draw(img);
  3159 + var RED = 0.3086; // luminance contrast value for red
  3160 + var GREEN = 0.694; // luminance contrast value for green
  3161 + var BLUE = 0.0820; // luminance contrast value for blue
  3162 +
  3163 + var RGB = [RED, GREEN, BLUE, 0, 0];
  3164 + var RGB2 = [RED, GREEN, BLUE, 0, 0];
  3165 + var RGB3 = [RED, GREEN, BLUE, 0, 0];
  3166 + var ALPHA = [0, 0, 0, 1, 0];
  3167 +
  3168 + var rgbPx = RGB.concat(RGB2);
  3169 + var rgbPx2 = rgbPx.concat(RGB3);
  3170 + var matrix = rgbPx2.concat(ALPHA);
  3171 +
  3172 + var zeroPoint = new Point();
  3173 + var grayScale = new ColorMatrixFilter(matrix);
  3174 + DAData.applyFilter(DAData, DAData.rect, zeroPoint, grayScale);
  3175 +
  3176 + context_gray.putImageData(DAData.data, 0, 0)
  3177 +
  3178 + var grayImageData = context_gray.getImageData(0, 0, width, ht);
  3179 + var grayImageImageDataVar = grayImageData.data;
  3180 +
  3181 + }
3153 3182  
3154 3183 $scope.getActualTermNumber = function (iColor) {
3155 3184 $scope.actualTermNo = new jinqJs()
... ...