<div>Hi all,</div>  <div>&nbsp;</div>  <div>I am having&nbsp;problem in reading/writing a metaheader file (.mhd&nbsp;+ .raw). The raw file is an original visible human slice image in RGB.&nbsp; I wrote the metaheader file myself (see below), and wanted to read .raw file&nbsp;thru it.&nbsp; I tested with a PNG file for the same slice, so that I can easily compare the result.&nbsp; What I&nbsp;want is to confirm&nbsp;compatiblity&nbsp;between&nbsp;image&nbsp;file&nbsp;types (.mhd to&nbsp;.mhd,&nbsp;.mhd to&nbsp;.png,&nbsp;and vice versa).</div>  <div>&nbsp;</div>  <div>Here is what happened:</div>  <div>- .png to .png :&nbsp;worked just fine - it produced the same RGB color image.</div>  <div>- .mhd to .png : produced strange result - there are nine(3x3) B/W image blocks in the same size of the image.</div>  <div>&nbsp;</div>  <div>Q1: Anything wrong with my code?&nbsp;My&nbsp;meta file and code are shown below.</div>  <div>Q2: Is there any free image viewer for both 2D
 and&nbsp;3D .mhd file? </div>  <div>Or recommentations for each type separately?</div>  <div>&nbsp;</div>  <div>Thanks in advance,</div>  <div>Young.</div>  <div>&nbsp;</div>  <div>&lt; Meta file &gt;</div>  <div>ObjectType = Image<BR>NDims = 2<BR>BinaryData = True<BR>BinaryDataByteOrderMSB = False<BR>CompressedData = False<BR>TransformMatrix = 1 0 0 1<BR>Offset = 0 0<BR>CenterOfRotation = 0 0<BR>ElementSpacing = 1 1<BR>DimSize = 2048 1216<BR>AnatomicalOrientation = ??<BR>ElementNumberOfChannels = 3<BR>ElementType = MET_UCHAR<BR>ElementDataFile = a_vm1150.raw</div>  <div>&nbsp;</div>  <div>&lt; Code for Reading-Writing &gt;</div><FONT size=2>  <div></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::RGBPixel&lt; </FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2> &gt; RGBPixelType;</div>  <div></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::Image&lt; RGBPixelType, 2 &gt;
 RGBImageType;</div>  <div></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::ImageFileReader&lt; RGBImageType &gt; RGBReaderType;</div>  <div></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::ImageFileWriter&lt; RGBImageType &gt; RGBWriterType;</div></FONT>  <div>&nbsp;</div><FONT size=2>  <div>RGBImageType::Pointer image = RGBImageType::New();</div>  <div>RGBReaderType::Pointer reader = RGBReaderType::New();</div>  <div>RGBWriterType::Pointer writer = RGBWriterType::New();</div>  <div>reader-&gt;SetFileName(</FONT><FONT color=#800000 size=2>"C:\\a_vm1150.mhd"</FONT><FONT size=2>);</div>  <div>writer-&gt;SetFileName(</FONT><FONT color=#800000 size=2>"C:\\a_vm1150_out.png"</FONT><FONT size=2>);</div></FONT>  <div>&nbsp;</div><FONT size=2>  <div>writer-&gt;SetInput(reader-&gt;GetOutput());</div>  <div>writer-&gt;Update();</div>  <div>&nbsp;</div>  <div>--- End of message ---</div>  <div>&nbsp;</div>  <div>&nbsp;</div></FONT><p>&#32;
      <hr size=1><a href="http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50">Pinpoint customers </a>who are looking for what you sell.