Create a .mat file similar to MRI
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
Does anyone know how to place 12 mri images into the same matrix size and shape as D in the .mat file MRI?
Any help is greatly appreciated.
-Thanks
0 件のコメント
回答 (2 件)
Youssef Khmou
2013 年 5 月 6 日
編集済み: Youssef Khmou
2013 年 5 月 6 日
hi,
The default MRI sample has singleton dimension right?
try :
% given I1,.............,I12
[m n]=size(I1);
M=zeros(m,n,12);
M(:,:,1)=I1;
%....
M(:,:,12)=I12;
D=zeros(m,n,1,12);
for n=1:12
D(:,:,:,n)=M(:,:,n);
end
save Neoplasm_MRI D
10 件のコメント
Youssef Khmou
2013 年 5 月 6 日
well thats where the problem then, you have to solutions : 1) transform them into grayscale images using
rgb2gray
2)or add a 4th/5th dimention in M/D:
M=zeros(m,n,3,1,12) ;
% in the code use M(:,:,:,:,n)
bintoro adi
2014 年 12 月 2 日
Hi Christoper, Can u write the final code, because i still have the the same error (Subscripted assignment dimension mismatch). thank u...
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Neuroimaging についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!