You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
open nii images with matlab R2017a?
5 views (last 30 days)
Show older comments
I use Matlab R2017a but i cannot open nii images with niftiread command...
Do i miss something??How can i open them??
Accepted Answer
Walter Roberson
on 24 Dec 2018
19 Comments
DIMITRIOS THEODOROPOULOS
on 25 Dec 2018
I cannot find the installation instructions ,so could you just briefly say which file must i open to read the nii??
Walter Roberson
on 25 Dec 2018
On that page, click on the Download button. That will download a .zip file. Unzip the file into a convenient directory that is not under the MATLAB installation directory. Now, in MATLAB, use pathtool to add that folder to the MATLAB path. Remember to save afterwards.
The particular one you need is load_nii
DIMITRIOS THEODOROPOULOS
on 25 Dec 2018
I followed the instructions but i get the error when i run it..
Walter Roberson
on 25 Dec 2018
It isn't a GUI tool. You need to pass the name of the nii file at the very least.
DIMITRIOS THEODOROPOULOS
on 25 Dec 2018
Ι am struggling to find where must i pass the nii file...I cannot... :(
and i cannot find any further details....Could you help me more??
Walter Roberson
on 25 Dec 2018
result = load_nii(Filename_goes_here);
DIMITRIOS THEODOROPOULOS
on 26 Dec 2018
i feel very stupid....i am sorry ..tit doesnt work either..
where is my mistake??
Walter Roberson
on 26 Dec 2018
remove that added line from that file. Then in a different file
result = load_nii('1103_3_glm');
DIMITRIOS THEODOROPOULOS
on 26 Dec 2018
it has no errors but no image appears..This same image opens in mango...
Anyway thanks for your support
Walter Roberson
on 26 Dec 2018
load_nii just loads the data: it does not display the data.
After you have loaded the data, examine size(result) and class(result) and tell us what shows up.
DIMITRIOS THEODOROPOULOS
on 27 Dec 2018
Walter Roberson
on 27 Dec 2018
now examine result.img
DIMITRIOS THEODOROPOULOS
on 28 Dec 2018
ok,this gives me a big matrix..
Walter Roberson
on 28 Dec 2018
What size of matrix does it give?
DIMITRIOS THEODOROPOULOS
on 28 Dec 2018
Walter Roberson
on 28 Dec 2018
Use volumeViewer to examine the data.
DIMITRIOS THEODOROPOULOS
on 28 Dec 2018
i want to see the image..What is the command??
Walter Roberson
on 28 Dec 2018
volumeViewer( result.img );
provided you have a new enough MATLAB.
If not then look in the File Exchange for "vol3d v2"
DIMITRIOS THEODOROPOULOS
on 29 Dec 2018
Thank you very much!!this worked..That is what i really wanted to see!
More Answers (0)
See Also
Categories
Find more on Import, Export, and Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)