You are on page 1of 68

Web Pacs Viewer

2008 Zhong Jian Wang Medical Software


Page 1
DICOMVCL and WebPACS SDK
by Zhong Jian Wang Medical Software

DicomVCL a collection of delphi VCL compoments designed


to assist the development of DICOM conformant applications
for medical imaging. It is Native Delphi Code, No DLL
Needed. A fully functional trial version is available for
immediate download.
DicomVCL is the dicom application development
framework for Delphi and C++ Builder.It suport Delphi
5/6/7/2005/2006/2007 and C++Builder.
WebPACS SDK is make up of a WebPacsViewer ActiveX
control and a WebPACS server. It can help you build your
Web PACS easily.
Web Pacs Viewer

2008 Zhong Jian Wang Medical Software

All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or
mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the
written permission of the publisher.

Products that are referred to in this document may be either trademarks and/or registered trademarks of the
respective owners. The publisher and the author make no claim to these trademarks.

While every precaution has been taken in the preparation of this document, the publisher and the author assume no
responsibility for errors or omissions, or for damages resulting from the use of information contained in this
document or from the use of programs and source code that may accompany it. In no event shall the publisher and
the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused
directly or indirectly by this document.

Printed: 2008 in (whereever you are located)

Publisher
www.dicomvcl.com

Managing Editor
Jiawen Feng

Technical Editors

Cover Designer

Team Coordinator

Production
Contents 5

Table of Contents
Foreword 9

Part I Introduction 12
1 Welcome
................................................................................................................................... 12

Part II Image Operation 14


1 Overview
................................................................................................................................... 14
2 Query................................................................................................................................... 15
Setup Layout .......................................................................................................................................................... 15
Setup Lookup..........................................................................................................................................................
Table 16
Stack Option .......................................................................................................................................................... 16
Windows Leveling
..........................................................................................................................................................
Options 17
Language .......................................................................................................................................................... 17
Dicom Queue .......................................................................................................................................................... 18
Dicom Dump .......................................................................................................................................................... 19
Network Queue .......................................................................................................................................................... 20
Preset Table For
..........................................................................................................................................................
Modality 20
Clear Image .......................................................................................................................................................... 20
Dock Film View.......................................................................................................................................................... 21
Auto Clear Image
.......................................................................................................................................................... 21
Left Mouse Default
..........................................................................................................................................................
Pan 21
Unlock Image ..........................................................................................................................................................
Toolbar 21
Image List Align
.......................................................................................................................................................... 21
3 Magnifier/Select
...................................................................................................................................
Zoom 21
4 Zoom/Pan
................................................................................................................................... 21
5 W/L/Auto
...................................................................................................................................
ROI 21
6 Flip ................................................................................................................................... 21
7 Reverse
................................................................................................................................... 21
8 Rotate
................................................................................................................................... 21
9 Invert................................................................................................................................... 22
10 Series...................................................................................................................................
layout 22
11 Image...................................................................................................................................
Layout 22
12 Reset................................................................................................................................... 22
13 Stack...................................................................................................................................
Mode 22
14 Tools................................................................................................................................... 22
Lookup Table.......................................................................................................................................................... 22
Select Rect .......................................................................................................................................................... 23
Delete Selected
..........................................................................................................................................................
Image 23
Merge .......................................................................................................................................................... 23
Image Mark .......................................................................................................................................................... 23
Hisgram .......................................................................................................................................................... 24
Perfusion .......................................................................................................................................................... 24
Filter .......................................................................................................................................................... 24
Auto Synchronization
.......................................................................................................................................................... 24

2008 Zhong Jian Wang Medical Software

5
6 Web Pacs Viewer

