# How Can Rotate vtkimageData?

**URL:** <https://discourse.vtk.org/t/how-can-rotate-vtkimagedata/10760>\
**Category:** Development\
**Created:** [February 22, 2023, 2:05pm UTC](https://discourse.vtk.org/t/how-can-rotate-vtkimagedata/10760 "2023-02-22T14:05:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.h.shanazary](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/aeb1de/32.png) [@m.h.shanazary](https://discourse.vtk.org/u/m.h.shanazary)\
**Post date:** [February 22, 2023, 2:05pm UTC](https://discourse.vtk.org/t/how-can-rotate-vtkimagedata/10760/1 "2023-02-22T14:05:52Z")

</div>

Hi

I Try To Rotate Image Data In First Try I rotate Image Actor In Image Viewer2 But in try to get position Of Pixel with cell picker failed position so Wrong And Value Of Pixel its wrong.

I try to rotate image data with example  
[https://kitware.github.io/vtk-examples/site/Cxx/Images/ImageRotate/](https://kitware.github.io/vtk-examples/site/Cxx/Images/ImageRotate/)  
But dimensions of image data its different in my try I change spacing origin and exent to try change dimension but in show image data its wrong and a lot of margin I try to change exent to remove margin and show full image data but for different image margin its change.

---

<div class="post-metadata">

**Author:** ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)\
**Post date:** [February 22, 2023, 2:46pm UTC](https://discourse.vtk.org/t/how-can-rotate-vtkimagedata/10760/2 "2023-02-22T14:46:44Z")

</div>

Hi Mr.shanazary  
you can search about this on internet :))
