# Bug: vtkMetaImageWriter not writing vtkMetaImage Direction Matrix to the TransformMatrix line

**URL:** https://discourse.vtk.org/t/bug-vtkmetaimagewriter-not-writing-vtkmetaimage-direction-matrix-to-the-transformmatrix-line/6405
**Category:** Development
**Tags:** file-formats
**Created:** [August 17, 2021, 6:43pm UTC](https://discourse.vtk.org/t/bug-vtkmetaimagewriter-not-writing-vtkmetaimage-direction-matrix-to-the-transformmatrix-line/6405 "2021-08-17T18:43:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MJJ](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/b487fb/32.png) [@MJJ](https://discourse.vtk.org/u/MJJ)
#### Post date: [August 17, 2021, 6:43pm UTC](https://discourse.vtk.org/t/bug-vtkmetaimagewriter-not-writing-vtkmetaimage-direction-matrix-to-the-transformmatrix-line/6405/1 "2021-08-17T18:43:39Z")

</div>

Also, a related bug: the `vtkMetaImageReader` does not read the `TransformMatrix` line.

For example, see the sample .mhd file attached. It has a non identity `TransformMatrix`.  
_**(well… nvm as a new user i cant upload attachements…)**_

using the `vtkMetaImageReader` to read the image, you’ll get an identity matrix when calling `.GetDirectionMatrix()` instead of the `TransformMatrix` written in the file.

When using `vtkMetaImageWriter`, the writer will not write the `Direction Matrix` to the `TransformMatrix` line.
