How can I load and view medical image .mha ?

Hi,
I would like to read a medical image with extension .mha and store it in variable I. And then view I using imshow.
I need the simplest code source possible to start working on. Thank you
ps:I am using Matlab 2009 under Mac OS X 10.6.8.

 採用された回答

Makrim
Makrim 2014 年 3 月 26 日

0 投票

Read Medical Data 3D by Dirk-Jan Kroon 10 Nov 2010, worked for me.

7 件のコメント

Beatrice Ayedun
Beatrice Ayedun 2016 年 10 月 19 日
I used the code and it displaying error; Undefined function or variable 'exp1a'.
Error in convert (line 8) [V,info]=ReadData3D(exp1a);
Walter Roberson
Walter Roberson 2016 年 10 月 19 日
Please include a complete copy of the error messages.
The code in that link has no routine named "convert", and there is no MATLAB routine named "convert".
It appears to me that you wrote your own convert.m and have a bug in it. You should be passing a file name (as a string) to ReadData3D . If convert is your own routine we are going to need the source for it; if not then you are going to need to tell us where we can find it.
Beatrice Ayedun
Beatrice Ayedun 2016 年 11 月 2 日
編集済み: Beatrice Ayedun 2016 年 11 月 2 日
thanks, convert is just the workspace name. this is the code: Undefined function 'ReadData3D' for input arguments of type 'char'.
Error in convert (line 9) [V,info]=ReadData3D('exp1a.mha');
and this is the error that was displayed
Undefined function 'ReadData3D' for input arguments of type 'char'.
Error in convert (line 9) [V,info]=ReadData3D('exp1a.mha');
Walter Roberson
Walter Roberson 2016 年 11 月 2 日
Visit the page http://www.mathworks.com/matlabcentral/fileexchange/29344-read-medical-data-3d . On the upper right side, click on Download ZIP. Save the file on your system. Extract it into a convenient directory that is not on your MATLAB path. Now go into MATLAB and use pathtool to add that directory to your MATLAB path.
Alternately if you have a version from about R2014a onwards, then you could click on "Resources" (older versions) or "Add Ons", request add-ons, wait for the add-on manager page to come up, search and find the Read Medical Data 3D entry there, click on it, and in the page that comes up, tell MATLAB that you want to install it.
Beatrice Ayedun
Beatrice Ayedun 2016 年 11 月 8 日
Thanks for your help. I tried it and it is no more giving me error. Pls i need to preview the image because it is not showing, i guess it has to do with rescaling. this is the message in the command window.
RescaleSlope not available, assuming 1 RescaleIntercept not available, assuming 0
thanks for your help
kitty varghese
kitty varghese 2018 年 2 月 19 日
I'm using this file exchange to read my database, I'm using MATLAB Version: 9.0.0.341360 (R2016a). When I give the input
if true
[V,info]=ReadData3D('Normal001-DTI.mha');
end
I get the error Undefined function or variable 'ReadData3D'.
Walter Roberson
Walter Roberson 2018 年 2 月 19 日
https://www.mathworks.com/matlabcentral/fileexchange/29344-read-medical-data-3d is not installed or it is not on your MATLAB path

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

その他の回答 (1 件)

hamed abdulaziz
hamed abdulaziz 2014 年 3 月 22 日

2 投票

1 件のコメント

Makrim
Makrim 2014 年 3 月 26 日
Thank you for your answer , I will check it to adapt it to my needs ...

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

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

質問済み:

2014 年 3 月 20 日

コメント済み:

2018 年 2 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by