Attempt to reference field of non-structure array.

I am trying to creat a stack of 2d dicom images and represent them in a 3d rotation axis.
N=5;
img_dir ='D:\Stelios PhD files'
strfile = 'Z01';
img = dicomread(fullfile(img_dir, strfile));
siz_img = size(img);
% create result matrix:
ct3d = NaN([siz_img N]);
ct3d(:,:,1) = img;
% load all the remaining images and put them in the matrix
for ii=2:N
strfile = sprintf('Z01',ii);
ct3d(:,:,ii)= dicomread(fullfile(img_dir, strfile));
end
figure
imshow(ct3d(:,:,ii));
dVolume = squeeze(ct3d.D);
it comes up with an error at the dVolume line

답변 (2개)

Stephen23
Stephen23 2017년 12월 4일

0 개 추천

dicomread returns a numeric array. So what do you expect ct3d.D to do?
Stelios Fanourakis
Stelios Fanourakis 2017년 12월 4일

0 개 추천

Actually, I want to load a stack dicom images and have them displayed on the three planes (Sagittal, transverse, frontal).

댓글 수: 1

@Stelios Fanourakis: then you should actually ask how to do that in your question.

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

카테고리

도움말 센터File Exchange에서 DICOM Format에 대해 자세히 알아보기

질문:

2017년 12월 4일

댓글:

2017년 12월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by