MATLAB Answers

how to fuse 2 set data different length frame

조회 수: 2(최근 30일)
mohd akmal masud
mohd akmal masud 2021년 1월 6일
댓글: KSSV 2021년 1월 7일
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);
  댓글 수: 1
KSSV
KSSV 2021년 1월 7일
What error it shows?

댓글을 달려면 로그인하십시오.

답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by