read 3d data from .raw image

3 Ansichten (letzte 30 Tage)
khaled alsaih
khaled alsaih am 25 Apr. 2018
Bearbeitet: khaled alsaih am 25 Apr. 2018
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

Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by