How to resize multiple dicom images in subfolders and save them?
    조회 수: 1 (최근 30일)
  
       이전 댓글 표시
    
채택된 답변
  yanqi liu
      
 2022년 3월 25일
        fd = fullfile(pwd, 'dcms');
fs = ls(fullfile(fd, '*.dcm'));
for i = 1 : size(fs,1)
    im = dicomread(fullfile(fd, strtrim(fs(i,:))));
    im = imresize(im, [128 128], 'bilinear');
    imwrite(im, fullfile(fd, [strtrim(fs(i,:))) '_128x128.dcm']));
end
댓글 수: 11
  Rik
      
      
 2022년 4월 14일
				Your error seems due to your dicom file, so not something we can debug for you remotely. Unless you use a custom dicom reader and haven't told us yet.
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


