MATLAB传值问题clear all;Files=dir('*.dcm');LengthFiles = length(Files);for i = 1:LengthFiles;I1 = dicomread(Files(i).name);D(:,:,i)= I1;%D1 = shiftdim(D,1);%imagesc(D);end%imagesc(I2);for j=1:256D1= D(j,:,:);%imagesc(D1);end%dicomwrite(D2,'Corona

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/02 08:11:51
MATLAB传值问题clear all;Files=dir('*.dcm');LengthFiles = length(Files);for i = 1:LengthFiles;I1 = dicomread(Files(i).name);D(:,:,i)= I1;%D1 = shiftdim(D,1);%imagesc(D);end%imagesc(I2);for j=1:256D1= D(j,:,:);%imagesc(D1);end%dicomwrite(D2,'Corona
xjAoeNBv%=!P<촙?q7RQĚ4MmJE+*(iRff&ٻpvVMYz~~LV`yD.i2<VldmQ[ؗV2rWU:E$PV<`B5ʐKxL+JXλd͐ԜòP7╺AY`\EAE2d UXVk:Tw CZd uבd(]\_H9_3"L!hC:J8$~|"v_j$kn$$LYZ4Dg|?#mj{I5bo7 j[

MATLAB传值问题clear all;Files=dir('*.dcm');LengthFiles = length(Files);for i = 1:LengthFiles;I1 = dicomread(Files(i).name);D(:,:,i)= I1;%D1 = shiftdim(D,1);%imagesc(D);end%imagesc(I2);for j=1:256D1= D(j,:,:);%imagesc(D1);end%dicomwrite(D2,'Corona
MATLAB传值问题
clear all;
Files=dir('*.dcm');
LengthFiles = length(Files);
for i = 1:LengthFiles;
I1 = dicomread(Files(i).name);
D(:,:,i)= I1;
%D1 = shiftdim(D,1);
%imagesc(D);
end
%imagesc(I2);
for j=1:256
D1= D(j,:,:);
%imagesc(D1);
end
%dicomwrite(D2,'Coronal.dcm');
%I2 ;= dicomread('Coronal.dcm');
D2 = squeeze(D1);
B = imresize(D2,10)
imagesc(B);
%imshow(D2,[ ])
为什么D1 D2 都是0啊.怎么解决啊.

MATLAB传值问题clear all;Files=dir('*.dcm');LengthFiles = length(Files);for i = 1:LengthFiles;I1 = dicomread(Files(i).name);D(:,:,i)= I1;%D1 = shiftdim(D,1);%imagesc(D);end%imagesc(I2);for j=1:256D1= D(j,:,:);%imagesc(D1);end%dicomwrite(D2,'Corona
D1= D(j,:,:); 这里在执行的时候D1每次都被擦掉重写,for循环就没有意义了.
其他的问题从代码上我看不出来.