Can not find vtkImageData::GetDirectionMatrix

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, 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’

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


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

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.