Manual Synchronization
.......................................................................................................................................................... 25
Position Synchronization
.......................................................................................................................................................... 25
Show Image Information
..........................................................................................................................................................
Labels 25
Show All Reference
..........................................................................................................................................................
Line 25
Show First and..........................................................................................................................................................
Last Reference Line 25
Show Current..........................................................................................................................................................
Reference Line 25
Save Current ..........................................................................................................................................................
Presentation State 25
Apply Presentation
..........................................................................................................................................................
State 25
Mark as Key Image
.......................................................................................................................................................... 25
Mark series As..........................................................................................................................................................
Key Image 25
Mark Selected..........................................................................................................................................................
as key Image 25
Clear key Image
.......................................................................................................................................................... 25
Save Key Image.......................................................................................................................................................... 25
View Key Image.......................................................................................................................................................... 25
Custom Layout .......................................................................................................................................................... 25
Save layout .......................................................................................................................................................... 26
Save Layout As.......................................................................................................................................................... 26
Set Default Layout
..........................................................................................................................................................
for this modality 26
15 Measure
................................................................................................................................... 26
Stop Measure.......................................................................................................................................................... 26
Length .......................................................................................................................................................... 26
Length and Width
.......................................................................................................................................................... 26
Length and Height
..........................................................................................................................................................
+ Width 26
Plot Length .......................................................................................................................................................... 26
Plogon .......................................................................................................................................................... 26
Angle .......................................................................................................................................................... 26
Cross Line .......................................................................................................................................................... 26
ROI .......................................................................................................................................................... 26
Quantitative Coronary
..........................................................................................................................................................
Analysis 26
Arrow .......................................................................................................................................................... 26
Text Label .......................................................................................................................................................... 27
Calibrate Measurement
.......................................................................................................................................................... 27
Line Profile .......................................................................................................................................................... 27
3D Plot .......................................................................................................................................................... 27
Clear Measure..........................................................................................................................................................
Tools 27
Continue Measure
.......................................................................................................................................................... 27
16 Export
................................................................................................................................... 27
Film Print .......................................................................................................................................................... 27
Save As .......................................................................................................................................................... 29
Copy .......................................................................................................................................................... 29
Burn CD/DVD .......................................................................................................................................................... 30
Export to AVI .......................................................................................................................................................... 31
Save As DICOMDIR
.......................................................................................................................................................... 31
Save As HTML..........................................................................................................................................................
page 31
Save Key Image..........................................................................................................................................................
As DICOMDIR 31
Save Key Images
..........................................................................................................................................................
As HTML Page 31
Save As PDF .......................................................................................................................................................... 31
Save As Flash.......................................................................................................................................................... 31
Save Key Images
..........................................................................................................................................................
As PDF 31
Save Key Images
..........................................................................................................................................................
As Flash 32
17 3D ................................................................................................................................... 32
MPR .......................................................................................................................................................... 32
Curve MPR .......................................................................................................................................................... 32

2008 Zhong Jian Wang Medical Software


Contents 7

3D MPR .......................................................................................................................................................... 33
MIP .......................................................................................................................................................... 33
3D MIP .......................................................................................................................................................... 33
Surface Rendering
.......................................................................................................................................................... 34
Volume Rendering
.......................................................................................................................................................... 34

Part III Query/Report Operation 36


1 Login................................................................................................................................... 36
2 Ris Query
................................................................................................................................... 37
Edit Report .......................................................................................................................................................... 38
Edit Patient.........................................................................................................................................................
Info 39
Select Template
......................................................................................................................................................... 40
Review and .........................................................................................................................................................
pint report 41
3 Query...................................................................................................................................
Study 41
4 Query...................................................................................................................................
DicomDIR / DICOMCD 42
5 Query...................................................................................................................................
Remote Device 43

Part IV System Administrator 46


1 Report
...................................................................................................................................
Profile 46
2 User ...................................................................................................................................
Manager 47
3 Modality
...................................................................................................................................
Property 47
4 Dicom...................................................................................................................................
Printer 48
5 Remote
...................................................................................................................................
Device 48

Part V Delphi Programing 50


