how can i read or open a .img file using Matlab?

i have an fMRI images with .img and .hdr format but i can't open or see this image. could you please help me?
thanks

回答 (2 件)

Matt Kindig
Matt Kindig 2013 年 4 月 9 日

0 投票

I've never used it, but a quick search of the Help gave:
doc hdrread

3 件のコメント

Mohamed Moawed
Mohamed Moawed 2013 年 4 月 9 日
thanks for your reply but i don't need to read the header i want to open the image with format .img
Image Analyst
Image Analyst 2013 年 4 月 9 日
Matt, that doesn't say anything about reading files with extensions like .img, but it does for .hdr files.
Mohamed, with your hdr image, did you try the demo:
hdr = hdrread('office.hdr');
rgb = tonemap(hdr);
imshow(rgb);
it certainly does display an image from an hdr file.
Mohamed Moawed
Mohamed Moawed 2013 年 4 月 9 日
yes i tried it and it gives an error. "Not a Radiance file."

サインインしてコメントする。

Walter Roberson
Walter Roberson 2013 年 4 月 9 日

0 投票

8 件のコメント

Mohamed Moawed
Mohamed Moawed 2013 年 4 月 9 日
thanks for your help, but i need to see the image like (imshow ) command. is there a command to see this image
Walter Roberson
Walter Roberson 2013 年 4 月 9 日
One you have read the image in using analyze75read(), you can imshow() the image portion.
Mohamed Moawed
Mohamed Moawed 2013 年 4 月 9 日
no i tried this but imshow() command still give an error
Image Analyst
Image Analyst 2013 年 4 月 9 日
, which is.......
Come on Mohamed, work with us here. Walter still, after all these years, has not been able to get an alpha version of the long awaited Mind Reading Toolbox. And of course, neither have I.
Mohamed Moawed
Mohamed Moawed 2013 年 4 月 9 日
i'm interesting with Matlab and i'm sure there is a way for that
Walter Roberson
Walter Roberson 2013 年 4 月 9 日
I am the third-party developer for the MATLAB Mind Reading Toolbox, but unfortunately this case has not been implemented yet, so I am going to need to know what the error message is. I am also going to need to know size() and class() of the data that was read in by analyze75read(). Oh yes, I am also going to have to know if this MRI data was produced by SPM.
Karin Lundengård
Karin Lundengård 2016 年 5 月 30 日
編集済み: Walter Roberson 2016 年 5 月 30 日
Hi,
I'd also really want to get help with this problem.
My images were produced by SPM, and the error message I get is this:
>> betaVal = analyze75read('beta_0001.img');
>> imshow(betaVal)
Error using images.internal.imageDisplayValidateParams>validateCData (line 115)
Multi-plane image inputs must be RGB images of size MxNx3.
Error in images.internal.imageDisplayValidateParams (line 27)
common_args.CData = validateCData(common_args.CData,image_type);
Error in images.internal.imageDisplayParseInputs (line 78)
common_args = images.internal.imageDisplayValidateParams(common_args);
Error in imshow (line 223)
[common_args,specific_args] = ...
Not too sure about size and class though, where do I find that information?
Walter Roberson
Walter Roberson 2016 年 5 月 30 日
Please show us size(betaVal) and class(betaVal)

サインインしてコメントする。

タグ

質問済み:

2013 年 4 月 9 日

コメント済み:

2016 年 5 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by