翻譯|使用教程|編輯:楊鵬連|2020-11-18 11:36:31.877|閱讀 534 次
概述:作為許多文檔和成像工作流程的重要組成部分,LEADTOOLS Annotations SDK提供了一個(gè)界面來(lái)標(biāo)記具有各種形狀,注釋,突出顯示,標(biāo)尺和修訂的圖像。本文詳細(xì)介紹了如何使用LEADTOOLS HTML5 Medical Viewer從任何地方查看DICOM圖像。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
LEADTOOLS Recognition Imaging SDK是精選的LEADTOOLS SDK功能集,旨在在企業(yè)級(jí)文檔自動(dòng)化解決方案中構(gòu)建端到端文檔成像應(yīng)用程序,這些解決方案需要OCR,MICR,OMR,條形碼,表單識(shí)別和處理,PDF,打印捕獲 ,檔案,注釋和圖像查看功能。 這套功能強(qiáng)大的工具利用LEAD屢獲殊榮的圖像處理技術(shù),智能識(shí)別可用于識(shí)別和提取任何類型的掃描或傳真形式圖像數(shù)據(jù)的文檔功能。
點(diǎn)擊下載LEADTOOLS Recognition Imaging SDK試用版
DICOM是存儲(chǔ)和傳輸醫(yī)療信息和圖像的領(lǐng)先標(biāo)準(zhǔn)。LEADTOOLS提供功能齊全的零占用空間DICOM查看器,以顯示DICOM圖像和來(lái)自所有學(xué)科和方式的研究。我們的可定制Web解決方案非常適合需要快速DICOM查看器且具有高級(jí)功能(例如3D體積渲染,DICOM疊加,軟拷貝呈現(xiàn)狀態(tài)等)的任何開發(fā)人員。
僅需以下幾行代碼,便可以將功能強(qiáng)大的DICOM查看器嵌入到任何網(wǎng)頁(yè)中,該查看器可以進(jìn)行窗口級(jí)別,縮放,縮放,堆棧滾動(dòng)等操作。請(qǐng)?jiān)L問(wèn)我們的文檔以獲取有關(guān)如何在Medical Viewer中加載和顯示DICOM圖像的完整教程。
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 +="/GetImageTile?auth=" ; 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); }試試看!
要自己進(jìn)行測(cè)試,請(qǐng)確保從我們的網(wǎng)站上免費(fèi)獲得最新的LEADTOOLS SDK評(píng)估(如果還沒(méi)有的話)。該試用版有效期為60天,并提供無(wú)限制的聊天和電子郵件支持。
支持
需要幫助來(lái)獲取此樣本嗎?請(qǐng)聯(lián)系我們的支持團(tuán)隊(duì)以獲取免費(fèi)技術(shù)支持!有關(guān)價(jià)格或許可問(wèn)題,您可以聯(lián)系我們的銷售團(tuán)隊(duì)。
請(qǐng)繼續(xù)關(guān)注,因為正如我們之前的帖子中所承諾的那樣,我們將提供更多教程,程序員可以使用它們來(lái)開發(fā)直接影響數(shù)據(jù)捕獲、識(shí)別、交換和其他緊迫業(yè)務(wù)需求的應(yīng)用程序。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: