Read img medical image without header in matlab

前端 未结 2 1743

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 08:49

    The lung x-rays of the JSRT database (www.jsrt.or.jp/jsrt-db/eng.php), have that format. I tested this code with them and it works:

    fid = fopen('image.img','r','b');
    oneSlice = fread(fid, [2048 2048], '*uint16','b');
    img = mat2gray(oneSlice, [0,4096]);
    fclose(fid);
    
    0 讨论(0)
  • 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);  
    
    0 讨论(0)
提交回复
热议问题