# itk::image to itk::vector

**URL:** https://discourse.itk.org/t/itk-image-to-itk-vector/2335
**Category:** Beginner Questions
**Created:** [October 19, 2019, 1:51am UTC](https://discourse.itk.org/t/itk-image-to-itk-vector/2335 "2019-10-19T01:51:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kdavis63](https://discourse.itk.org/letter_avatar_proxy/v4/letter/k/7ab992/32.png) [@kdavis63](https://discourse.itk.org/u/kdavis63)
#### Post date: [October 19, 2019, 1:51am UTC](https://discourse.itk.org/t/itk-image-to-itk-vector/2335/1 "2019-10-19T01:51:19Z")

</div>

Sorry if I am missing something in the documentation, but after two days I feel completely at a loss. I am trying to do a transform on an itk::image. Specifically a FixedCenterOfRotationAffineTransform, basically a rotation and translation. I know both the angle and the amount I need to translate. Am I missing something basic? I cant seem to get the vector from an image. Even if you could point out an example to base it on, the example al seem to do something more complex than just rotating an image.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [October 21, 2019, 3:55pm UTC](https://discourse.itk.org/t/itk-image-to-itk-vector/2335/2 "2019-10-21T15:55:56Z")

</div>

There are two ways to do rigid transform:

1. change metadata to reorient the image ([SetDirection()](https://itk.org/Doxygen/html/classitk_1_1ImageBase.html) and perhaps `SetOrigin()` methods)
2. change the image content, accomplished by resample filter. In this [example](https://itk.org/ITKExamples/src/Filtering/ImageGrid/ResampleAnImage/Documentation.html), the transform is scaling only, so you should change that to affine and use some of [the rotate methods to construct it](https://itk.org/Doxygen/html/classitk_1_1AffineTransform.html#a8e3e6de25f5d32a176b985f1c7c200ab).
