# Black lines on a vtkFlyingEdges3D generated isosurface

**URL:** https://discourse.vtk.org/t/black-lines-on-a-vtkflyingedges3d-generated-isosurface/12665
**Category:** Support
**Created:** [November 9, 2023, 3:23pm UTC](https://discourse.vtk.org/t/black-lines-on-a-vtkflyingedges3d-generated-isosurface/12665 "2023-11-09T15:23:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bosingwa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bosingwa/32/7573_2.png) [@Bosingwa](https://discourse.vtk.org/u/Bosingwa)
#### Post date: [November 9, 2023, 3:23pm UTC](https://discourse.vtk.org/t/black-lines-on-a-vtkflyingedges3d-generated-isosurface/12665/1 "2023-11-09T15:23:54Z")

</div>

Does anyone know why I am seeing this weird black lines/edges when applying vtkFlyingEdges3D filter to a mask for a ROI?

 ![blackedges](https://discourse.vtk.org/uploads/default/original/2X/e/e872b26b6d2a420ac55e0428da1f360838c2ba1c.png)

When using plane cutting to produce a contour this is the result:

![Screenshot from 2023-11-09 16-22-23](https://discourse.vtk.org/uploads/default/original/2X/3/3d8ecb64b5f067b407bb72b2087a6d6c31ae024b.png)

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [November 9, 2023, 3:48pm UTC](https://discourse.vtk.org/t/black-lines-on-a-vtkflyingedges3d-generated-isosurface/12665/2 "2023-11-09T15:48:35Z")

</div>

It kinda looks like an issue with the normal vectors. Does running `vtkPolyDataNormals` on the output of flying edges 3D remove the black lines?

---

<div class="post-metadata">

### Author: ![Bosingwa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bosingwa/32/7573_2.png) [@Bosingwa](https://discourse.vtk.org/u/Bosingwa)
#### Post date: [November 9, 2023, 4:09pm UTC](https://discourse.vtk.org/t/black-lines-on-a-vtkflyingedges3d-generated-isosurface/12665/3 "2023-11-09T16:09:58Z")

</div>

It seems to solve it looking at the volume rendering:

 ![Screenshot from 2023-11-09 17-01-27](https://discourse.vtk.org/uploads/default/original/2X/2/22656b8d493ba7c81c729eb66baa7c83d000e552.png)

But when using vtkPlaneCutter in two diferent orientations the problem seems to remain:

 ![Screenshot from 2023-11-09 17-03-40](https://discourse.vtk.org/uploads/default/original/2X/2/2a4e954d299ac9f657fe00acdc6842834fb64d71.jpeg)

---

<div class="post-metadata">

### Author: ![Bosingwa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/bosingwa/32/7573_2.png) [@Bosingwa](https://discourse.vtk.org/u/Bosingwa)
#### Post date: [November 9, 2023, 4:19pm UTC](https://discourse.vtk.org/t/black-lines-on-a-vtkflyingedges3d-generated-isosurface/12665/4 "2023-11-09T16:19:02Z")

</div>

[Solved it]

I had to disable shading with:

```auto
vtkActor->GetProperty()->LightingOff();

```

Thanks for your help @jaswantp
