123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- $(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= $("<span>用户名:"+sessionStorage.getItem("username")+"</span>");
- $("#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');
- }
- }
- )
- })
|