Problem with recent vtkMetaImageReader bug fix
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The recent bug fix http://public.kitware.com/cgi-bin/viewcvs.cgi/IO/vtkMetaImageReader.cxx?r1=1.17&r2=1.18 is inconsistent with what vtkMetaImageWriter produces.
After the bug fix, if you read an image, write it with vtkMetaImageWriter, read it back with vtkMetaImageReader, you'll see the Y axis flipped.
Example: yake a foo.png and execute the following
reader = vtk.vtkPNGReader() reader.SetFileName('foo.png') reader.Update()
writer = vtk.vtkMetaImageWriter() writer.SetInput(reader.GetOutput()) writer.SetFileName('foo.mhd') writer.Write()
reader2 = vtk.vtkMetaImageReader() reader2.SetFileName('foo.mhd') reader2.Update()
writer2 = vtk.vtkPNGWriter() writer2.SetInput(reader2.GetOutput()) writer2.SetFileName('foo2.png') writer2.Write()
and you'll see that foo2.png is flipped with respect to foo.png
Guys, easy with flipping, all my patients felt suddenly upside down...
Ciao
Luca