1 Public................................................................................................................................... 51
LoadImages .......................................................................................................................................................... 51
LoadImagesEx.......................................................................................................................................................... 51
Connect .......................................................................................................................................................... 51
ClearLoadedImages
.......................................................................................................................................................... 52
DisplayImagePanel
.......................................................................................................................................................... 52
GetSelectedCount
.......................................................................................................................................................... 52
GetCnsBitmap.......................................................................................................................................................... 52
GetSelectedImageLabels
.......................................................................................................................................................... 52
ImportExpertEx
.......................................................................................................................................................... 52
ScanImageEx .......................................................................................................................................................... 53
ShowCaptureDialogEx
.......................................................................................................................................................... 54
IsStudyLoaded.......................................................................................................................................................... 55
WaitForStudyLoad
.......................................................................................................................................................... 55
LoadFromFile.......................................................................................................................................................... 55
LoadFromDICOMDIR
.......................................................................................................................................................... 55
LoadFromFolder
.......................................................................................................................................................... 55
ImportFromFile
.......................................................................................................................................................... 55
SaveToDICOMDIR
.......................................................................................................................................................... 55
SaveSelectedToFile
.......................................................................................................................................................... 55
2 Published
................................................................................................................................... 55
Host .......................................................................................................................................................... 55
Port .......................................................................................................................................................... 56
CallingAEtitle .......................................................................................................................................................... 56

2008 Zhong Jian Wang Medical Software

7
8 Web Pacs Viewer

CalledAEtitle .......................................................................................................................................................... 56
ImageScreenIndex
.......................................................................................................................................................... 56
ImageScreenIndex1
.......................................................................................................................................................... 56
TranferSyntax.......................................................................................................................................................... 56
LoadMode .......................................................................................................................................................... 56
Level .......................................................................................................................................................... 56
UserName .......................................................................................................................................................... 56
Password .......................................................................................................................................................... 56
CMovePort .......................................................................................................................................................... 56
ShowQueryDialog
.......................................................................................................................................................... 56
3 Event................................................................................................................................... 56
OnSaveCapture
.......................................................................................................................................................... 56
OnImageFlagChange
.......................................................................................................................................................... 56
OnDicomPrint.......................................................................................................................................................... 57
OnImageFormClose
.......................................................................................................................................................... 57
OnDeleteImage
.......................................................................................................................................................... 57
4 Example
................................................................................................................................... 57

Part VI VB Programing 62

Part VII VC Programing 64

Part VIII Access Sample 66

Index 0

2008 Zhong Jian Wang Medical Software


Foreword 9

Foreword

This is just another title page


placed between table of contents
and topics

2008 Zhong Jian Wang Medical Software


Part

I
12 Web Pacs Viewer

1 Introduction

1.1 Welcome
DicomVCL a collection of delphi VCL compoments designed to assist the development of DICOM
conformant applications for medical imaging. It is Native Delphi Code, No DLL Needed. A fully functional
trial version is available for immediate download.
DicomVCL is the dicom application development framework for Delphi and C++ Builder.It suport
Delphi 5/6/7/2005/2006/2007 and C++Builder.
WebPACS SDK is make up of a WebPacsViewer ActiveX control and a WebPACS server. It can help
you build your Web PACS easily.

WebPacs SDK, It include Full Dicom Server and WebDicomViewer.ocx You can easy to build pacs.
WebPacs SDK suport delphi, C++Builder, VB, PB, VC, html to build PACS quickly.
1. full pacs function.
2. include dicom print(scu and scp)
3. include worklist
4. include video capture to dicom
5. include scan image to dicom
6. include import other image format to dicom
7. include burn cd/dvd directly
8. can be only load key images

WebPACS is develop by dicomvcl.com


Web Site: http://www.dicomvcl.com

2008 Zhong Jian Wang Medical Software


Part

II
14 Web Pacs Viewer

2 Image Operation

2.1 Overview

2008 Zhong Jian Wang Medical Software


Image Operation 15

2.2 Query
2.2.1 Setup Layout

1.the grid show all the defined layouts.

2.you can split the view and setup the view by right mouse popup menu

2008 Zhong Jian Wang Medical Software


16 Web Pacs Viewer

2.2.2 Setup Lookup Table


You can View or change the lookup table data

you can load a lut file to Lookup Table

2.2.3 Stack Option


Select the image order:

2008 Zhong Jian Wang Medical Software


Image Operation 17

2.2.4 Windows Leveling Options


select the windows leveling mode:

2.2.5 Language
Select Language for the viewer

2008 Zhong Jian Wang Medical Software


18 Web Pacs Viewer

2.2.6 Dicom Queue

The form show the printer work status

2008 Zhong Jian Wang Medical Software


