how to fuse 2 set data different length frame
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi all, i have 60 image SPECT, and 193 Image CT. how to fuse it? which different length frame/slice.
i use imfuse but failed.
anyone can help me?
clc
clear all
% Get a list of all files in the folder with the desired file name pattern.
myFolder = 'C:\Users\Akmal\Downloads\phantom IEC, weight 12.8 kg-20210104T080816Z-001\phantom IEC, weight = 12.8 kg\xQuant\xquant';
filePattern = fullfile(myFolder, '*.dcm'); % Change to whatever pattern you need.
theFiles = dir(filePattern);
for K = 1 : length(theFiles)
baseFileName = theFiles(K).name;
fullFileName = fullfile(theFiles(K).folder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
% Now do whatever you want with this file name,
% such as reading it in as an image array with imread()
N(:,:,K) = dicomread(fullFileName);
scale = 256/103 ;
Pi(:,:,K) = imresize(N(:,:,K),scale) ; % where P is your 103*103 3D matrix
end
% Get a list of all files in the folder with the desired file name pattern.
myFolder = 'C:\Users\Akmal\Downloads\phantom IEC, weight 12.8 kg-20210104T080816Z-001\phantom IEC, weight = 12.8 kg\xQuant\xquant\ct';
filePattern = fullfile(myFolder, '*.dcm'); % Change to whatever pattern you need.
theFiles = dir(filePattern);
for L = 1 : length(theFiles)
baseFileName = theFiles(L).name;
fullFileName = fullfile(theFiles(L).folder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
% Now do whatever you want with this file name,
% such as reading it in as an image array with imread()
M(:,:,L) = dicomread(fullFileName);
end
imfuse2(Pi, M);
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!