HOW TO SAME THE RATIO
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all,
i have 60 image SPECT, and 203 image CT.
Dimension for SPECT is 103, and CT dimension is 256.
This coding below i develop for 3D.
But i got error at this ratio.
rats=size(RZ)./size( P(:,:,K) );
clear all
clc
warning off
P = zeros(103, 103, 60);
for K = 1 : 60
K_file=30+10*K;
petname = sprintf('I%d.dcm', K_file);
P(:,:,K) = dicomread(petname);
end
d=4;%first slice
Folder='ct';%input('***Please enter the CT/MRI data folder name : ','s');
aa=dir(num2str(Folder));
aa=struct2cell(aa);
Slice=size(aa);
Slice=Slice(2)-2;
f=1;ceil(Slice/300);% depands on PC capability 300 is optimum no of slice for this PC
c=round(Slice/f);%No of slices ...4yusoff
% clf
%RZ=zeros(round(400/f),round(500/f),round(c/f));
fprintf('\nReading images. Please wait...\n');
for a=d:1:Slice-1%Slice
clc
Percent=floor(a/(Slice-1)*100)
as=[ Folder '\I' num2str(a*10)];
[X, map]=dicomread([as]);
info = dicominfo([as]);
Y = dicomread(info);
RZ(:,:,Slice-a+3)=Y;%(dpnblkg,kanankiri)
end
RZ=double(RZ);
[N M L]=size(RZ);
rats=size(RZ)./size( P(:,:,K) );
[x,y,z]=meshgrid(rats(1):rats(1):M,rats(1):rats(2):N,rats(1):rats(3):L);
RZ=interp3(RZ,x,y,z);
ANYONE CAN HELP ME?
댓글 수: 5
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Grey Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!