Read img medical image without header in matlab

前端 未结 2 1744

I have a radiograph .img file without the header file. However, the researchers who have published the file have given this information about it

High resolut         


        
2条回答
  •  借酒劲吻你
    2021-01-07 09:04

    %%% Read image
        fid = fopen('image.img','r','b');
        oneSlice = fread(fid, [2048 2048], '*uint16','b');
        img = mat2gray(oneSlice, [0,4096]);
        fclose(fid);
    
    %%%rotate image
    
        imgR = imrotate(img,270);
    
    %%%horizontal flip image
    
        imgRF = flipdim(TestImgR ,2);  
    

提交回复
热议问题