# How to convert to .stl from .nii

**URL:** https://discourse.slicer.org/t/how-to-convert-to-stl-from-nii/4088
**Category:** Support
**Created:** [September 12, 2018, 5:11pm UTC](https://discourse.slicer.org/t/how-to-convert-to-stl-from-nii/4088 "2018-09-12T17:11:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![xwang2](https://avatars.discourse-cdn.com/v4/letter/x/a9a28c/32.png) [@xwang2](https://discourse.slicer.org/u/xwang2)
#### Post date: [September 12, 2018, 5:11pm UTC](https://discourse.slicer.org/t/how-to-convert-to-stl-from-nii/4088/1 "2018-09-12T17:11:31Z")

</div>

Hi everyone,

I want to convert this .nii file directly into .stl file which can be used by Netgen, how can I do it without any segmentation in 3DSlicer? Because this file .nii was already a segmentation from itksnap.

The link of this file .nii:  
[https://drive.google.com/open?id=1IQ7\_5ha\_MisHcfpndhLi\_KlV33S1k0pp](https://drive.google.com/open?id=1IQ7_5ha_MisHcfpndhLi_KlV33S1k0pp)

Thank you.

Xiaoyu.

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [September 17, 2018, 2:27pm UTC](https://discourse.slicer.org/t/how-to-convert-to-stl-from-nii/4088/2 "2018-09-17T14:27:46Z")

</div>

Yes, this file can easily be converted to stl. In the Add Data dialog, show the options and select the LabelMap. Then in the [Segmentations](https://www.slicer.org/wiki/Documentation/Nightly/Modules/Segmentations) module, create a segmentation and then use the Import option at the bottom to import the labelmap as a segmentation. Then click the Create button next to Close Surface representation. Then you can use the Export section to save as STL…

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [September 17, 2018, 7:30pm UTC](https://discourse.slicer.org/t/how-to-convert-to-stl-from-nii/4088/3 "2018-09-17T19:30:04Z")

</div>

Note that you can save a few steps (and have a few useful additional options) if you use “Export to files” section (instead of clicking on Create button, exporting to model, and using scene Save).

The example file contains an invalid coordinate system (determinant of voxel-\>physical transform is negative, i.e., left-handed coordinate system), therefore the generated STL file will be turned inside out. If that is a problem for you, either fix orientation of the input volume or reverse the model using Surface toolbox module’s auto-orient normals feature.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [September 17, 2018, 10:56pm UTC](https://discourse.slicer.org/t/how-to-convert-to-stl-from-nii/4088/4 "2018-09-17T22:56:55Z")

</div>

3 posts were split to a new topic: [How to handle images defined in left-handed coordinate system](https://discourse.slicer.org/t/how-to-handle-images-defined-in-left-handed-coordinate-system/4133)
