# How can I show just border of Actor

**URL:** https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903
**Category:** Development
**Tags:** release-process, python, code, proposal
**Created:** [July 8, 2023, 1:33pm UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903 "2023-07-08T13:33:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [July 8, 2023, 1:33pm UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903/1 "2023-07-08T13:33:18Z")

</div>

Hi

I have a filled Actor  
Now I want to view just Border of this actor  
how can I do this?

---

<div class="post-metadata">

### Author: ![madmoonman](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/ee7513/32.png) [@madmoonman](https://discourse.vtk.org/u/madmoonman)
#### Post date: [July 9, 2023, 10:14am UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903/2 "2023-07-09T10:14:21Z")

</div>

How about vtkFeatureEdges?

---

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [July 9, 2023, 11:41am UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903/3 "2023-07-09T11:41:37Z")

</div>

hi  
thank you for your response

but I want to show border (or edge)

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [July 9, 2023, 11:56am UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903/4 "2023-07-09T11:56:54Z")

</div>

Please provide more information, including a sketch or illustrative figure. The best way to get a response from very busy developers is to make it easier for them to answer.

---

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [July 9, 2023, 12:38pm UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903/5 "2023-07-09T12:38:11Z")

</div>

hi  
ok

I have a shape like this photo

 ![l](https://discourse.vtk.org/uploads/default/original/2X/8/8e30721ab92976eb4e7df5aa55877bd5b230e73b.jpeg)

for showing this photo I have a vtkImagedata (in this code : ContourData) which the value of inside points have 255 and outsides are 0.  
so I do in this way:

```auto
vtkNew<vtkImageResliceMapper> ContoureResliceMappers;
  ContoureResliceMappers->SetInputData(ContourData);
  ContoureResliceMappers->SetSlicePlane(plane);
  ContoureResliceMappers->Update();

vtkNew<vtkLookupTable> lookupTable;
  lookupTable->SetNumberOfColors(2);
  lookupTable->SetTableValue(0, 0, 0, 0, 0); //set 0 opacity for outside values
  lookupTable->SetTableValue(1,0,1,0, 1); //set 1 opacity and green color for outside values

vtkNew<vtkImageActor> ContoureSlices;
  ContoureSlices->SetMapper(ContoureResliceMappers);
  ContoureSlices->GetProperty()->SetLookupTable(lookupTable);
  ContoureSlices->Update();

```

Now how can I show just Border(edge) of this shape  
I mean this sides which is in between of reds lines in this photo:

 ![f](https://discourse.vtk.org/uploads/default/original/2X/e/e24e148f861b8da00b2e03b4a1419da21ca34fbd.jpeg)

thanks

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [July 10, 2023, 11:26am UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903/6 "2023-07-10T11:26:48Z")

</div>

That’s better, thanks.

I’ll throw out some ideas, but I suspect that there are medical computing folks that might have better ideas.

You are basically trying to generate a contour line. So use vtkDiscreteFlyingEdges2D. If you want the entire segmented object, use vtkSurfaceNets2D.

---

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [July 15, 2023, 8:28am UTC](https://discourse.vtk.org/t/how-can-i-show-just-border-of-actor/11903/7 "2023-07-15T08:28:26Z")

</div>

Thanks for your answer  
but I think it’s can not be useful for my project.

because I want show also 3D , sagittal , coronal and oblique of that and by that way I can’t do that.

I also tried do that by vtkdelaunay3d but because I have a lot of points and this way take a lot of time .

so how can I do that ?
