Reading nrrd files in python

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading nrrd files in python

Peslami
This post has NOT been accepted by the mailing list yet.
Hi Everyone,

I'm a fairly new user of Slicer and have analyzed CT images of coronary arteries in Slicer and detected (labeled) calcium plaques in them. I have saved all my images and labels in a .nrrd format. Now, I would like to load those images in python so that I can access the image information (i.e. pixel information, dimensions, individual labels etc). I have used SimpleITK to read the image, however I'm pretty much stuck on what to do next. I would appreciate any guidance.

Thanks,
Parastou
Reply | Threaded
Open this post in threaded view
|

Re: Reading nrrd files in python

Fernando Pérez-García
Hi Peslami,

This tutorials should help [1].

Personally I prefer saving them in the NIfTI format (.nii.gz), so that I can
read them using NiBabel and manipulating them using SciPy.

However, you might want to post your question on a SimpleITK mailing list
[2] instead of here.


Best,

Fernando

[1] http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/
[2] http://www.simpleitk.org/SimpleITK/help/mailing.html



--
View this message in context: http://slicer-users.65878.n3.nabble.com/Reading-nrrd-files-in-python-tp4031064p4031070.html
Sent from the slicer-users mailing list archive at Nabble.com.
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Reading nrrd files in python

Fernando Pérez-García
This post has NOT been accepted by the mailing list yet.
In reply to this post by Peslami
Hi Peslami,

This tutorials should help [1].

Personally I prefer saving them in the NIfTI format (.nii.gz), so that I can read them using NiBabel and manipulating them using SciPy.

However, you might want to post your question on a SimpleITK mailing list [2] instead of here.


Best,

Fernando

[1] http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/
[2] http://www.simpleitk.org/SimpleITK/help/mailing.html
Reply | Threaded
Open this post in threaded view
|

Re: Reading nrrd files in python

Peslami
This post has NOT been accepted by the mailing list yet.
In reply to this post by Fernando Pérez-García
Thank you very much Fernando. I checked out SimpleITK and now am able to get image arrays. Now the next problem I have is how to access the labels I have created in my .nrrd files and how would I save each label as a separate .nrrd file.

I am going to check NIfTI format as well and see what I can do.

Best,
Parastou