Code covered by the BSD License  

Highlights from
ReadDicomDir

Be the first to rate this file! 12 Downloads (last 30 days) File Size: 4.72 KB File ID: #31978

ReadDicomDir

by Wen-Tung Wang

 

27 Jun 2011 (Updated 01 Jun 2012)

read dicom images in a directory/folder

| Watch this File

File Information
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

MATLAB release MATLAB 7.10 (2010a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
23 Feb 2012 Andrew Davis

Seems to balk at GE data

25 May 2012 MLiljeroth

For a GE system where do I find the mag and phaflags?

Kind regards,

Maria

01 Jun 2012 Wen-Tung Wang

I have updated the code and it should read GE dicom images. Please try it.

01 Jun 2012 Wen-Tung Wang

Forgot to mention that it takes one day or more for the system to update the file.

Please login to add a comment or rating.
Updates
06 Jul 2011

revised to read and sort magnitude and phase images

06 Jul 2011

debug: 1st phase image not properly indexed

14 Oct 2011

Tested uging Philips mag, phase dicom images.
For GE: need to check ImageType in diocm header and then revise magflag and phaflag
For Philips real, imag images: check ImageType and revise flags

01 Jun 2012

Read Siemens dicom in mosaic format
Read Siemens PET images
Read GE dicom

Tag Activity for this File
Tag Applied By Date/Time
dicom viewer image Wen-Tung Wang 28 Jun 2011 09:57:28
dicom info programm Mohammad Bhuiyan 26 Mar 2012 07:21:01

Contact us at files@mathworks.com