Reads dicom file.
function call:
img =
vsg('DICOMRead',’filename’);
Arguments:
file - input file
name of a DICOM file format data.
Description:
The function reads a
dicom file or all the dicom files from the specified folder suing the
UID of DICOM files.
img – a two
dimensional array of values or a three dimensional array of values.
Example:
[filename, chosenDirectory] = uigetfile('*.dcm',
'Pick an M-file');
filePath = [chosenDirectory filename];
%filePath contains the complete path of the dicom file.
stackOfImages=vsg('DICOMRead',filePath);
%one file or all the dicom file from the choosen directory
h=figure;imagesc(stackOfImages(:,:,:,1));colormap(gray);set(h,'Name','1');