$(document).ready(function(){ $("#loadingDiv").hide(); var $j = jQuery.noConflict();//为了解决jquery1.11.0包和imgbox必须用的1.3包的冲突 var pagenum=0; var nowpage=0; var datanum=0; var json; var urls; var searchname; var organ=""; var html; if(window.speechSynthesis !=undefined) { window.speechSynthesis.pause(); window.speechSynthesis.cancel(); } if(sessionStorage!=undefined) { if(sessionStorage.getItem("username")!=null) { $("#needlogin").remove(); var $span= $("用户名:"+sessionStorage.getItem("username")+""); $("#needloginparent").append($span); } else { $("#a_datamanage").attr('href','login.html'); //医学数据管理界面 //$("#a_codemanage").attr('href','login.html');代码管理不需要 $("#a_show").attr('href','login.html');//成果展示 } } var recorder; var audio = document.querySelector('audio'); $("#voice_interaction").click( function() { if(window.speechSynthesis !=undefined) { var msg = new SpeechSynthesisUtterance("点击确定后开始说话:"); window.speechSynthesis.speak(msg); } alert("点击确定后开始说话"); HZRecorder.get(function (rec) { recorder = rec; recorder.start(); }); } ); $("#voice_recognition").click( function() { recorder.stop(); recorder.upload("https://holer50861.restclient.cn/get_pcm/", function (my_message) { //alert(my_message); var my_message_test ="你说的是:"+my_message; if(window.speechSynthesis !=undefined) { var msg = new SpeechSynthesisUtterance(my_message_test); window.speechSynthesis.speak(msg); } var my_flag = confirm(my_message_test); if(my_message=="三维医学图像分割"&&my_flag) { window.location.replace('image_3D_segmentation.html'); } if(my_message=="文字检索系统"&&my_flag) { window.location.replace('show_search_text.html'); } if(my_message=="图像检索系统"&&my_flag) { window.location.replace('show_search_pic.html'); } if(my_message=="图像切分"&&my_flag) { window.location.replace('image_crop.html'); } if(my_message=="二维医学图像分割"&&my_flag) { window.location.replace('Image_binary_segmentation.html'); } if((my_message=="肝脏"||my_message=="肺部"||my_message=="肿瘤"||my_message=="腹部器官"||my_message=="腹部多器官"||my_message=="头颈部多器官"||my_message=="头颈部器官")&&my_flag) { organ = my_message; if(organ=="肝脏") { organ="liver"; } else if(organ=="肺部") { organ="lung"; } else if(organ=="肿瘤") { organ="tumor"; } else if(organ=="腹部器官") { organ="Abdominal_8_organs"; } else if(organ=="腹部多器官") { organ="Abdominal_multiple_organs"; } else if(organ=="头颈部多器官"||organ=="头颈部器官") { organ="Multiple_organs_of_head_and_neck"; } if(organ=="liver") { window.open('ganzang.html'); } else if(organ=="lung") { window.open('fei.html'); } else if(organ=="tumor") { window.open('bingbian.html'); } else if(organ=="Abdominal_8_organs") { //alert("lung "); window.open('\image_3D_segmentation\\examples\\Abdominal_8_organs.html'); } else if(organ=="No_section_of_abdominal_8_organs") { //alert("tumor "); window.open('\image_3D_segmentation\\examples\\No_section_of_abdominal_8_organs.html'); } else if(organ=="Abdominal_multiple_organs") { //alert("lung "); window.open('\image_3D_segmentation\\examples\\Abdominal_multiple_organs.html'); } else if(organ=="Abdominal_multiple_organ_without_section") { //alert("tumor "); window.open('\image_3D_segmentation\\examples\\Abdominal_multiple_organ_without_section.html'); } else if(organ=="Multiple_organs_of_head_and_neck") { //alert("lung "); window.open('\image_3D_segmentation\\examples\\Multiple_organs_of_head_and_neck.html'); } else if(organ=="Multiple_organs_of_head_and_neck_without_section") { //alert("tumor "); window.open('\image_3D_segmentation\\examples\\Multiple_organs_of_head_and_neck_without_section.html'); } } else if (my_flag) { if(window.speechSynthesis !=undefined) { var msg = new SpeechSynthesisUtterance("抱歉,目前影像库中没有该病变影像"); window.speechSynthesis.speak(msg); } alert("抱歉,目前影像库中没有该病变影像"); return; } }); } ); $("#findByOrgan").click( function() { organ=$("#select_organ").find("option:selected").text(); //alert(organ); if(organ=="肝脏") { organ="liver"; } else if(organ=="肺部") { organ="lung"; } else if(organ=="肿瘤") { organ="tumor"; } else if(organ=="腹部8器官") { organ="Abdominal_8_organs"; } else if(organ=="腹部8器官无切片") { organ="No_section_of_abdominal_8_organs"; } else if(organ=="腹部多器官") { organ="Abdominal_multiple_organs"; } else if(organ=="腹部多器官无切片") { organ="Abdominal_multiple_organ_without_section"; } else if(organ=="头颈部多器官") { organ="Multiple_organs_of_head_and_neck"; } else if(organ=="头颈部多器官无切片") { organ="Multiple_organs_of_head_and_neck_without_section"; } if(organ=="liver") { //alert("liver "); window.open('ganzang.html'); } else if(organ=="lung") { //alert("lung "); window.open('fei.html'); } else if(organ=="tumor") { //alert("tumor "); window.open('bingbian.html'); } else if(organ=="Abdominal_8_organs") { //alert("lung "); window.open('\image_3D_segmentation\\examples\\Abdominal_8_organs.html'); } else if(organ=="No_section_of_abdominal_8_organs") { //alert("tumor "); window.open('\image_3D_segmentation\\examples\\No_section_of_abdominal_8_organs.html'); } else if(organ=="Abdominal_multiple_organs") { //alert("lung "); window.open('\image_3D_segmentation\\examples\\Abdominal_multiple_organs.html'); } else if(organ=="Abdominal_multiple_organ_without_section") { //alert("tumor "); window.open('\image_3D_segmentation\\examples\\Abdominal_multiple_organ_without_section.html'); } else if(organ=="Multiple_organs_of_head_and_neck") { //alert("lung "); window.open('\image_3D_segmentation\\examples\\Multiple_organs_of_head_and_neck.html'); } else if(organ=="Multiple_organs_of_head_and_neck_without_section") { //alert("tumor "); window.open('\image_3D_segmentation\\examples\\Multiple_organs_of_head_and_neck_without_section.html'); } } ) })