MATLAB Answers

1

How to save .mha file in .jpg .png format ???

Asked by Maham Khan on 1 Jun 2018
Latest activity Commented on by Maham Khan on 26 Sep 2018
Hello !! I am Working on brain tumor detection and my dataset is Brats 2015 which is in .mha format i want to save that in .jpg .How can i do this .?? Need help urgently . Thanks in advance!!

  2 Comments

Did you get the code to convert .mha to .png or .jpg ?will u please help me to convert it to png
No i Actually used 3D Slicer for this purpose.uploaded the whole volume and then saved the desired slice as .png

Sign in to comment.

Products


Release

R2017b

2 Answers

Answer by Varun Garg on 5 Jun 2018
Edited by Varun Garg on 5 Jun 2018
 Accepted Answer

One way is to use VV . It is an open-source and cross platform image viewer. I would suggest using vv to open the image and save it to the requisite format.
Other way is to (In case MATLAB is required)
(i) Use the MITK visualization software to convert from .mha to .raw
(ii) Use the following Matlab toolbox to read the .raw
PS. I have tested neither of them. I am just suggesting untested workarounds.

  9 Comments

The open source software is named vv
Hi @Maham Khan! Can you please tell me how do you convert mha file to png format? How do you download the software and use it?
Linux and MS Windows binaries are available at that page. Source code is available through a github link on that page.

Sign in to comment.


Answer by Walter Roberson
on 11 Jun 2018

  2 Comments

Yes I have tried it but it is not working. I tried the open source source software of vv and MITK but it is also not working. But Maham says that she had tried some software which is working for her so I want that software name.
What happened when you tried to use the File Exchange contributions?

Sign in to comment.