diff --git a/400-SOURCECODE/AIAHTML5.Web/Web.config b/400-SOURCECODE/AIAHTML5.Web/Web.config
index 844c19d..81b5072 100644
--- a/400-SOURCECODE/AIAHTML5.Web/Web.config
+++ b/400-SOURCECODE/AIAHTML5.Web/Web.config
@@ -37,9 +37,8 @@
-
-
-
+
+
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 1792d45..9b0eda1 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -221,17 +221,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
else {
userEthnicity = $rootScope.globalSetting.ethnicity;
}
-
+
var curentmodesty = localStorage.getItem("globalmodesty");
if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
userModestysettings = curentmodesty
}
- else{
+ else {
userModestysettings = $rootScope.globalSetting.modesty;
}
-
-
+
+
//var userSelectedSkintone = 'W';
//$scope.userModestySetting = 'Y'
var thumbnailImage;
@@ -352,12 +352,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
$rootScope.globalSetting.ethnicity = curentEthnicity;
}
-
+
var curentmodesty = localStorage.getItem("globalmodesty");
if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
$rootScope.globalSetting.modesty = curentmodesty
}
-
+
//0.1
var currentBodyViewId = localStorage.getItem("currentBodyViewId");
@@ -1167,6 +1167,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.multiAnnotationIsON = true;
}
else {
+ if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) {
+ $rootScope.previousHighlightList = [];
+ }
+
$rootScope.multiAnnotationIsON = false;
}
@@ -1367,52 +1371,47 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
);
- // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
+ // console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
- if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
-
- if((($rootScope.viewOrientationId=='1') || ($rootScope.viewOrientationId=='4')) && ($scope.ColoredImageSRC.length == 9))
- {
+ if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
+
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
$scope.isEligibleForHighlight = true;
}
- else if((($rootScope.viewOrientationId=='2') || ($rootScope.viewOrientationId=='3')) && ($scope.ColoredImageSRC.length == 5))
- {
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
$scope.isEligibleForHighlight = true;
}
- else if(($rootScope.viewOrientationId=='5') && ($scope.ColoredImageSRC.length == 4))
- {
+ else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
$scope.isEligibleForHighlight = true;
}
- else if(($rootScope.viewOrientationId=='6') && ($scope.ColoredImageSRC.length == 1))
- {
+ else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
$scope.isEligibleForHighlight = true;
}
else {
$scope.isEligibleForHighlight = false;
}
- if($scope.isEligibleForHighlight == true)
- {
+ if ($scope.isEligibleForHighlight == true) {
if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
-
- $rootScope.isLoading = true;
- $('#spinner').css('visibility', 'visible');
- $timeout(function () {
- console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
- $rootScope.isHighLight = true;
- $scope.highLightBody()
- }, 500);
- }
- }
+ $rootScope.isLoading = true;
+ $('#spinner').css('visibility', 'visible');
+ $timeout(function () {
+ console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
+ $rootScope.isHighLight = true;
+
+ $scope.highLightBody()
+ }, 500);
+ }
+ }
}
- // console.log('ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
+ // console.log('ColoredImageSRC. pushed and length: ' + $scope.ColoredImageSRC.length);
}
if (FlipedImgCanvas.id.match('_mci')) {
@@ -1438,7 +1437,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
$scope.DrawImage = function (h, w, x, y, src, bodyRegionId, isMaskImage) {
-
+
var imgCanvas = document.createElement('canvas');
// imgCanvas.style.backgroundColor = 'red';
imgCanvas.height = h;
@@ -1495,6 +1494,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$rootScope.multiAnnotationIsON = true;
}
else {
+ if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && ($rootScope.previousHighlightList.length > 0)) {
+ $rootScope.previousHighlightList = [];
+ }
$rootScope.multiAnnotationIsON = false;
}
@@ -1686,8 +1688,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (bodyRegionId == 'modestyImg3' || bodyRegionId == 'modestyImg2') {
//do nothing
}
- else
- {
+ else {
$scope.ColoredImageSRC.push(
{
"bodyRegionId": bodyRegionId, "SRC": src,
@@ -1700,28 +1701,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
);
- console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
+ //console.log('$rootScope.isListManagerSelected= ' + $rootScope.isListManagerSelected + ' length= ' + $scope.ColoredImageSRC.length)
- if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
+ if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
- if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
- $scope.isEligibleForHighlight = true;
- }
- else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
- $scope.isEligibleForHighlight = true;
- }
- else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
- $scope.isEligibleForHighlight = true;
- }
- else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
- $scope.isEligibleForHighlight = true;
- }
- else {
- $scope.isEligibleForHighlight = false;
- }
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
+ $scope.isEligibleForHighlight = true;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
+ $scope.isEligibleForHighlight = true;
+ }
+ else if (($rootScope.viewOrientationId == '5') && ($scope.ColoredImageSRC.length == 4)) {
+ $scope.isEligibleForHighlight = true;
+ }
+ else if (($rootScope.viewOrientationId == '6') && ($scope.ColoredImageSRC.length == 1)) {
+ $scope.isEligibleForHighlight = true;
+ }
+ else {
+ $scope.isEligibleForHighlight = false;
+ }
- if ($scope.isEligibleForHighlight == true) {
- if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
+ if ($scope.isEligibleForHighlight == true) {
+ if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) {
$rootScope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
@@ -1743,37 +1744,37 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
}
- // if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) && ($scope.ColoredImageSRC.length == 9)) {
- // console.log('after check= ' + $scope.ColoredImageSRC.length)
- // $rootScope.isLoading = false;
- // $('#spinner').css('visibility', 'hidden');
-
- // if ($rootScope.isListManagerSelected == true || $rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
- // $rootScope.isLoading = true;
- // $('#spinner').css('visibility', 'visible');
- // $timeout(function () {
- // console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
- // $rootScope.isHighLight = true;
-
- // $scope.highLightBody()
- // }, 500);
- // }
- // }
- // }
+ // if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined) && ($scope.ColoredImageSRC.length == 9)) {
+ // console.log('after check= ' + $scope.ColoredImageSRC.length)
+ // $rootScope.isLoading = false;
+ // $('#spinner').css('visibility', 'hidden');
+
+ // if ($rootScope.isListManagerSelected == true || $rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
+ // $rootScope.isLoading = true;
+ // $('#spinner').css('visibility', 'visible');
+ // $timeout(function () {
+ // console.log('$scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length)
+ // $rootScope.isHighLight = true;
+
+ // $scope.highLightBody()
+ // }, 500);
+ // }
+ // }
+ // }
+
+ //}
+ if (imgCanvas.id.match('_mci')) {
+ var maskImgData = context.getImageData(0, 0, w, h);
+ $rootScope.MaskCanvasData.push(
+ {
+ "bodyRegionId": bodyRegionId,
+ "canvasId": imgCanvas.id,
+ "maskData": maskImgData,
+
+ }
+ );
+ }
- //}
- if (imgCanvas.id.match('_mci')) {
- var maskImgData = context.getImageData(0, 0, w, h);
- $rootScope.MaskCanvasData.push(
- {
- "bodyRegionId": bodyRegionId,
- "canvasId": imgCanvas.id,
- "maskData": maskImgData,
-
- }
- );
- }
-
};
if (document.getElementById('canvasDiv') != null)
@@ -1797,7 +1798,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (TermList != null) {
//4.
-
$scope.HighlightBodyByTermList(TermList);
}
}
@@ -1909,27 +1909,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var bodyRegionId = e.data.bodyRegionId;
- //if ((CallBackBodyRegion != null || CallBackBodyRegion != undefined))
- //{
- // if (CallBackBodyRegion.length > 0) {
- // for (var i = 1; i <= CallBackBodyRegion.length; i++) {
- // if (CallBackBodyRegion[i].match(bodyRegionId)) {
- // console.log("already have body region id: " + bodyRegionId);
- // }
- // else {
- // CallBackBodyRegion.push(bodyRegionId);
-
- // console.log("pushed body region id: " + bodyRegionId);
- // }
- // }
- // }
- // else
-
- // {
- // CallBackBodyRegion.push(bodyRegionId);
- // }
- //}
-
var canvasId = (e.data.canvasId).replace('_mci', '');
//debugger;
//for (var i = 1; i <= updatedData.length; i++) {
@@ -1988,7 +1967,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
console.log('HighlightBodyByTermList is called');
- $scope.highlightedBR = null;
+ // $scope.highlightedBR = null;
$scope.highlightedBR = [];
$scope.terminateCurrentlyRunningWPs();
@@ -2390,17 +2369,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$timeout(function () { $scope.DisableProgressBar() }, 1000);
}
- //if ($rootScope.isHighLight) {
- // //alert('isHighlight: ' + $scope.isHighLight);
-
- // $('#btnHighLight').removeClass('btn btn-black');
- // $('#btnHighLight').addClass('btn-primary');
-
- // $timeout(function () { $scope.highLightBody() }, 350);
-
-
-
- //}
$('#layerChangeSlider').slider("option", "value", parseInt($scope.totalLayers) - parseInt($scope.layerNumber));
}
@@ -4339,7 +4307,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
var tBox = document.getElementById('transparencyCanvas');
-
+
if (tBox != null) {
tBox.parentNode.removeChild(tBox)
var elements = document.getElementsByClassName('ui-icon ui-icon-gripsmall-diagonal-se');
@@ -4618,9 +4586,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}
-
-
- $timeout(function () { $scope.highLightBody() }, 50);
+ else {
+ $timeout(function () { $scope.highLightBody() }, 50);
+ }
}
@@ -4719,101 +4687,90 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
$scope.terminateCurrentlyRunningWPs();
//different body views have different count of bodyegions so the length of ColoredImageSRC will be different
- if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
-
- if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
- $scope.doHighlightOrExtract = true;
- }
- else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
- $scope.doHighlightOrExtract = true;
- }
- else if ((($rootScope.viewOrientationId == '5')) && ($scope.ColoredImageSRC.length == 4)) {
- $scope.doHighlightOrExtract = true;
- }
- else if ((($rootScope.viewOrientationId == '6')) && ($scope.ColoredImageSRC.length == 1)) {
- $scope.doHighlightOrExtract = true;
- }
- else {
- $scope.doHighlightOrExtract = false;
- }
-
-
- if ($scope.doHighlightOrExtract == true) {
- if ($rootScope.isHighLight == true) {
-
- $scope.grayeddBR = [];
-
- angular.forEach($scope.ColoredImageSRC, function (value, key) {
- console.log('$scope.ColoredImageSRC length begore gray= ' + $scope.ColoredImageSRC.length)
- var id;
- if (value.haveMirror == 'true') {
- id = 'imageCanvas' + value.bodyRegionId + '_MR';
- }
- else {
- id = 'imageCanvas' + value.bodyRegionId;
- }
-
- //alert(value.bodyRegionId)
-
- var imageCanvas = document.getElementById(id);
+ if (($scope.ColoredImageSRC != null || $scope.ColoredImageSRC != undefined)) {
- //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
- //var coloredCanvas = document.getElementById(coloredCanvasID);
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.ColoredImageSRC.length == 9)) {
+ $scope.doHighlightOrExtract = true;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.ColoredImageSRC.length == 5)) {
+ $scope.doHighlightOrExtract = true;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && ($scope.ColoredImageSRC.length == 4)) {
+ $scope.doHighlightOrExtract = true;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && ($scope.ColoredImageSRC.length == 1)) {
+ $scope.doHighlightOrExtract = true;
+ }
+ else {
+ $scope.doHighlightOrExtract = false;
+ }
- var width = value.Width;
- var ht = value.Height;
- var coloredCanvasContext = imageCanvas.getContext("2d");
- var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
- var coloredImageDataVar = coloredImageData;
+ if ($scope.doHighlightOrExtract == true) {
+ if ($rootScope.isHighLight == true) {
+ $scope.grayedBR = [];
- if (value.haveMirror == 'true') {
- $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
- }
- else {
+ angular.forEach($scope.ColoredImageSRC, function (value, key) {
+ console.log('$scope.ColoredImageSRC length before gray= ' + $scope.ColoredImageSRC.length)
+ var id;
+ if (value.haveMirror == 'true') {
+ id = 'imageCanvas' + value.bodyRegionId + '_MR';
+ }
+ else {
+ id = 'imageCanvas' + value.bodyRegionId;
+ }
+ var imageCanvas = document.getElementById(id);
- $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
+ var width = value.Width;
+ var ht = value.Height;
- }
+ var coloredCanvasContext = imageCanvas.getContext("2d");
+ var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
+ var coloredImageDataVar = coloredImageData;
- var context_gray = imageCanvas.getContext('2d');
-
- var dataURL = imageCanvas.toDataURL();
+ if (value.haveMirror == 'true') {
+ $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
+ }
+ else {
- var img = new Image();
+ $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
- img.src = dataURL;
+ }
+ var context_gray = imageCanvas.getContext('2d');
+ var dataURL = imageCanvas.toDataURL();
+ var img = new Image();
+ img.src = dataURL;
- img.onload = function () {
- // console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= '
- // + value.bodyRegionId)
+ img.onload = function () {
+ console.log('Before BitmapData call, width: ' + Math.max(img.width) + ', height: ' + Math.max(img.height) + ' value.bodyRegionId= '
+ + value.bodyRegionId)
- var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
- DAData.draw(img);
+ var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
+ DAData.draw(img);
- var colorMode;
+ var colorMode;
- if ($scope.isExtract == true) {
- colorMode = $scope.applyWhiteMatrix(img, context_gray);
- }
- else {
- colorMode = $scope.applyGrayMatrix(img, context_gray);
- }
+ if ($scope.isExtract == true) {
+ colorMode = $scope.applyWhiteMatrix(img, context_gray);
+ }
+ else {
+ colorMode = $scope.applyGrayMatrix(img, context_gray);
+ }
- var zeroPoint = new Point();
+ var zeroPoint = new Point();
- DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
+ DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
- context_gray.putImageData(DAData.data, 0, 0)
+ context_gray.putImageData(DAData.data, 0, 0)
- //NIKI- to resolve lateral arm black issue in highlight mode
+ $scope.grayedBR.push({ 'BRID': value.bodyRegionId });
if ($rootScope.viewOrientationId == 5 && (value.bodyRegionId == 6 ||value.bodyRegionId==4)) {
@@ -4834,291 +4791,248 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
- //push BRID into array
- $scope.grayeddBR.push({ 'BRID': value.bodyRegionId });
- var grayImageData = context_gray.getImageData(0, 0, width, ht);
- var grayImageImageDataVar = grayImageData.data;
+ 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;
- }
- else {
-
- $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
- }
+ if ($scope.isExtract == true) {
+ if (value.haveMirror == 'true') {
+ $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
}
else {
- if (value.haveMirror == 'true') {
- $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
- }
- else {
-
- $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
- }
+ $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
}
+ }
+ else {
+ if (value.haveMirror == 'true') {
+ $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ }
+ else {
+ $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
+ }
+ }
- if ($scope.grayeddBR != null || $scope.grayeddBR != undefined) {
- if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayeddBR.length == 9)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
- }
- else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayeddBR.length == 5)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
- }
- else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayeddBR.length == 4)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
- }
- else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayeddBR.length == 1)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- $scope.doHighlightOrExtract = false;
- }
- else {
-
- $scope.isEligibleForHighlightBodyByTermList = false;
- }
-
- if ($scope.isEligibleForHighlightBodyByTermList == true) {
- //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
- if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
- $scope.isLoading = false;
-
- $('#spinner').css('visibility', 'hidden');
- }
-
- if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
-
- $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
- }
- else if ($scope.isHighlightByListManager == true) {
-
- // console.log('$scope.grayeddBR.length is ' + $scope.grayeddBR.length);
- $timeout(function () {
-
- // $rootScope.isHighLight = false;
- //align
- // $scope.aligneCanvasWithTerm();
-
- $scope.HighlightBodyByTermList($scope.AllTerms)
- }, 800);
-
- }
-
- if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
-
-
- //console.log('inside highlight body');
-
- var multiTermList = [];
- angular.forEach($rootScope.previousHighlightList, function (value, key) {
- //debugger;
+ if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ $scope.doHighlightOrExtract = false;
+ }
+ else {
- var ActualTermNo = $scope.getActualTermNumber(value);
- if (ActualTermNo != null) {
- var TermList = $scope.getTermNumberList(ActualTermNo);
- if (TermList != null) {
- for (var i = 0; i < TermList.length; i++) {
+ $scope.isEligibleForHighlightBodyByTermList = false;
+ }
- multiTermList.push(TermList[i]);
- }
- }
- }
+ if ($scope.isEligibleForHighlightBodyByTermList == true) {
+ //DISABLE PROGERSS BAR FOR GENDER OR VIEW CHANGE
+ if ($rootScope.isGenderChnage == true || $rootScope.isViewChange == true) {
+ $scope.isLoading = false;
- });
+ $('#spinner').css('visibility', 'hidden');
+ }
+ if (($scope.isHighlightBodysystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined)) {
- $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80);
- }
+ $timeout(function () { $scope.HighlightBodyByTermList($scope.systemMatchedTermList) }, 100);
+ }
+ else if ($scope.isHighlightByListManager == true) {
+ // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length);
+ $timeout(function () {
+ $scope.HighlightBodyByTermList($scope.AllTerms)
+ }, 800);
}
- }
+ }
}
- $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
-
-
- // console.log('the value of isHighlightByListManager ' + $scope.isHighlightByListManager);
-
- // console.log('$scope.grayeddBR.length: ' + $scope.grayeddBR.length)
-
+ }
+ $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
- if ($rootScope.isExtract == true) {
- if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
+ if ($rootScope.isExtract == true) {
+ if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
- $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
- }
+ $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
}
- else {
- // this code is for the case where user first clcik on normal mode then extract then again highlight then we need to call highlight body in gray mode
- //and then highlight the previously selected body regions at the time of normal mode.
- if ($scope.grayeddBR != null || $scope.grayeddBR != undefined) {
- if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayeddBR.length == 9)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- }
- else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayeddBR.length == 5)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- }
- else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayeddBR.length == 4)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- }
- else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayeddBR.length == 1)) {
- $scope.isEligibleForHighlightBodyByTermList = true;
- }
+ }
+ else {
+ // this code is for the case where user first clcik on normal mode then extract then again highlight then we need to call highlight body in gray mode
+ //and then highlight the previously selected body regions at the time of normal mode.
+ if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
+ $scope.isEligibleForHighlightBodyByTermList = true;
+ }
- if ($scope.isEligibleForHighlightBodyByTermList == true) {
- if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
+ }
- var multiTermList = [];
- angular.forEach($rootScope.previousHighlightList, function (value, key) {
+ //
+ }
+ })
- //debugger;
+ if ($scope.isEligibleForHighlightBodyByTermList == true) {
+ if (($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined) && $rootScope.previousHighlightList.length > 0) {
- var ActualTermNo = $scope.getActualTermNumber(value);
- if (ActualTermNo != null) {
- var TermList = $scope.getTermNumberList(ActualTermNo);
- if (TermList != null) {
- for (var i = 0; i < TermList.length; i++) {
+ var multiTermList = [];
+ angular.forEach($rootScope.previousHighlightList, function (value, key) {
- multiTermList.push(TermList[i]);
- }
- }
- }
+ //debugger;
- });
+ var ActualTermNo = $scope.getActualTermNumber(value);
+ if (ActualTermNo != null) {
+ var TermList = $scope.getTermNumberList(ActualTermNo);
+ if (TermList != null) {
+ for (var i = 0; i < TermList.length; i++) {
- console.log('HighlightBodyByTermList with multiTermList');
- $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80);
+ multiTermList.push(TermList[i]);
}
-
}
}
- //
- }
- })
+ });
+
+ $timeout(function () { $scope.HighlightBodyByTermList(multiTermList) }, 80);
+ }
}
+ }
- else {
- // This code will execute when user will select normal Mode but this time isHighlight will be false
- angular.forEach($scope.ColoredImageSRC, function (value, key) {
- var id;
- if (value.haveMirror == 'true') {
- id = 'imageCanvas' + value.bodyRegionId + '_MR';
- }
- else {
- id = 'imageCanvas' + value.bodyRegionId;
- }
+ else {
+ // This code will execute when user will select normal Mode but this time isHighlight will be false
- var imageCanvas = document.getElementById(id);
+ angular.forEach($scope.ColoredImageSRC, function (value, key) {
+ var id;
+ if (value.haveMirror == 'true') {
+ id = 'imageCanvas' + value.bodyRegionId + '_MR';
+ }
+ else {
+ id = 'imageCanvas' + value.bodyRegionId;
+ }
- //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
- //var coloredCanvas = document.getElementById(coloredCanvasID);
+ var imageCanvas = document.getElementById(id);
- var width = value.Width;
- var ht = value.Height;
+ //var coloredCanvasID = 'imageCanvas' + bodyRegionId;
+ //var coloredCanvas = document.getElementById(coloredCanvasID);
- var coloredCanvasContext = imageCanvas.getContext("2d");
- var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
- var coloredImageDataVar = coloredImageData;
+ var width = value.Width;
+ var ht = value.Height;
+ var coloredCanvasContext = imageCanvas.getContext("2d");
+ var coloredImageData = coloredCanvasContext.getImageData(0, 0, width, ht);
+ var coloredImageDataVar = coloredImageData;
- if (value.haveMirror == 'true') {
- $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
- }
- else {
- $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
+ if (value.haveMirror == 'true') {
+ $rootScope.coloredImageMRCanvasList[parseInt(value.bodyRegionId)] = coloredImageDataVar;
+ }
+ else {
- }
+ $rootScope.coloredImageCanvasList[parseInt(value.bodyRegionId - 1)] = coloredImageDataVar;
+ }
- var context = imageCanvas.getContext('2d');
+ var context = imageCanvas.getContext('2d');
- var dataURL = imageCanvas.toDataURL();
+ var dataURL = imageCanvas.toDataURL();
- var img = new Image();
- img.src = dataURL;
+ var img = new Image();
+ img.src = dataURL;
- img.onload = function () {
- //console.log(Math.max(img.width) + ', ' + Math.max(img.height))
- var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
- DAData.draw(img);
+ img.onload = function () {
+ //console.log(Math.max(img.width) + ', ' + Math.max(img.height))
- var colorMode;
+ var DAData = new BitmapData(Math.max(img.width), Math.max(img.height));
+ DAData.draw(img);
- if ($scope.isExtract == true) {
- colorMode = $scope.applyWhiteMatrix(img, context);
- }
+ var colorMode;
- var zeroPoint = new Point();
+ if ($scope.isExtract == true) {
+ colorMode = $scope.applyWhiteMatrix(img, context);
+ }
- DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
+ var zeroPoint = new Point();
- context.putImageData(DAData.data, 0, 0)
+ DAData.applyFilter(DAData, DAData.rect, zeroPoint, colorMode);
- var grayImageData = context.getImageData(0, 0, width, ht);
- var grayImageImageDataVar = grayImageData.data;
+ context.putImageData(DAData.data, 0, 0)
- if ($scope.isExtract == true) {
- if (value.haveMirror == 'true') {
- $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
- }
- else {
+ var grayImageData = context.getImageData(0, 0, width, ht);
+ var grayImageImageDataVar = grayImageData.data;
- $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
- }
+ if ($scope.isExtract == true) {
+ if (value.haveMirror == 'true') {
+ $rootScope.whiteImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
}
else {
- if (value.haveMirror == 'true') {
- $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
- }
- else {
+ $rootScope.whiteImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
+ }
+ }
+ else {
- $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
- }
+ if (value.haveMirror == 'true') {
+ $rootScope.grayImageMRDataList[parseInt(value.bodyRegionId)] = grayImageData;
+ }
+ else {
+
+ $rootScope.grayImageDataList[parseInt(value.bodyRegionId - 1)] = grayImageData;
}
}
+ }
- $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
- })
+ $timeout(function () { imageCanvas.style.visibility = 'visible' }, 50);
+ })
- if ($rootScope.isExtract == true) {
- if ($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined || $rootScope.previousHighlightList.length > 0) {
+ if ($rootScope.isExtract == true) {
+ if ($rootScope.previousHighlightList != null || $rootScope.previousHighlightList != undefined || $rootScope.previousHighlightList.length > 0) {
- $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
+ $timeout(function () { $scope.HighlightBodyOnExtract() }, 50);
- // to do
+ // to do
- }
}
-
}
+
}
- }
+ }
+ }
}
@@ -5477,14 +5391,14 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
//console.log('reloadDABodyViewEvent');
$scope.ReloadBodyViewId = data.reloadDABodyViewId;
- // $scope.layerNumber = 0;
+ // $scope.layerNumber = 0;
// debugger;
$scope.loadSelectedBodyView($scope.ReloadBodyViewId);
$scope.loadSelectedBodyViewNavigator($scope.ReloadBodyViewId);
-
+
})
$scope.loadSelectedBodyViewNavigator = function (currentBodyViewId) {
@@ -5898,9 +5812,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
case "Pin":
$rootScope.resetPin = $rootScope.ObjectIndex++;
-
+
$rootScope.resetPinArc = $rootScope.Object1Index++;
-
+
var radial = $('canvas').createGradient({
x1: 50, y1: 50,
x2: 50, y2: 50,
@@ -5925,22 +5839,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// strokeWidth: 2,
// radius: 3
//},
-
-
-
+
+
+
click: function (layer) {
- // debugger;
- PinLineName = layer.name;
- _lineNameSplit = PinLineName.split("_");
-
- storeLine = "ArcPin_" + _lineNameSplit[1];
-
- $rootScope.shapeTypePin = "Pin";
-
+ // debugger;
+ PinLineName = layer.name;
+ _lineNameSplit = PinLineName.split("_");
+
+ storeLine = "ArcPin_" + _lineNameSplit[1];
+
+ $rootScope.shapeTypePin = "Pin";
+
$rootScope.canvasLayerNameCollection1 = [];
-
+
$rootScope.canvasLayerNameCollection1.push({ a: storeLine }, { b: PinLineName });
-
+
$('#canvas').setLayer(layer.name, {
handle: {
type: 'arc',
@@ -5951,17 +5865,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
radius: 2
}
}).drawLayers();
-
+
},
mouseout: function (layer) {
- // $rootScope.resetPinArc = "";
- // ax = "";
+ // $rootScope.resetPinArc = "";
+ // ax = "";
$rootScope.shapeTypePin = "";
-
- PinLineName = '';
- _lineNameSplit = '';
- storeLine = '';
+
+ PinLineName = '';
+ _lineNameSplit = '';
+ storeLine = '';
$rootScope.canvasLayerNameCollection1 = [];
$('#canvas').setLayer(layer.name, {
handle: {
@@ -5994,7 +5908,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
}).drawArc({
draggable: true,
name: "ArcPin_" + $rootScope.resetPinArc,
- // name: "Pin_" + $rootScope.resetPin,
+ // name: "Pin_" + $rootScope.resetPin,
layer: true,
groups: ['shapes'],
dragGroups: ['shapes'],
@@ -6011,13 +5925,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
// radius: 3
//},
add: function (layer) {
- // alert("add");
+ // alert("add");
$rootScope.resetPinArc = layer.name;
- // $scope.arr = [];
+ // $scope.arr = [];
+
-
},
-
+
}).drawLayers();
$('.btnCursor').trigger('click');
$(".btn-annotation").removeClass("activebtncolor");
@@ -6060,22 +5974,22 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
if (event.which == 46) {
-
+
if ($rootScope.shapeTypePin == "Pin") {
// alert($rootScope.canvasLayerNameCollection[0].a);
// alert($rootScope.canvasLayerNameCollection[1].b);
for (var i = 0; i < $rootScope.canvasLayerNameCollection1.length; i++) {
$("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[i].b).drawLayers();
$("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[i].a).drawLayers();
-
+
}
- // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[0].a).drawLayers();
- // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[1].b).drawLayers();
+ // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[0].a).drawLayers();
+ // $("#canvas").removeLayer($rootScope.canvasLayerNameCollection1[1].b).drawLayers();
}
- // else {
- $("#canvas").removeLayer($rootScope.canvasLayerNameCollection).drawLayers();
- // }
+ // else {
+ $("#canvas").removeLayer($rootScope.canvasLayerNameCollection).drawLayers();
+ // }
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html
index efca92d..725b0b7 100644
--- a/400-SOURCECODE/AIAHTML5.Web/index.html
+++ b/400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1,7 +1,7 @@
-
+