# Rotation of a CT image around the RT isocenter, in python

**URL:** <https://discourse.slicer.org/t/rotation-of-a-ct-image-around-the-rt-isocenter-in-python/3203>\
**Category:** Support\
**Tags:** dicom, transforms, python\
**Created:** [June 16, 2018, 6:50am UTC](https://discourse.slicer.org/t/rotation-of-a-ct-image-around-the-rt-isocenter-in-python/3203 "2018-06-16T06:50:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gdenunzio](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gdenunzio](https://discourse.slicer.org/u/gdenunzio)\
**Post date:** [June 16, 2018, 2:06pm UTC](https://discourse.slicer.org/t/rotation-of-a-ct-image-around-the-rt-isocenter-in-python/3203/2 "2018-06-16T14:06:44Z")

</div>

Beginning to see something.  
I applied some transformations this way:

```
vTransform = vtk.vtkTransform()
vTransform.Translate(-0.88, 35.4, 5.65) # translate by -isocenter
vTransform.Scale(1,1,1)
vTransform.RotateX(30) # The angle is in degrees
vTransform.Translate(0.88, -35.4, -5.65)
imageNode.ApplyTransform(vTransform)

```

Now I have to interpret what I am seing, and check if this is what I am looking for…  
Any help or comment are still very very welcome…!  
Best  
Giorgio

---

_[View the full topic](https://discourse.slicer.org/t/rotation-of-a-ct-image-around-the-rt-isocenter-in-python/3203)._
