how to read all and form a single composite image
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!