# Can not find vtkImageData::GetDirectionMatrix

**URL:** https://discourse.vtk.org/t/can-not-find-vtkimagedata-getdirectionmatrix/1087
**Category:** Support
**Created:** [June 5, 2019, 2:09pm UTC](https://discourse.vtk.org/t/can-not-find-vtkimagedata-getdirectionmatrix/1087 "2019-06-05T14:09:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mfazampour](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mfazampour/32/495_2.png) [@mfazampour](https://discourse.vtk.org/u/mfazampour)
#### Post date: [June 5, 2019, 2:09pm UTC](https://discourse.vtk.org/t/can-not-find-vtkimagedata-getdirectionmatrix/1087/1 "2019-06-05T14:09:06Z")

</div>

I want to read a .mhd file and send the data and its parameters (origin and orientation) using ROS to another node, but the compiler complains that there is no GetDirectionMatrix in vtkImageData class. It should be there based on the documents: [vtkImageData](https://vtk.org/doc/nightly/html/classvtkImageData.html#a14849687420465eedec8290c1d7f88a9), but it is not defined in the header. Is there any other function available to get the transform from image space to real world from vtkImageData?

I am using version 8.2.0 and the error is:  
`error: ‘class vtkImageData’ has no member named ‘GetDirectionMatrix’`

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/danlipsa/32/390_2.png) [@danlipsa](https://discourse.vtk.org/u/danlipsa)
#### Post date: [June 5, 2019, 2:21pm UTC](https://discourse.vtk.org/t/can-not-find-vtkimagedata-getdirectionmatrix/1087/2 "2019-06-05T14:21:14Z")

</div>

Can you copy / paste the message you are getting? What version of VTK are you using?

vtkGetObjectMacro(DirectionMatrix,vtkMatrix3x3);

is in the header (in master) which gives you the function you are looking for.

---

<div class="post-metadata">

### Author: ![mfazampour](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mfazampour/32/495_2.png) [@mfazampour](https://discourse.vtk.org/u/mfazampour)
#### Post date: [June 5, 2019, 2:52pm UTC](https://discourse.vtk.org/t/can-not-find-vtkimagedata-getdirectionmatrix/1087/3 "2019-06-05T14:52:31Z")

</div>

I have edited my post. I can see that `vtkGetObjectMacro(DirectionMatrix,vtkMatrix3x3);` exists in master but it is not available in the 8.2.0 release, unfortunately.