Image Operation 19

2.2.7 Dicom Dump


Show all dicom tab name and value of the select Image:

2008 Zhong Jian Wang Medical Software


20 Web Pacs Viewer

2.2.8 Network Queue


Show All load image thread or print thread

2.2.9 Preset Table For Modality


Manager preset table(only show after you select a image)

2.2.10 Clear Image


Clear all unlock images on the viewer

2008 Zhong Jian Wang Medical Software


Image Operation 21

2.2.11 Dock Film View


Dock the film view on the image list tab

2.2.12 Auto Clear Image


check or uncheck it, to set if auto clear images

2.2.13 Left Mouse Default Pan


check or uncheck it, to set if the left mouse button is default PAN

2.2.14 Unlock Image Toolbar


check or uncheck it, to set if the Image toolbar auto hide

2.2.15 Image List Align


to select Image align to right, bottom or auto

2.3 Magnifier/Select Zoom


set left mouse button is magnifier
set right mouse button is select zoom
the middle mouse button always is windows/level

2.4 Zoom/Pan
set left mouse button is zoom
set right mouse button is pan(move the image in the view)
the middle mouse button always is windows/level

2.5 W/L/Auto ROI


set left mouse button is windows/level
set right mouse button is ROI auto
the middle mouse button always is windows/level

2.6 Flip
Flip the image

2.7 Reverse
reverse the image

2.8 Rotate
rotate the image

2008 Zhong Jian Wang Medical Software


22 Web Pacs Viewer

2.9 Invert
invert the image

2.10 Series layout

select the series view's row and colum

2.11 Image Layout


select the image view's row and colum

2.12 Reset
reset all change of the images

2.13 Stack Mode


set left mouse button is stack
set right mouse button is windows/level
the middle mouse button always is windows/level

2.14 Tools
2.14.1 Lookup Table
select a lookup tabel for a/all image

2008 Zhong Jian Wang Medical Software


Image Operation 23

2.14.2 Select Rect

2.14.3 Delete Selected Image


Delete select image

2.14.4 Merge
Merge two image, you can change the transperent

2.14.5 Image Mark

2008 Zhong Jian Wang Medical Software


24 Web Pacs Viewer

2.14.6 Hisgram

2.14.7 Perfusion

2.14.8 Filter
seletc a filter for image ( for example the capture image need a filter)

2.14.9 Auto Synchronization


Auto Synchronization

2008 Zhong Jian Wang Medical Software


Image Operation 25

2.14.10 Manual Synchronization


Manual Synchronization

2.14.11 Position Synchronization


Position Synchronization

2.14.12 Show Image Information Labels


Show Image Information Labels

2.14.13 Show All Reference Line


Show All Reference Line

2.14.14 Show First and Last Reference Line

2.14.15 Show Current Reference Line

2.14.16 Save Current Presentation State

2.14.17 Apply Presentation State

2.14.18 Mark as Key Image

2.14.19 Mark series As Key Image

2.14.20 Mark Selected as key Image

2.14.21 Clear key Image

2.14.22 Save Key Image

2.14.23 View Key Image

2.14.24 Custom Layout

2008 Zhong Jian Wang Medical Software


26 Web Pacs Viewer

2.14.25 Save layout

2.14.26 Save Layout As

2.14.27 Set Default Layout for this modality

2.15 Measure
2.15.1 Stop Measure

2.15.2 Length

2.15.3 Length and Width

2.15.4 Length and Height + Width

2.15.5 Plot Length

2.15.6 Plogon

2.15.7 Angle

2.15.8 Cross Line

2.15.9 ROI

2.15.10 Quantitative Coronary Analysis

2.15.11 Arrow

2008 Zhong Jian Wang Medical Software


Image Operation 27

2.15.12 Text Label

2.15.13 Calibrate Measurement

2.15.14 Line Profile

2.15.15 3D Plot

2.15.16 Clear Measure Tools

2.15.17 Continue Measure

2.16 Export
2.16.1 Film Print
add image to this form and then send to dcom printer to print film

2008 Zhong Jian Wang Medical Software


28 Web Pacs Viewer

2008 Zhong Jian Wang Medical Software


