How to convert nii files to stl files?

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

How to convert nii files to stl files?

Christoph
Hello People,

I am trying to open nii (NifTI) files to stl files.
Does anybody have an idea about it.

On this Link: it shows that slicer can read and write this format:
http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/SlicerApplication/SupportedDataFormat

I just started with slicer and I even cann´t open the .nii file.

Could somebody help me please?

Thx,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Julien Finet
Hi, 

I manage to read .nii.gz from here:

I haven't tried with .nii. Can you share your data ?

Julien.

On Mon, May 7, 2012 at 7:31 AM, Christoph <[hidden email]> wrote:
Hello People,

I am trying to open nii (NifTI) files to stl files.
Does anybody have an idea about it.

On this Link: it shows that slicer can read and write this format:
http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/SlicerApplication/SupportedDataFormat

I just started with slicer and I even cann´t open the .nii file.

Could somebody help me please?

Thx,
Chris

--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305.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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Julien Finet
What are the errors you have in the error log dialog (Ctrl+0) after loading the data?
Julien.

On Mon, May 7, 2012 at 8:00 AM, Julien Finet <[hidden email]> wrote:
Hi, 

I manage to read .nii.gz from here:

I haven't tried with .nii. Can you share your data ?

Julien.


On Mon, May 7, 2012 at 7:31 AM, Christoph <[hidden email]> wrote:
Hello People,

I am trying to open nii (NifTI) files to stl files.
Does anybody have an idea about it.

On this Link: it shows that slicer can read and write this format:
http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/SlicerApplication/SupportedDataFormat

I just started with slicer and I even cann´t open the .nii file.

Could somebody help me please?

Thx,
Chris

--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305.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



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Christoph
Hi Julien,

thx for your fast answer.
After several hours trying to open the file or find another program to open it, I managed it just a half hour ago to open it with slicer by pulling the file in the slicer windows.

I do not know at the moment, if I can share data because I got it from my supervisor and I can not reach him today.

Now I have just to save them as a stl file, but how?
Do I have to make a model out of it?

Thx,
Chris

Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Julien Finet
You read a volume as input but you want to save a model/mesh as output.
So yes, you need to process your input to have a model (stl).
Only you can know why you want a model. When you know it, then we can help find the right tool in Slicer to do it.

Julien.

On Mon, May 7, 2012 at 8:30 AM, Christoph <[hidden email]> wrote:
Hi Julien,

thx for your fast answer.
After several hours trying to open the file or find another program to open
it, I managed it just a half hour ago to open it with slicer by pulling the
file in the slicer windows.

I do not know at the moment, if I can share data because I got it from my
supervisor and I can not reach him today.

Now I have just to save them as a stl file, but how?
Do I have to make a model out of it?

Thx,
Chris



--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305p3968417.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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Steve Pieper
FYI, there is a nice series of blog posts about modeling that you may want to read.  They cover slicer version 3, but a lot of the techniques still apply in slicer 4.1.  The last post in the series talks about saving in stl format:

http://openpaleo.blogspot.com/2009/03/3d-slicer-tutorial-part-vi.html

-Steve

On Mon, May 7, 2012 at 10:07 AM, Julien Finet <[hidden email]> wrote:
You read a volume as input but you want to save a model/mesh as output.
So yes, you need to process your input to have a model (stl).
Only you can know why you want a model. When you know it, then we can help find the right tool in Slicer to do it.

Julien.


On Mon, May 7, 2012 at 8:30 AM, Christoph <[hidden email]> wrote:
Hi Julien,

thx for your fast answer.
After several hours trying to open the file or find another program to open
it, I managed it just a half hour ago to open it with slicer by pulling the
file in the slicer windows.

I do not know at the moment, if I can share data because I got it from my
supervisor and I can not reach him today.

Now I have just to save them as a stl file, but how?
Do I have to make a model out of it?

Thx,
Chris



--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305p3968417.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


_______________________________________________
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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Christoph
In reply to this post by Julien Finet
Thank you very much.
So I should create a model out of a trabecula structure (from the spleen) from a micro ct. On the trabecula a finit element calculation based on voxels has been performed.

Could you please tell me what kind of model I should use and how is it possible to create it?


Is there a tutorial within this like which I could use?
http://www.slicer.org/slicerWiki/index.php/Slicer3.6:Training

Thanks a lot,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Steve Pieper
The slicer4 training pages are here:

http://www.slicer.org/slicerWiki/index.php/4.0/Training

Although we don't have one specifically about how to make models with the editor, there is a lot of editor and modeling info in the neurosurgery planning tutorial:

http://www.slicer.org/slicerWiki/images/f/f1/NeurosurgicalPlanning_SoniaPujol.pdf

-Steve

On Mon, May 7, 2012 at 2:34 PM, Christoph <[hidden email]> wrote:
Thank you very much.
So I should create a model out of a trabecula structure (from the spleen)
from a micro ct. On the trabecula a finit element calculation based on
voxels has been performed.

Could you please tell me what kind of model I should use and how is it
possible to create it?


