# Can the OrientationMarkerType be customized?

**URL:** <https://discourse.slicer.org/t/can-the-orientationmarkertype-be-customized/22063>\
**Category:** Development\
**Tags:** python\
**Created:** [February 19, 2022, 9:20am UTC](https://discourse.slicer.org/t/can-the-orientationmarkertype-be-customized/22063 "2022-02-19T09:20:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jumbojing](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jumbojing/32/10811_2.png) [@jumbojing](https://discourse.slicer.org/u/jumbojing)\
**Post date:** [February 19, 2022, 9:20am UTC](https://discourse.slicer.org/t/can-the-orientationmarkertype-be-customized/22063/1 "2022-02-19T09:20:41Z")

</div>

Can the OrientationMarkerType be customized?  
我想用椎体代替 **human** , 我该怎么做呢?

> I want to replace the OrientationMarkerType **human** with a vertebral body, how can I do that?

@lassoan@Juicy@jamesobutler @jcfr @pieper

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/5/a54aab8f1de1e2f229a51ecc6687aa8871fc9c66.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 19, 2022, 2:22pm UTC](https://discourse.slicer.org/t/can-the-orientationmarkertype-be-customized/22063/2 "2022-02-19T14:22:54Z")

</div>

Yes, sure, you can use any model as orientation marker. See for example how it is done in SlicerHeart:

> <https://github.com/SlicerHeart/SlicerHeart/blob/42b75a6184b31d785eaef61ff695f4de99834356/ValveAnnulusAnalysis/HeartValveLib/HeartValves.py#L69-L77>

---

<div class="post-metadata">

**Author:** ![jumbojing](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jumbojing/32/10811_2.png) [@jumbojing](https://discourse.slicer.org/u/jumbojing)\
**Post date:** [February 20, 2022, 4:22am UTC](https://discourse.slicer.org/t/can-the-orientationmarkertype-be-customized/22063/3 "2022-02-20T04:22:48Z")

</div>

太好了, 可是,老师,我做的model导出后,再次导入就变成了黄色,怎么做带不同的颜色的vtp模型呢?就像这样:

> Great, but, teacher, after the model I made is exported, it turns yellow when I import it again. How can I make a vtp model with different colors? Like this:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/5/a54aab8f1de1e2f229a51ecc6687aa8871fc9c66.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 20, 2022, 4:54am UTC](https://discourse.slicer.org/t/can-the-orientationmarkertype-be-customized/22063/4 "2022-02-20T04:54:47Z")

</div>

You can use VTK filters for this: add an RGB color vector to each model node (using vtkArrayCalculator) and then merge them into a single polydata (using vtkAppendPolyData).

---

<div class="post-metadata">

**Author:** ![jumbojing](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jumbojing/32/10811_2.png) [@jumbojing](https://discourse.slicer.org/u/jumbojing)\
**Post date:** [February 20, 2022, 2:25pm UTC](https://discourse.slicer.org/t/can-the-orientationmarkertype-be-customized/22063/5 "2022-02-20T14:25:21Z")

</div>

> [@lassoan](#):
>
> vtkArrayCalculator

这个…太难了吧, 有现成的例子吗?

> This… is too difficult, is there a ready-made example?
