# How can matrix transform in slicer using code?

**URL:** <https://discourse.slicer.org/t/how-can-matrix-transform-in-slicer-using-code/8984>\
**Category:** Support\
**Created:** [November 1, 2019, 4:21am UTC](https://discourse.slicer.org/t/how-can-matrix-transform-in-slicer-using-code/8984 "2019-11-01T04:21:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ihsanas](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@ihsanas](https://discourse.slicer.org/u/ihsanas)\
**Post date:** [November 1, 2019, 4:21am UTC](https://discourse.slicer.org/t/how-can-matrix-transform-in-slicer-using-code/8984/1 "2019-11-01T04:21:04Z")

</div>

Hi, As a part of the project I added a button in Dicom file that adds fiducials via code and I want to transform those fiducials using matrix transformation via python code. I am new to Slicer and don’t to how to approach this situation.

---

<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:** [November 1, 2019, 4:26am UTC](https://discourse.slicer.org/t/how-can-matrix-transform-in-slicer-using-code/8984/2 "2019-11-01T04:26:04Z")

</div>

These examples show how to set transformation matrix in a transform node and how to apply a transform to a node: [https://www.slicer.org/wiki/Documentation/Nightly/Modules/Transforms#Examples](https://www.slicer.org/wiki/Documentation/Nightly/Modules/Transforms#Examples)
