필터 지우기
필터 지우기

i have 186 brain mri 2d slices (256*215) i want to stack them into 3d array (256*215*186) ?

조회 수: 2 (최근 30일)
my code has an error at this line image(:,:,slice) = thisSlice; dimension mismatch help me to solve this problem
numberOfSlices=186;
image = zeros(256,215, numberOfSlices);
for slice = 1 : numberOfSlices
files = dir('C:\Users\MuhammadFaisal\Desktop\finalimage(117-1) output/*.png');
dir_name='finalimage(117-1) output/output_slice_';
fullFileName = fullfile('C:\Users\MuhammadFaisal\Desktop\finalimage(117-1) output',num2str(slice),'.png');
thisSlice = double(imread(strcat(dir_name,num2str(slice),'.png')))/255;
image(:,:,slice) = thisSlice;
end
  댓글 수: 3
faisal aziz
faisal aziz 2016년 11월 22일
i have all images of dimension 256*215 but still error
neenu prakash
neenu prakash 2017년 1월 24일
I do have the same error. I am doing my thesis as 3D reconstruction of MRI images. Can you help me? Thank you.

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

답변 (1개)

James Tursa
James Tursa 2016년 11월 22일
Type the following at the command line:
dbstop if error
Then run your code. When the error is encountered the code will pause in the debugger with all current workspace variable values intact. Then do this to see what you really have:
size(thisSlice)

카테고리

Help CenterFile Exchange에서 MRI에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by