Image Operation 29

2.16.2 Save As
Save to image to other image format

2.16.3 Copy
Copy image to clipboard

2008 Zhong Jian Wang Medical Software


30 Web Pacs Viewer

2.16.4 Burn CD/DVD


Burn all loaded image to CD/DVD

2008 Zhong Jian Wang Medical Software


Image Operation 31

2.16.5 Export to AVI


Export all image of the select study to a AVI file

2.16.6 Save As DICOMDIR

2.16.7 Save As HTML page

2.16.8 Save Key Image As DICOMDIR

2.16.9 Save Key Images As HTML Page

2.16.10 Save As PDF

2.16.11 Save As Flash

2.16.12 Save Key Images As PDF

2008 Zhong Jian Wang Medical Software


32 Web Pacs Viewer

2.16.13 Save Key Images As Flash

2.17 3D
2.17.1 MPR

2.17.2 Curve MPR

2008 Zhong Jian Wang Medical Software


Image Operation 33

2.17.3 3D MPR

2.17.4 MIP

2.17.5 3D MIP
in progaming

2008 Zhong Jian Wang Medical Software


34 Web Pacs Viewer

2.17.6 Surface Rendering

2.17.7 Volume Rendering


in progaming

2008 Zhong Jian Wang Medical Software


Part

III
36 Web Pacs Viewer

3 Query/Report Operation

3.1 Login

Enter username and password and select a language for you.

"Connect to Local Network server"


if check, connec to pacsserver use dicom tranfer syntax
if no check, connect to pacsserver use WADO (over internet)

2008 Zhong Jian Wang Medical Software


Query/Report Operation 37

3.2 Ris Query

this is RIS Query interface. You can Query report, study, DICOMDIR(CD,DVD) or Query/Receive a remote dicom
device.

2008 Zhong Jian Wang Medical Software


38 Web Pacs Viewer

3.2.1 Edit Report


Select a study and click Edit Report. Edit the report on the popup window.

2008 Zhong Jian Wang Medical Software


Query/Report Operation 39

3.2.1.1 Edit Patient Info

2008 Zhong Jian Wang Medical Software


40 Web Pacs Viewer

3.2.1.2 Select Template

2008 Zhong Jian Wang Medical Software


Query/Report Operation 41

3.2.1.3 Review and pint report

3.3 Query Study

Query Study on the PACS server

2008 Zhong Jian Wang Medical Software


42 Web Pacs Viewer

3.4 Query DicomDIR / DICOMCD

Click "Path" to open a DICOMDIR

2008 Zhong Jian Wang Medical Software


Query/Report Operation 43

3.5 Query Remote Device

1 Select A Remote Device.


2 Click Query

2008 Zhong Jian Wang Medical Software


Part

IV
46 Web Pacs Viewer

4 System Administrator

4.1 Report Profile

2008 Zhong Jian Wang Medical Software


System Administrator 47

4.2 User Manager

4.3 Modality Property

2008 Zhong Jian Wang Medical Software


48 Web Pacs Viewer

4.4 Dicom Printer

4.5 Remote Device

2008 Zhong Jian Wang Medical Software


Part

V
50 Web Pacs Viewer

