LEADTOOLS使用教程:使用LEADTOOLS HTML5 Medical Viewer从任何地方查看DICOM图像 2020年10月15日 上午9:26 • 软件教程 LEADTOOLS Recognition Imaging SDK是精选的LEADTOOLS SDK功能集,旨在在企业级文档自动化解决方案中构建端到端文档成像应用程序,这些解决方案需要OCR,MICR,OMR,条形码,表单识别和处理,PDF,打印捕获 ,档案,注释和图像查看功能。 这套功能强大的工具利用LEAD屡获殊荣的图像处理技术,智能识别可用于识别和提取任何类型的扫描或传真形式图像数据的文档功能。 LEADTOOLS Recognition Imaging SDK试用版 window.onload = function () { // Get the parent DIV var imageViewerDiv = document.getElementById("MedicalViewerParentDiv"); // Create the medical viewer control, and specify the number or rows and columns. var viewer = new lt.Controls.Medical.MedicalViewer(imageViewerDiv, 2, 2); // [optional] Update the splitter size so it become thick and easy to move. viewer.get_gridLayout().set_splitterSize(7); // Create a cell name var cellName = "MedicalCell" + Date.now(); // Create a cell. It will contain an image or a series of images, based on how many Frames are added (see below for mor details). var cell = new lt.Controls.Medical.Cell(viewer, viewer.get_divId(), 1, 1); // Set the show border to "true", to show a border around the cell. cell.set_showFrameBorder(true); // Add the cell to the viewer. viewer.layout.get_items().add(cell); // [optional] Select the cell (it can also be selected by clicking on it.) cell.set_selected(true); // Now create a frame object which will hold the image inside the cell. var cellFrame = new lt.Controls.Medical.Frame(cell); // Add the frame to the cell class. cell.get_frames().add(cellFrame); // we are now going to download an image from LEADTOOLS medical web service demo. var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function (data) { if(this.readyState == 4 && this.status == 200) { // here we got the authentication code that we need to retrieve the images from LEADTOOLS database. authenticationCode = encodeURIComponent(this.responseText); // now, this is the MRTI info that contains the image information, width, height, tiles...etc. var mrtiInfo = new lt.Controls.Medical.MRTIImage(); // The image dpi. mrtiInfo.fullDpi = lt.LeadSizeD.create(150, 150); // the tile size, recommended value is 256 mrtiInfo.tileSize = lt.LeadSizeD.create(256, 256); mrtiInfo.frameIndex = 0; // does this image support window level. mrtiInfo.supportWindowLevel = true; // different resolution for the image. var resolutions = [ { width: 2460, height: 2970 }, { width: 1230, height: 1485}, { width: 615, height: 742 }, { width: 307, height: 371 }, { width: 153, height: 185}, { width: 76, height: 92 }, ]; mrtiInfo.resolutions = []; for (var i = 0; i < resolutions.length; i++) { mrtiInfo.resolutions[i]=lt.LeadSizeD.create( resolutions[i].width, resolutions[i].height ); } // the image width and height. cellFrame.set_width(mrtiInfo.resolutions[0].width); cellFrame.set_height(mrtiInfo.resolutions[0].height); // the image full size. mrtiInfo.fullSize=lt.LeadSizeD.create( cellFrame.get_width(), cellFrame.get_height() ); // now we need the image URL, var imageUri="http://localhost/MedicalWebService/ObjectRetrieveService.svc" ; imageUri +="/GetImageTileuth=" ; imageUri +=authenticationCode; // this the image instance UID, change this if you want to retrieve anything else. imageUri +="&instance=1.2.840.114257.1.9.1245.56421.52314.1187852.12457" ; mrtiInfo.imageUri=imageUri; // set this info to the cell frame. cellFrame.mrtiInfo=mrtiInfo; // now we need to set the information for the image so we cando window level. var imageInfo=new lt.Controls.Medical.DICOMImageInformation(); // set the image width and height. imageInfo.width=2460; imageInfo.height=2970; // bits per pixel for the image imageInfo.bitsPerPixel=16; // low and high bit. imageInfo.lowBit=0; imageInfo.highBit=11; // other information, setting some of them to zero means that the toolkit will try and calculate it by itself, but you can always get those values from the DicomDataSet. imageInfo.modalityIntercept=0; imageInfo.modalitySlope=1; imageInfo.minValue=0; imageInfo.maxValue=0; imageInfo.windowWidth=0; imageInfo.windowCenter=0; imageInfo.signed=false; imageInfo.photometricInterpretation="MONOCHROME1" ; imageInfo.firstStoredPixelValueMapped=0; // set information tothe frame. cellFrame.set_information(imageInfo); } }; // We are trying here to get an image from the Leadtools database, we need to login and get the authentication code. xhttp.open( "POST", "http://localhost/MedicalWebService/AuthenticationService.svc/AuthenticateUser" , true ); xhttp.setRequestHeader("Content-Type", "application/json; charset=UTF-8" ); // we log in as a 'guest' , after calling the below line, we will receive the authentication code sent via 'onreadystatechange' above. xhttp.send( JSON.stringify({ userName: "<Medical Web Service User Name>" , password: "<Medical Web Service Password>" , userData: "" , }) ); // [optional] Add an action that allows the user to move the loaded image using either the mouse or by touch and drag. we are adding an offset action. cell.setCommand(1, new lt.Controls.Medical.OffsetAction()); // [optional] Add an action that allows the user to do window level on the image. cell.setCommand(2, new lt.Controls.Medical.WindowLevelAction()); // [optional] Run the action. Now if the user clicks or touches the image and drags it, the image will move correspondingly. cell.runCommand(2); // [optional] Create an overlay text that will appear at the top of the loaded image. var overlay=new lt.Controls.Medical.OverlayText(); // [optional] Set the aligment for the overlay text. overlay.set_alignment(lt.Controls.Medical.OverlayAlignment.topLeft); // [optional] Set the row index of overlay text. overlay.set_positionIndex(0); // [optional] add window level overlay text, this will change when you click and drag the mouse. overlay.set_type(lt.Controls.Medical.OverlayTextType.windowLevel); } 试试看! 要自己进行测试,请确保从我们的 站上免费获得最新的LEADTOOLS SDK评估(如果还没有的话)。该试用版有效期为60天,并提供无限制的聊天和电子邮件支持。 支持 需要帮助来获取此样本吗联系我们的支持团队以获取免费技术支持!有关价格或许可问题,您可以联系我们的销售团队。 请继续关注,因为正如我们之前的帖子中所承诺的那样,我们将提供更多教程,程序员可以使用它们来开发直接影响数据捕获、识别、交换和其他紧迫业务需求的应用程序。 试用版下载>>> LEADTOOLS 使用教程>>> 想要购买LEADTOOLS正版授权,或了解更多产品信息请点击【咨询在线客服】 标签: 声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢! 0 生成海 解析大数据存在的五大安全问题 上一篇 2020年10月15日 如何为现有IntelliJ IDEA项目创建GitHub存储库和本地Git存储库 下一篇 2020年10月15日 相关推荐 ?选择云服务器的小窍门 2017年4月13日 【dbForge Query Builder for SQL Server入门教程】如何使用计划图和连接到数据库 2018年7月19日 Word控件Spire.Doc 【表单域】教程(一): 在 C# 中的 Word 文档中创建表单域 2022年3月20日 【4月学习季】FastReport 2018 重大更新,在线订购低至6.5折 2018年3月2日 表格控件SpreadJS开发案例:助力泛微OA管理系统开发,全面实现财务业务一体化 2020年11月15日 【更新】屏幕记录机BB FlashBack v5.26.0发布丨附下载 2017年6月2日 发表回复 请登录后评论... 登录后才能评论 提交