# About contour domains

**URL:** <https://shapeworks.discourse.group/t/about-contour-domains/84>\
**Category:** Uncategorized\
**Created:** [September 7, 2022, 2:37am UTC](https://shapeworks.discourse.group/t/about-contour-domains/84 "2022-09-07T02:37:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xbyzju](https://avatars.discourse-cdn.com/v4/letter/x/a5b964/32.png) [@xbyzju](https://shapeworks.discourse.group/u/xbyzju)\
**Post date:** [September 7, 2022, 2:37am UTC](https://shapeworks.discourse.group/t/about-contour-domains/84/1 "2022-09-07T02:37:51Z")

</div>

Hello!  
Does shapeworks support shape model for 2D shape analysis (Contour based cases)? In the ‘Use cases’ it seems to be OK to analysis shape model for contour domains. But when i import 2D data, Errors jumped out suggesting that the data must be 3D.

---

<div class="post-metadata">

**Author:** ![shireen](https://yyz2.discourse-cdn.com/free1/user_avatar/shapeworks.discourse.group/shireen/32/9_2.png) [@shireen](https://shapeworks.discourse.group/u/shireen)\
**Post date:** [September 7, 2022, 3:31pm UTC](https://shapeworks.discourse.group/t/about-contour-domains/84/2 "2022-09-07T15:31:30Z")

</div>

Yes, ShapeWorks supports contour data, what file format are you using? @amorris

---

<div class="post-metadata">

**Author:** ![amorris](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@amorris](https://shapeworks.discourse.group/u/amorris)\
**Post date:** [September 7, 2022, 5:37pm UTC](https://shapeworks.discourse.group/t/about-contour-domains/84/3 "2022-09-07T17:37:53Z")

</div>

The types of contours we are currently supporting are as a series of points/lines in VTK files.

Are you trying to use a 2D image segmentation? If so, we can investigate a way to convert it.

---

<div class="post-metadata">

**Author:** ![xbyzju](https://avatars.discourse-cdn.com/v4/letter/x/a5b964/32.png) [@xbyzju](https://shapeworks.discourse.group/u/xbyzju)\
**Post date:** [September 7, 2022, 10:24pm UTC](https://shapeworks.discourse.group/t/about-contour-domains/84/4 "2022-09-07T22:24:15Z")

</div>

Yes，we tried to use 2D shape image segmentation，which was acquired from  
3Dslicer. The file format is nrrd and the image is a 2D plane rather than some lines. Is there any tools to convert it？Thank you！

---- Replied Message ----

> From | [Alan Morris via ShapeWorks](mailto:notifications@shapeworks.discoursemail.com)[notifications@shapeworks.discoursemail.com](mailto:notifications@shapeworks.discoursemail.com) |
> 
> - | - |  
> Date | 09/08/2022 01:52 |  
> To | [xbyzju@126.com](mailto:xbyzju@126.com)[xbyzju@126.com](mailto:xbyzju@126.com) |  
> Cc | |  
> Subject | [ShapeWorks] About contour domains |

> ![](https://global.discourse-cdn.com/free1/uploads/shapeworks/original/1X/cd5bd4b71fbe76e51aa3eb293d04a7cdd25acb62.png "amorris") | [amorris](https://shapeworks.discourse.group/u/amorris)  
> September 7 |
> 
> - | - |

The types of contours we are currently supporting are as a series of points/lines in VTK files.

Are you trying to use a 2D image segmentation? If so, we can investigate a way to convert it.

---

<div class="post-metadata">

**Author:** ![xbyzju](https://avatars.discourse-cdn.com/v4/letter/x/a5b964/32.png) [@xbyzju](https://shapeworks.discourse.group/u/xbyzju)\
**Post date:** [September 7, 2022, 10:27pm UTC](https://shapeworks.discourse.group/t/about-contour-domains/84/5 "2022-09-07T22:27:17Z")

</div>

The file format is nrrd，a 2D shape segmentation from 3Dslicer.

---- Replied Message ----

> From | [Shireen Elhabian via ShapeWorks](mailto:notifications@shapeworks.discoursemail.com)[notifications@shapeworks.discoursemail.com](mailto:notifications@shapeworks.discoursemail.com) |
> 
> - | - |  
> Date | 09/08/2022 00:00 |  
> To | [xbyzju@126.com](mailto:xbyzju@126.com)[xbyzju@126.com](mailto:xbyzju@126.com) |  
> Cc | |  
> Subject | [ShapeWorks] About contour domains |

> | [shireen](https://shapeworks.discourse.group/u/shireen) Leader  
> September 7 |
> 
> - | - |

Yes, ShapeWorks supports contour data, what file format are you using? [@amorris](https://shapeworks.discourse.group/u/amorris)

---

<div class="post-metadata">

**Author:** ![amorris](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@amorris](https://shapeworks.discourse.group/u/amorris)\
**Post date:** [September 8, 2022, 4:11pm UTC](https://shapeworks.discourse.group/t/about-contour-domains/84/6 "2022-09-08T16:11:11Z")

</div>

I believe the vtkContourFilter can do this for 2D, but I don’t know that there is a ready-made tool to convert this at the moment.

[https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabelContours/](https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabelContours/)

---

<div class="post-metadata">

**Author:** ![xbyzju](https://avatars.discourse-cdn.com/v4/letter/x/a5b964/32.png) [@xbyzju](https://shapeworks.discourse.group/u/xbyzju)\
**Post date:** [September 8, 2022, 11:22pm UTC](https://shapeworks.discourse.group/t/about-contour-domains/84/7 "2022-09-08T23:22:35Z")

</div>

Thank you very much，I will try it.

---- Replied Message ----

> From | [Alan Morris via ShapeWorks](mailto:notifications@shapeworks.discoursemail.com)[notifications@shapeworks.discoursemail.com](mailto:notifications@shapeworks.discoursemail.com) |
> 
> - | - |  
> Date | 09/09/2022 00:24 |  
> To | [xbyzju@126.com](mailto:xbyzju@126.com)[xbyzju@126.com](mailto:xbyzju@126.com) |  
> Cc | |  
> Subject | [ShapeWorks] About contour domains |

> ![](https://global.discourse-cdn.com/free1/uploads/shapeworks/original/1X/cd5bd4b71fbe76e51aa3eb293d04a7cdd25acb62.png "amorris") | [amorris](https://shapeworks.discourse.group/u/amorris)  
> September 8 |
> 
> - | - |

I believe the vtkContourFilter can do this for 2D, but I don’t know that there is a ready-made tool to convert this at the moment.

[https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabelContours/](https://kitware.github.io/vtk-examples/site/Cxx/Visualization/LabelContours/)
