# vtkFlyingEdges2D generates scaled contours

**URL:** https://discourse.vtk.org/t/vtkflyingedges2d-generates-scaled-contours/8766
**Category:** Support
**Created:** [June 21, 2022, 3:23am UTC](https://discourse.vtk.org/t/vtkflyingedges2d-generates-scaled-contours/8766 "2022-06-21T03:23:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![xxyyy159](https://discourse.vtk.org/user_avatar/discourse.vtk.org/xxyyy159/32/4528_2.png) [@xxyyy159](https://discourse.vtk.org/u/xxyyy159)
#### Post date: [June 21, 2022, 3:23am UTC](https://discourse.vtk.org/t/vtkflyingedges2d-generates-scaled-contours/8766/1 "2022-06-21T03:23:39Z")

</div>

Hi all,  
I’m implementing vtkFlyingEdges2D to a CT image to generate a contour of the bone. But the output of vtkFlyingEdges2D has been scaled to a level of 1.2x.

I post the result below.  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/f/f5194649a422b357d450d21668a908470ef21e80.png)

bounds of contour \>\> 69.9951 69.9951 79.7139 253.098 0 1238.49  
bounds of ct image \>\> 81.6406 81.6406 0 417.184 0 1061.83

If you know how to solve this problem, please let me know.  
Thanks.

---

<div class="post-metadata">

### Author: ![xxyyy159](https://discourse.vtk.org/user_avatar/discourse.vtk.org/xxyyy159/32/4528_2.png) [@xxyyy159](https://discourse.vtk.org/u/xxyyy159)
#### Post date: [June 21, 2022, 3:58am UTC](https://discourse.vtk.org/t/vtkflyingedges2d-generates-scaled-contours/8766/2 "2022-06-21T03:58:48Z")

</div>

If I set the sliceOrientaionToXY, the contour scale is fine.  
 ![image](https://discourse.vtk.org/uploads/default/original/2X/5/5cc781acb8da0931f6cc24ddf8f5c1e246efd8d3.png)

But the others slice orientation will generate different scale contours like before.

---

<div class="post-metadata">

### Author: ![mau\_igna\_06](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mau_igna_06/32/8064_2.png) [@mau\_igna\_06](https://discourse.vtk.org/u/mau_igna_06)
#### Post date: [June 21, 2022, 9:11pm UTC](https://discourse.vtk.org/t/vtkflyingedges2d-generates-scaled-contours/8766/3 "2022-06-21T21:11:19Z")

</div>

This is probably because the image is unisotropic. I think you’ll need to apply a matrix an somekind of scaling factor.  
I’d read about how Slicer does this for threshold segment editor effect if I were you

Hope it helps

---

<div class="post-metadata">

### Author: ![xxyyy159](https://discourse.vtk.org/user_avatar/discourse.vtk.org/xxyyy159/32/4528_2.png) [@xxyyy159](https://discourse.vtk.org/u/xxyyy159)
#### Post date: [June 22, 2022, 1:23am UTC](https://discourse.vtk.org/t/vtkflyingedges2d-generates-scaled-contours/8766/4 "2022-06-22T01:23:29Z")

</div>

Thank you for your suggestion,I’ll try this later.