5 Delphi Programing
public
procedure LoadImages(const AName: WideString; const AUID: WideString; AMode: Integer);
procedure Connect;
procedure ClearLoadedImages;
procedure DisplayImagePanel;
procedure SaveImageFlag;
function GetCnsBitmap(AImageIndex: Integer): OleVariant;
procedure SaveImages;
function GetSelectedCount: Integer;
procedure ScanImageEx(AScanerIndex: Integer; AShowUI: WordBool; const AProfileName:
WideString;
const APatientName: WideString; const APatientID: WideString;
const APatientSex: WideString; const APatientAge: WideString;
const APatientStudyID: WideString; const AStudyUID: WideString;
APatientDOB: Double);
procedure ImportExpertEx(const AProfileName: WideString; const APatientName: WideString;
const APatientID: WideString; const APatientSex: WideString;
const APatientAge: WideString; const APatientStudyID: WideString;
const AStudyUID: WideString; APatientDOB: Double);
procedure ShowCaptureDialogEx(const AProfileName: WideString; const APatientName:
WideString;
const APatientID: WideString; const APatientSex: WideString;
const APatientAge: WideString; const APatientStudyID: WideString;
const AStudyUID: WideString; APatientDOB: Double);
procedure SelectBackgroundCaptureImageEx(const AProfileName: WideString;
const APatientName: WideString;
const APatientID: WideString;
const APatientSex: WideString;
const APatientAge: WideString;
const APatientStudyID: WideString;
const AStudyUID: WideString; APatientDOB: Double);
function GetSelectedImageLabels(AImageIndex: Integer; AIndex: Integer): WideString;
procedure LoadImagesEx(var AProfileName: WideString; var AName: WideString;
var AUID: WideString; AMode: Integer);
function IsStudyLoaded(const AStudyUID: WideString): Integer;
function WaitForStudyLoad(const AStudyUID: WideString): Integer;
procedure LoadFromFile(const AFileName: WideString);
procedure LoadFromDICOMDIR(const APath: WideString);
procedure LoadFromFolder(const APath: WideString);
procedure ImportFromFile(const AFileName: WideString; AImageFormat: Integer);
procedure SaveToDICOMDIR(const APath: WideString);
procedure SaveSelectedToFile(const AFileName: WideString; AImageFormat: Integer);

published

property Host: WideString;


property Port: Integer;
property ImageScreenIndex;
property ImagecreenIndex1;
property LoadMode: Integer;

2008 Zhong Jian Wang Medical Software


Delphi Programing 51

property TranferSyntax: WideString;


property Level: WideString;
property UserName: WideString;
property Password: WideString;
property AuthType: Integer;
property CMovePort: Integer;
property CallingAEtitle: WideString;
property CalledAEtitle: WideString;
property ShowQueryDialog: WordBool;

property OnSaveCapture: TNotifyEvent;


property OnImageFlagChange: TNotifyEvent;
property OnDicomPrint: TWebDicomViewOnDicomPrint;
property OnImageFormClose: TNotifyEvent;
property OnDeleteImage: TWebDicomViewOnDeleteImage;
end;

5.1 Public
5.1.1 LoadImages
procedure LoadImages(const AName: WideString; const AUID: WideString; AMode: Integer);

const AName: WideString; ----- patient name, will display on image list tab and network queue
form
const AUID: WideString; ----- '1.3.12.2.1107.5.1.1.21044.20040819115710127.2', //studyuid
AMode: Integer //0 bit = 0
// 1 load the study and lock( not auto clear)
//1 bit = 0 load all images of the study
// 1 load only key images

example:
WebDicomView1.LoadImages(
'Patient Name', //patient name, will display on image list tab and network queue form
'1.3.12.2.1107.5.1.1.21044.20040819115710127.2', //studyuid
0 //0 bit = 0
// 1 load the study and lock( not auto clear)
//1 bit = 0 load all images of the study
// 1 load only key images
);

5.1.2 LoadImagesEx
procedure LoadImagesEx(var AProfileName: WideString; var AName: WideString;
var AUID: WideString; AMode: Integer);

5.1.3 Connect
procedure Connect;

2008 Zhong Jian Wang Medical Software


52 Web Pacs Viewer

5.1.4 ClearLoadedImages
procedure ClearLoadedImages;

5.1.5 DisplayImagePanel
procedure DisplayImagePanel;

5.1.6 GetSelectedCount
function GetSelectedCount: Integer;

5.1.7 GetCnsBitmap
function GetCnsBitmap(AImageIndex: Integer): OleVariant;
procedure SaveImages;

5.1.8 GetSelectedImageLabels
function GetSelectedImageLabels(AImageIndex: Integer; AIndex: Integer): WideString;

5.1.9 ImportExpertEx
procedure ImportExpertEx(const AProfileName: WideString; const APatientName: WideString;
const APatientID: WideString; const APatientSex: WideString;
const APatientAge: WideString; const APatientStudyID: WideString;
const AStudyUID: WideString; APatientDOB: Double);

It show the import form. you can select other image format and import into dicom image

2008 Zhong Jian Wang Medical Software


Delphi Programing 53