Is there a tutorial within this like which I could use?
http://www.slicer.org/slicerWiki/index.php/Slicer3.6:Training

Thanks a lot,
Chris

--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305p3969311.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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Christoph
Thank you very much Julien and Steve.

Now I can create stl files.
Just one more question.
What do I do wrong if I get the error message: "Premature EOF while reading end solid."?
Did I chose a wrong model.
I got these message at several created stl files.

Thx again,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Steve Pieper
Hi Chris -

It sounds like the .stl file was corrupted somehow - can you provide the steps you used that led to this?

-Steve

On Tue, May 8, 2012 at 6:13 AM, Christoph <[hidden email]> wrote:
Thank you very much Julien and Steve.

Now I can create stl files.
Just one more question.
What do I do wrong if I get the error message: "Premature EOF while reading
end solid."?
Did I chose a wrong model.
I got these message at several created stl files.

Thx again,
Chris

--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305p3970930.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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Christoph
Sure:

1) loading the nii file by pulling it into the slicer windows
2) creation of a model with the editor (choose Master Volume, add 2-3 structures: adjusted ThresholdEffect )
3) Creation of Surface Models with the Grayscale Model Maker
4) Saving the file during the menu selection models
5) Saving with file --> save --> picking only one model select file stl

I was thinking that I did something wrong by the saving (points 4,5).
It would be great if you know what´s wrong?

Thx for your help,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Steve Pieper
Hmm, okay - lets see if we can replicate a simple case:

1) download MRHead from SampleData module
2) go into Editor and create label map
3) pick a drawing tool (e.g. Rectangle) and make a small segmentation
4) pick MakeModel and Apply to create model (instead of Grayscale Model Maker)
5) pick File->Save
5)a) ensure only the row with tissue is checked
5)b) pick file type .stl
5)c) pick output directory
5)d) pick Save

I get this stl file:

http://dl.dropbox.com/u/1686930/tissue.stl

Is this like what you get?  If so, you can try swapping in your .nii file in step 1.  Or maybe doing a more complex segmentation in step 3.

HTH,
Steve

On Tue, May 8, 2012 at 1:34 PM, Christoph <[hidden email]> wrote:
Sure:

1) loading the nii file by pulling it into the slicer windows
2) creation of a model with the editor (choose Master Volume, add 2-3
structures: adjusted ThresholdEffect )
3) Creation of Surface Models with the Grayscale Model Maker
4) Saving the file during the menu selection models
5) Saving with file --> save --> picking only one model select file stl

I was thinking that I did something wrong by the saving (points 4,5).
It would be great if you know what´s wrong?

Thx for your help,
Chris


--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305p3972011.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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Christoph
Hey Steve,

thx I tried it too, but I still get the same error message:
ERROR: In /Source/ParaView/release/ParaView/VTK/IO/vtkSTLReader.cxx, line 446
vtkSTLReader (0x138b50df0): STLReader error reading file: /Users/Desktop/Downloads/tissue-3.stl Premature EOF while reading end solid.

I also got the message with your stl file.
No idea why this happens?

Thx,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Andras Lasso
In reply to this post by Christoph
Hi Christoph,

Probably you saved your file in some other file format (VTK, VTP, ...) and you gave wrong file extension (STL).

If you are not sure what format your data is in then you can upload it to somewhere, send us the link, and we can help you to identify it.

Andras

From: Christoph
Sent: 2012-05-09 4:43 AM
To: [hidden email]
Subject: Re: [slicer-users] How to convert nii files to stl files?

Hey Steve,

thx I tried it too, but I still get the same error message:
ERROR: In /Source/ParaView/release/ParaView/VTK/IO/vtkSTLReader.cxx, line
446
vtkSTLReader (0x138b50df0): STLReader error reading file:
/Users/Desktop/Downloads/tissue-3.stl Premature EOF while reading end solid.

I also got the message with your stl file.
No idea why this happens?

Thx,
Chris

--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305p3973524.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

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Steve Pieper
In reply to this post by Christoph
Hi Chris -

Looks like you are trying to read your file into paraview - did you try reading the file I sent?  Can you compare your file and mine in a text editor to see if they are in the same format?

-Steve

On Wed, May 9, 2012 at 4:34 AM, Christoph <[hidden email]> wrote:
Hey Steve,

thx I tried it too, but I still get the same error message:
ERROR: In /Source/ParaView/release/ParaView/VTK/IO/vtkSTLReader.cxx, line
446
vtkSTLReader (0x138b50df0): STLReader error reading file:
/Users/Desktop/Downloads/tissue-3.stl Premature EOF while reading end solid.

I also got the message with your stl file.
No idea why this happens?

Thx,
Chris

--
View this message in context: http://slicer-users.65878.n3.nabble.com/How-to-convert-nii-files-to-stl-files-tp3968305p3973524.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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: How to convert nii files to stl files?

Christoph
Hi Steve,

yes it looks the same. I think I uploaded now my stl file too, but I can not see it in the message anyway I hope so. I also got the same error message when I opened your file.
Anyway I still can open it with this error message. I think that´s okay.

Thx,
Chris