| Description |
% [outMat,procInfo,dcmInfo]=ReadDicomDir(inDir [,debugLevel])
% Read DICOM files from directory 'inDir'.
% If mag and phase images in same directory: read and sort these images;
% phase images will be at 2nd half of outMat
%
% inDir: directory where the DICOM files are stored
% debugLevel: if >0, print debug message; debugLevel=0, 1, 2
%
% outMat: a 2D matrix for a single slice, 3D matrix for multiple slices
% procInfo: abbreviated DICOM information
% dcmInfo: DICOM information from 1st DICOM file
%
% Example:
% d1 = 'C:\Data\TAG7MM-92_11'
% [a,pname,pp]=ReadDicomDir(d1);
% figure; imagesc(abs(a(:,:,20))
%
% check current directory
% [a]=ReadDicomDir('.');
%
% use GUI to choose directory
% [a]=ReadDicomDir;
%
% Tested using Siemens dicom images and Philips mag, phase dicom images.
% Tested using Philips mag and phase images
% Tested using GE dicom images: mag, phase, mag, phase, mag, phase ....
%
% For Siemens dicom in mosaic format: default to be magnitude.
% Works for Siemens PET dicom images.
% For Philips real, imag images: check ImageType and revise flags
|