example:
WebDicomView1.ImportExpertEx(
'US group', // profile name
'Feng', //patient name
'3005', //patient id
'M', //sex
'006Y', //age
'0002', //study id
'12321321312355555551', //study UID
now //study Date
);

5.1.10 ScanImageEx
procedure ScanImageEx(AScanerIndex: Integer; AShowUI: WordBool; const AProfileName: WideString;
const APatientName: WideString; const APatientID: WideString;
const APatientSex: WideString; const APatientAge: WideString;
const APatientStudyID: WideString; const AStudyUID: WideString;
APatientDOB: Double);

2008 Zhong Jian Wang Medical Software


54 Web Pacs Viewer

example:

WebDicomView1.ScanImageEx(-1, true,
'US group', // profile name
'Feng', //patient name
'3005', //patient id
'M', //sex
'006Y', //age
'0002', //study id
'12321321312355555551', //study UID
now //study Date
);

5.1.11 ShowCaptureDialogEx
procedure ShowCaptureDialogEx(const AProfileName: WideString; const APatientName: WideString;
const APatientID: WideString; const APatientSex: WideString;
const APatientAge: WideString; const APatientStudyID: WideString;
const AStudyUID: WideString; APatientDOB: Double);

It show the capture form

2008 Zhong Jian Wang Medical Software


Delphi Programing 55

example:
WebDicomView1.ShowCaptureDialogEx(
'US group', // profile name
'Feng', //patient name
'3005', //patient id
'M', //sex
'006Y', //age
'0002', //study id
'12321321312355555551', //study UID
now //study Date
);

5.1.12 IsStudyLoaded
function IsStudyLoaded(const AStudyUID: WideString): Integer;

5.1.13 WaitForStudyLoad
function WaitForStudyLoad(const AStudyUID: WideString): Integer;

5.1.14 LoadFromFile
procedure LoadFromFile(const AFileName: WideString);

5.1.15 LoadFromDICOMDIR
procedure LoadFromDICOMDIR(const APath: WideString);

5.1.16 LoadFromFolder
procedure LoadFromFolder(const APath: WideString);

5.1.17 ImportFromFile
procedure ImportFromFile(const AFileName: WideString; AImageFormat: Integer);

5.1.18 SaveToDICOMDIR
procedure SaveToDICOMDIR(const APath: WideString);

5.1.19 SaveSelectedToFile
procedure SaveSelectedToFile(const AFileName: WideString; AImageFormat: Integer);

5.2 Published
5.2.1 Host
property Host: WideString;

2008 Zhong Jian Wang Medical Software


56 Web Pacs Viewer

5.2.2 Port
property Port: Integer;

5.2.3 CallingAEtitle
property CallingAEtitle: WideString;

5.2.4 CalledAEtitle
property CalledAEtitle: WideString;

5.2.5 ImageScreenIndex
property ImageScreenIndex;

5.2.6 ImageScreenIndex1
property ImageScreenIndex1;

5.2.7 TranferSyntax
property TranferSyntax: WideString;

5.2.8 LoadMode
property LoadMode: Integer;

5.2.9 Level
property Level: WideString;

5.2.10 UserName
property UserName: WideString;

5.2.11 Password
property Password: WideString;

5.2.12 CMovePort
property CMovePort: Integer;

5.2.13 ShowQueryDialog
property ShowQueryDialog: WordBool;

5.3 Event
5.3.1 OnSaveCapture
property OnSaveCapture: TNotifyEvent;

5.3.2 OnImageFlagChange
property OnImageFlagChange: TNotifyEvent;

2008 Zhong Jian Wang Medical Software


Delphi Programing 57

5.3.3 OnDicomPrint
property OnDicomPrint: TWebDicomViewOnDicomPrint;

5.3.4 OnImageFormClose
property OnImageFormClose: TNotifyEvent;

5.3.5 OnDeleteImage
property OnDeleteImage: TWebDicomViewOnDeleteImage;

5.4 Example
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, OleCtrls, WebDicomViewer_TLB, kxstring, KxDicomClient, AxCtrls;

