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_localtest
% function dcmserver_localtest
% Matlab library function for "dcmserver_connection.m" (see the related help).  
% This function tests the local dcm server (dcmtk) basic functionality using a 
% predefined calling AET ("MatlabTest") and called AET ("MATLAB") (defined in the "dcmqrscp.cfg"). 
% If the result would be the following (or similar):
%   Requesting Association
%   Association Accepted (Max Send PDV: 16372)
%   Echo [1], Complete [Status: Success]
%   Releasing Association
% then the local dcm server (starting by "dcmqrscp.exe") is already working locally.   
% 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_dcmserverlocaltest_tmpfile.txt'];
opcommand1 = ['echoscu.exe -aet MatlabTest -aec MATLAB -v %COMPUTERNAME% 104 > ',dcmtmpfile];
dcmtlk_path = fileparts(which('echoscu.exe'));
curr_path = cd;
[sys_status, sys_result] = system(opcommand1);


Contact us