# Can vertex colored models be imported as segmentations?

**URL:** <https://discourse.slicer.org/t/can-vertex-colored-models-be-imported-as-segmentations/23761>\
**Category:** Support\
**Tags:** segmentation\
**Created:** [June 8, 2022, 4:09am UTC](https://discourse.slicer.org/t/can-vertex-colored-models-be-imported-as-segmentations/23761 "2022-06-08T04:09:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 8, 2022, 4:09am UTC](https://discourse.slicer.org/t/can-vertex-colored-models-be-imported-as-segmentations/23761/1 "2022-06-08T04:09:54Z")

</div>

See an example of vertex colored skull from MorphoSource. [https://www.morphosource.org/concern/parent/000101191/media/000358488](https://www.morphosource.org/concern/parent/000101191/media/000358488)

These were derived from CT scans, which are also available on M/S, but the segmentations are not. Would it be possible to import this model in a way that each color is a separate segment? Right now, it is importing everything as one element.

---

<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:** [June 8, 2022, 1:20pm UTC](https://discourse.slicer.org/t/can-vertex-colored-models-be-imported-as-segmentations/23761/2 "2022-06-08T13:20:45Z")

</div>

Some coding would be required, but the mesh could be split based on vertex colors and if they are closed surfaces they could be converted back to filled regions in a volume.

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [June 8, 2022, 2:47pm UTC](https://discourse.slicer.org/t/can-vertex-colored-models-be-imported-as-segmentations/23761/3 "2022-06-08T14:47:25Z")

</div>

Inthimk you cannuse vtkPolydataConnectivityFilter for that using your color scalar as one of the arguments.  
Then do a for loop of all componnents and use a vtkthreshold, wirh the geometry filter at the end.of the pipeline

Hope it helps
