In below we give the code for convert raw file to Jpg image file example code.In raw file contain slices images . raw format is one of the image compress format.
code :
f=fopen('t1_icbm_normal_1mm_pn3_rf20.rawb');
a=fread(f);
input_img = reshape(a,181,217,181);
[r c m] = size(input_img);
for i = 1 : m
imwrite(input_img(:,:,i),['img_' num2str(i)],'jpg')
figure,imshow(uint8(input_img(:,:,i)));
end
In above code convert raw file to Jpg image file then write the image on current directory and show the each slice images.
Related Search : Matlab read raw file example code , Matlab convert raw file to Jpg example, rawb converter code, Matlab convert rawb to image.
No comments:
Post a Comment