Code covered by the BSD License  

Highlights from
DICOM server connection

DICOM server connection


Laszlo Balkay (view profile)


This script connects to a DICOM server and transfer the a dicom series to the MATLAB workspace

function dcmserver_remotetest(dcmaet,dcmaec,dcmhost,dcmport)
% function dcmserver_test(dcmaet,dcmaec,dcmhost,dcmport)
% Matlab library function for "dcmserver_connection.m" (see the related help).  
% This function tests the selected dcm server connection basic functionality.
% Inputs:
%   dcmaet  - calling AE title 
%   dcmaec  - called AE title of peer
%   dcmhost - hostname of DICOM peer
%   dcmport - tcp/ip port number of peer
% If the result was similar then this:
%   Requesting Association
%   Association Accepted (Max Send PDV: 16372)
%   Echo [1], Complete [Status: Success]
%   Releasing Association
% then the connection to the dcm server is working.   
% For moving dcm file from another dcmserver you have to appropriately setup the AETs 
% and the calling hostnames in the "dcmqrscp.cfg" file. See the "dcmqrscp.cfg" 
% file and the "dcmqrscp_officialexample.cfg" for more details.

% University of Debrecen, Institute of Nuclear Medicine
% Author: Laszlo Balkay/2010

dcmtmpfile = [tempdir,filesep,'matlab_dcmservertest_tmpfile.txt'];
opcommand1 = ['echoscu.exe -aet ', dcmaet,' -aec ',dcmaec,' -v ',dcmhost,' ',dcmport,' > ',dcmtmpfile];
dcmtlk_path = fileparts(which('echoscu.exe'));
curr_path = cd;
[sys_status, sys_result] = system(opcommand1);


Contact us