# Modify stl object

**URL:** <https://discourse.slicer.org/t/modify-stl-object/19618>\
**Category:** Support\
**Created:** [September 10, 2021, 9:14pm UTC](https://discourse.slicer.org/t/modify-stl-object/19618 "2021-09-10T21:14:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [September 10, 2021, 9:14pm UTC](https://discourse.slicer.org/t/modify-stl-object/19618/1 "2021-09-10T21:14:21Z")

</div>

Hello,

I am using Slicer version 4.11.20200930 on Ubuntu 20.04 OS. I have imported electrode leads as STL objects from a Matlab-based toolbox and noticed that the black/white colour coding for contacts and inter-contact gaps were missing. However, when I had changed the opacity, it seems that markings highlighting the boundaries for the contacts and gaps are present.  
Is there a way to replicate the electrode lead black/white colour coding scheme for the Slicer scene? I’ve attached a few pics to illustrate.

Thanks,

Vinny

 ![test1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d1170f1b8fabb03ba993145b66b2ccd20bef2991.jpeg)  
 ![test2-3dSlicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/f/ff26e3ddeb4a1f98fe88b8c25bd9945f32be9acc.jpeg)  
 ![test3-3dSlicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/5/05d9d19ec87cef52a8e1de75c9827d15e18b80f4.jpeg)

---

<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 10, 2021, 9:18pm UTC](https://discourse.slicer.org/t/modify-stl-object/19618/2 "2021-09-10T21:18:47Z")

</div>

STL is a simple format that doesn’t support surface coloring. It looks like there are internal polygons in the model you see when you change the transparency. Maybe the easiest is to find a way would be to export a .vtk in polydata format with surface scalars and enable them in Slicer’s Models module.

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [September 10, 2021, 9:35pm UTC](https://discourse.slicer.org/t/modify-stl-object/19618/3 "2021-09-10T21:35:04Z")

</div>

Thanks for your suggestion. The only other format option for export is PLY. However, the result is the same when viewed in the Slicer scene.

---

<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 10, 2021, 9:42pm UTC](https://discourse.slicer.org/t/modify-stl-object/19618/4 "2021-09-10T21:42:44Z")

</div>

Did you try enabling scalars for the ply file? They might be there.

Otherwise you’ll need to come up with another workaround, like adding additional models in the right place and putting them all in the same transform.

---

<div class="post-metadata">

**Author:** ![Vinny](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vinny/32/7052_2.png) [@Vinny](https://discourse.slicer.org/u/Vinny)\
**Post date:** [September 10, 2021, 9:47pm UTC](https://discourse.slicer.org/t/modify-stl-object/19618/5 "2021-09-10T21:47:38Z")

</div>

Thank you very much, this worked perfectly!

Regards,

Vinny

 ![test4-3dSlicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/0/204e79acf9396b0e3957e293e7875a241fa9b691.jpeg)
