Thankyou
Kate Morgan
Research Technician
Department of Medical Imaging
University of Toronto
Hi Kate,
There's no single command you can give that will read the entire
directory of DICOM files into one array, but you can use this code:
% Preallocate the array (using the dimensions you gave).
% You may need to change the datatype to match what the file contains.
X(128, 128, 1, 33) = int16(0);
d = dir('JaneDoe*');
for p = 1:numel(d)
X(:,:,:,p) = dicomread(d(p).name);
end
Voilà.
Jeff Mather
Image Processing Group
The MathWorks, Inc.
jma...@mathworks.com