read 3d data from .raw image
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!