how to read all and form a single composite image

1 回表示 (過去 30 日間)
andhavarapu lokesh
andhavarapu lokesh 2017 年 1 月 20 日
i want to read a dicom file which is 4D having 63 frames out of which i need to get a composite image leaving the first 61,62 frames can any one tell me how to read the dicom image and get only composite image like that there are 63dcm files in a folder
if true
projectdir = 'E:\SHIVA BACKUP\THYROID\P1\AJAY BAIRAGY1';
X = zeros(128, 128, 1,63,'uint16');
% Read the series of images.
% for p=1
p=40;
thisfile = sprintf('IM_%d.dcm', p);
filename = fullfile( projectdir, thisfile );
imdata = dicomread(filename);
imsize = size(imdata);
if ~isequal( imsize, [128 128 1 63] )
fprintf('file is unexpected size %s instead of [128 128 1 72], skipping "%s"\n', mat2str(imsize), filename);
else
X(:, :,1,p) = imdata;
end
figure();
s= montage(X(:,:,1,p), [0 65000 ]);
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by