[Insight-users] Meta and raw Images are displayed reversally
Fucang Jia
jiafucang@hotmail.com
Wed, 11 Dec 2002 11:10:42 +0800
Hi, everyone,
I use MetaImageImporter to produce a .mhd file associated with original raw
format file, then use MetaImageViewer, MetaImageColorViewer,
ImageRegistration, MutualInformationEuler2DRegistration,RawImageReaderViewer
to view it, but the image is reverally displayed, that is to say, the upper
becomes the nether, the nether becomes the upper, it seems that the file
pointer reads a Windows BMP file (begins from the last line). This case not
only happens on Windows, but also on Linux.
The .mhd(a) images can be opened right by ImageRegistration2D,
RegionGrowingSegmentation2D, Curves2DExtractor, GaussianFilter2D.
I use "RawImageReadWritePNG fixed.raw 200 300 1 fixed_new", the
fixed_new000.png is reversal.
If I write a header.txt like this:
P5
200 300
255
and use "cat header.txt fixed.raw > fixed.pgm", the fixed.pgm can be display
normally by other image display software.
A .mhd file is as follows:
NDims = 2
DimSize = 200 300
ElementSpacing = 1 1
Position = 0 0
ElementByteOrderMSB = False
ElementType = MET_UCHAR
ElementDataFile = fixed.raw
Can anyone point out why it is the case?
Thank you very much!
Fucang
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus