LEADTOOLS HTML5 SDK使用教程:DICOM图像注释
利用HTML5和JavaScript构建一个完整的DICOM Viewer涉及到许多的重要功能。LEADTOOLS医疗图像开发包提供了创建零足迹DICOM Viewer所需的所有功能:图像显示、图像处理、客户端医学影像“调窗”、Series Stack和注释等。接下来,我们将深入介绍HTML5 DICOM Viewer、PACS查询/检索以及医学影像“调窗”等功能。
LEADTOOLS HTML5 DICOM Viewer功能介绍:
HTML5/JavaScript查看器控件
鼠标和多点触控手势输入
包含快速客户端医学影像“调窗”工具、Series Stack、图像处理等功能
从您本地的归档或一个远程的PACS使用DICOM通信,在您的桌面、平板电脑或移动设备上查看DICOM图像的任何地方。
本地HTML5图像注解和标记。
DICOM图像HTML5注释
一旦选中DICOM系列,图像开始链接到查看器,并且注解实现初始化。完成AnnAutomationManager对象的创建并连接到查看器。
1234567891011121314151617181920212223function initializeAnnotations() {
_automationManager =
new
Leadtools.Annotations.Automation.AnnAutomationManager();
_automationManager.createDefaultObjects();
_automationManager.findObjectById(Leadtools.Annotations.Core.AnnObject.rulerObjectId).get_objectTemplate().set_measurementUnit(
6
);
_automationManager.findObjectById(Leadtools.Annotations.Core.AnnObject.polyRulerObjectId).get_objectTemplate().set_measurementUnit(
6
);
_automationManager.findObjectById(Leadtools.Annotations.Core.AnnObject.protractorObjectId).get_objectTemplate().set_measurementUnit(
6
);
var divElemnt = document.getElementById(
"ViewerParent"
);
_overlayCanvas = document.createElement(
"canvas"
);
_overlayCanvas.id =
"overlayCanvas"
;
_overlayCanvas.width = $(divElemnt).width();
_overlayCanvas.height = $(divElemnt).height();
var parent = document.getElementById(_leadViewer.get_canvasId()).parentNode;
parent.appendChild(_overlayCanvas);
_automationInteractiveMode =
new
Leadtools.Annotations.Automation.ImageViewerAutomationControl(_leadViewer);
}
使用注释前,你需要选择所需要绘制的对象,或者使用Select工具修改现有注释。
12345678910111213141516171819function OnAnnotationSelect() {
if
(
null
!= _leadViewer &&
null
!= _currentAutomation && _annotationSelect.enabled) {
AutomationService();
_currentAutomation.get_manager().set_currentObjectId(Leadtools.Annotations.Core.AnnObject.selectObjectId);
}
}
function OnAnnotationArrow() {
if
(
null
!= _leadViewer &&
null
!= _currentAutomation && _annotationArrow.enabled) {
AutomationService();
_currentAutomation.get_manager().set_currentObjectId(Leadtools.Annotations.Core.AnnObject.pointerObjectId);
}
}
function OnAnnotationText() {
if
(
null
!= _leadViewer &&
null
!= _currentAutomation && _annotationText.enabled) {
AutomationService();
_currentAutomation.get_manager().set_currentObjectId(Leadtools.Annotations.Core.AnnObject.textObjectId);
}
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。