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

조회 수: 26 (최근 30일)
Mohamed Moawed
Mohamed Moawed 2013년 4월 9일
댓글: Walter Roberson 2016년 5월 30일
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일
I've never used it, but a quick search of the Help gave:
doc hdrread
  댓글 수: 3
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일
  댓글 수: 8
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)

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by