Borrar filtros
Borrar filtros

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

27 visualizaciones (últimos 30 días)
Mohamed Moawed
Mohamed Moawed el 9 de Abr. de 2013
Comentada: Walter Roberson el 30 de Mayo de 2016
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

Respuestas (2)

Matt Kindig
Matt Kindig el 9 de Abr. de 2013
I've never used it, but a quick search of the Help gave:
doc hdrread
  3 comentarios
Image Analyst
Image Analyst el 9 de Abr. de 2013
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 el 9 de Abr. de 2013
yes i tried it and it gives an error. "Not a Radiance file."

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 9 de Abr. de 2013
  8 comentarios
Karin Lundengård
Karin Lundengård el 30 de Mayo de 2016
Editada: Walter Roberson el 30 de Mayo de 2016
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 el 30 de Mayo de 2016
Please show us size(betaVal) and class(betaVal)

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by