reading series of DICOM images on MATLAB

2 ビュー (過去 30 日間)
REHANA M.B
REHANA M.B 2012 年 1 月 5 日
コメント済み: Walter Roberson 2020 年 10 月 10 日
hello sir, i tried to display images on matlab and i get succeeded in that.. but i am stuck up in to display 4 images in quadrangle format .. please help me .. Thanks in advance!!
  2 件のコメント
saarthak agarwal
saarthak agarwal 2020 年 10 月 9 日
Could you please provide the code for displaying multiple dicom files on MATLAB?
Walter Roberson
Walter Roberson 2020 年 10 月 10 日
projectdir = 'Directory/of/dicom/files/';
dinfo = dir( fullfile(projectdir, '*.dcm') );
filenames = fullfile(projectdir, {dinfo.name});
nfiles = length(filenames);
images = cell(nfiles,1);
for K = 1 : nfiles
images{K} = dicomread(filenames{K});
end
montage(images)

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2012 年 1 月 5 日
Use subplot() or see the montage() function.
  6 件のコメント
REHANA M.B
REHANA M.B 2012 年 1 月 5 日
how to read those??
Walter Roberson
Walter Roberson 2012 年 1 月 5 日
If you are using montage(), you could cd() to the directory the images are in and then use the basic file names like I show above. Or instead of cd()'ing to there, you could use an absolute path for each of the file names.
You cannot, however, pass montage() a pathname and a series of file names that are intended to be relative to that path: only directory-relative files names or absolute file names.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by