# I have a coordinate transformation matrix, but it seems not right when i apply it to the coordinate model in the transform module

**URL:** <https://discourse.slicer.org/t/i-have-a-coordinate-transformation-matrix-but-it-seems-not-right-when-i-apply-it-to-the-coordinate-model-in-the-transform-module/17963>\
**Category:** Support\
**Created:** [June 5, 2021, 9:38am UTC](https://discourse.slicer.org/t/i-have-a-coordinate-transformation-matrix-but-it-seems-not-right-when-i-apply-it-to-the-coordinate-model-in-the-transform-module/17963 "2021-06-05T09:38:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yulaomao](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/yulaomao/32/78556_2.png) [@yulaomao](https://discourse.slicer.org/u/yulaomao)\
**Post date:** [June 5, 2021, 9:38am UTC](https://discourse.slicer.org/t/i-have-a-coordinate-transformation-matrix-but-it-seems-not-right-when-i-apply-it-to-the-coordinate-model-in-the-transform-module/17963/1 "2021-06-05T09:38:34Z")

</div>

The original coordinate system is the world coordinate system, and the new coordinate system takes the center of two balls as the Y axis. I use Python to do linear transform for a coordinate system shape model, and it works well. The Y-axis of the transformed model passes through two ball centers, as shown in the first figure. However, I filled the matrix into the transform module and did not get the expected result after applying the transform, just like the second figure.

 ![TH@7PW2AMYT8GLC02THI`K](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/4/74f1cca7e7d7356b52fca442c8fc803b4b4de3ed.png)  
 ![C6DSQA9JXR4U%$3%~FZF(P](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/8/68f6b9516ce574561626a57e5391cdd2f3428c2b.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:** [September 7, 2021, 7:03pm UTC](https://discourse.slicer.org/t/i-have-a-coordinate-transformation-matrix-but-it-seems-not-right-when-i-apply-it-to-the-coordinate-model-in-the-transform-module/17963/2 "2021-09-07T19:03:20Z")

</div>

Let us know if you still need help with this. Provide an example scene and transformation matrix.
