翻譯|使用教程|編輯:楊鵬連|2020-11-18 11:36:31.877|閱讀 550 次
概述:作為許多文檔和成像工作流程的重要組成部分,LEADTOOLS Annotations SDK提供了一個界面來標記具有各種形狀,注釋,突出顯示,標尺和修訂的圖像。本文詳細介紹了如何使用LEADTOOLS HTML5 Medical Viewer從任何地方查看DICOM圖像。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
LEADTOOLS Recognition Imaging SDK是精選的LEADTOOLS SDK功能集,旨在在企業級文檔自動化解決方案中構建端到端文檔成像應用程序,這些解決方案需要OCR,MICR,OMR,條形碼,表單識別和處理,PDF,打印捕獲 ,檔案,注釋和圖像查看功能。 這套功能強大的工具利用LEAD屢獲殊榮的圖像處理技術,智能識別可用于識別和提取任何類型的掃描或傳真形式圖像數據的文檔功能。
點擊下載LEADTOOLS Recognition Imaging SDK試用版

DICOM是存儲和傳輸醫療信息和圖像的領先標準。LEADTOOLS提供功能齊全的零占用空間DICOM查看器,以顯示DICOM圖像和來自所有學科和方式的研究。我們的可定制Web解決方案非常適合需要快速DICOM查看器且具有高級功能(例如3D體積渲染,DICOM疊加,軟拷貝呈現狀態等)的任何開發人員。
僅需以下幾行代碼,便可以將功能強大的DICOM查看器嵌入到任何網頁中,該查看器可以進行窗口級別,縮放,縮放,堆棧滾動等操作。請訪問我們的文檔以獲取有關如何在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);
}
試試看!
要自己進行測試,請確保從我們的網站上免費獲得最新的LEADTOOLS SDK評估(如果還沒有的話)。該試用版有效期為60天,并提供無限制的聊天和電子郵件支持。
支持
需要幫助來獲取此樣本嗎?請聯系我們的支持團隊以獲取免費技術支持!有關價格或許可問題,您可以聯系我們的銷售團隊。
請繼續關注,因為正如我們之前的帖子中所承諾的那樣,我們將提供更多教程,程序員可以使用它們來開發直接影響數據捕獲、識別、交換和其他緊迫業務需求的應用程序。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@ke049m.cn
文章轉載自: