read 3d data from .raw image

4 ビュー (過去 30 日間)
khaled alsaih
khaled alsaih 2018 年 4 月 25 日
編集済み: khaled alsaih 2018 年 4 月 25 日
hello guys i have a 3d image with .raw extension and whenever i need to read the image is mirroring so ill give my code and i hope you can help me guys
function [oct_volume] = read_oct_volume(iname, X, Y, Z) % read the OCT volume stored in the file iname (here *.raw) % X, Y and Z are the images parameters % in our case: X = 512, Y= 128, Z = 1024; means each volume contains 128 images % B-scan, each of dimension X=512 and Z=1024 oct_volume = zeros(Z, X, Y); fin = fopen(iname,'r'); for i=1:Y I = fread(fin, [X,Z],'ubit8=>uint8'); oct_volume(:, :, i) = imrotate(I, -90);
end fclose(fin); [a] = read_oct_volume('oct.raw',512,128,1024); % image_sequence=uint8(a); imshow(image_sequence(:,:,66))
the original image looks in oct.jpg the matlab view is in oct1.jpg i want oct1.jpg to look like oct.jpg
Thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by