type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
File1: TMenuItem;
Load1: TMenuItem;
Capture1: TMenuItem;
Import1: TMenuItem;
Scan1: TMenuItem;
Print1: TMenuItem;
N1: TMenuItem;
WebDicomView1: TWebDicomView;
procedure Load1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Capture1Click(Sender: TObject);
procedure Import1Click(Sender: TObject);
procedure Scan1Click(Sender: TObject);
procedure WebDicomView1SaveCapture(Sender: TObject);
procedure WebDicomView1ImageFormClose(Sender: TObject);
procedure WebDicomView1DeleteImage(ASender: TObject;
var CanDelete: Integer);
procedure WebDicomView1DicomPrint(ASender: TObject;
var CanPrint: Integer);
procedure WebDicomView1ImageFlagChange(Sender: TObject);
procedure Print1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

2008 Zhong Jian Wang Medical Software


58 Web Pacs Viewer

implementation

uses printers;
{$R *.dfm}

procedure TForm1.Load1Click(Sender: TObject);


begin
WebDicomView1.LoadImages(
'Patient Name', //patient name, will display on image list tab and network queue form
'1.3.12.2.1107.5.1.1.21044.20040819115710127.2', //studyuid
0 //0 bit = 0
// 1 load the study and lock( not auto clear)
//1 bit = 0 load all images of the study
// 1 load only key images
);
end;

procedure TForm1.FormShow(Sender: TObject);


begin
WebDicomView1.Connect;
end;

procedure TForm1.Capture1Click(Sender: TObject);


begin
WebDicomView1.ShowCaptureDialogEx(
'US group', // profile name
'Feng', //patient name
'3005', //patient id
'M', //sex
'006Y', //age
'0002', //study id
'12321321312355555551', //study UID
now //study Date
);
end;

procedure TForm1.Import1Click(Sender: TObject);


begin
WebDicomView1.ImportExpertEx(
'US group', // profile name
'Feng', //patient name
'3005', //patient id
'M', //sex
'006Y', //age
'0002', //study id
'12321321312355555551', //study UID
now //study Date
);
end;

procedure TForm1.Scan1Click(Sender: TObject);


begin

2008 Zhong Jian Wang Medical Software


Delphi Programing 59

WebDicomView1.ScanImageEx(-1, true,
'US group', // profile name
'Feng', //patient name
'3005', //patient id
'M', //sex
'006Y', //age
'0002', //study id
'12321321312355555551', //study UID
now //study Date
);
end;

procedure TForm1.WebDicomView1SaveCapture(Sender: TObject);


begin
//tiggle after save capture image, do something after save image
ShowMessage('Do after save');
end;

procedure TForm1.WebDicomView1ImageFormClose(Sender: TObject);


begin
//tiggle when click the close button
Close;
end;

procedure TForm1.WebDicomView1DeleteImage(ASender: TObject;


var CanDelete: Integer);
begin
// if can not delete a image, set 0, if can set 1
CanDelete := 0; //0 can not delete
end;

procedure TForm1.WebDicomView1DicomPrint(ASender: TObject;


var CanPrint: Integer);
begin
//for can print return 1 , other return 0
CanPrint := 1;
end;

procedure TForm1.WebDicomView1ImageFlagChange(Sender: TObject);


begin
//tiggle if key images change
end;

procedure TForm1.Print1Click(Sender: TObject);


var
i: Integer;
v1: TOleGraphic;

begin
Printer.BeginDoc;
for i := 0 to WebDicomView1.GetSelectedCount - 1 do
begin
v1.Picture := IPicture( WebDicomView1.GetCnsBitmap(i));

2008 Zhong Jian Wang Medical Software


60 Web Pacs Viewer

end;
Printer.EndDoc;
end;

end.

2008 Zhong Jian Wang Medical Software


Part

VI
62 Web Pacs Viewer

6 VB Programing

2008 Zhong Jian Wang Medical Software


Part

VII
64 Web Pacs Viewer

7 VC Programing

2008 Zhong Jian Wang Medical Software


Part

VIII
66 Web Pacs Viewer

8 Access Sample

2008 Zhong Jian Wang Medical Software


67

Endnotes 2... (after index)

2008 Zhong Jian Wang Medical Software


Back Cover

You might also like