<HTML>
<HEAD>
<TITLE>Re: [Insight-users] Help ImageReadWrite program</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana"><SPAN STYLE='font-size:12.0px'>Hi Gavin<BR>
<BR>
Thank you, I use the program &nbsp;</SPAN></FONT><SPAN STYLE='font-size:12.0px'><FONT FACE="Monaco"><TT>example/IO/ImageReadWrite.cxx the image file I use is the png file and it is BrainProtonDesitySlice.png I found In the example folder. &nbsp;<BR>
<BR>
I just run <BR>
<BR>
./ImageReadWrite BrainProtonDesitySlice.png 1.png<BR>
<BR>
<BR>
I did not change anything in the program.<BR>
<BR>
</TT></FONT><FONT FACE="Verdana"><BR>
<BR>
<BR>
On 6/9/04 11:49, &quot;Gavin Baker&quot; &lt;gavinb+xtk@cs.mu.OZ.AU&gt; wrote:<BR>
<BR>
</FONT></SPAN><BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Monaco"><TT><BR>
Hello Yingli,<BR>
<BR>
On Wed, Jun 09, 2004 at 11:14:32AM -0400, yingli fan wrote:<BR>
<BR>
&gt; I try to use the example/IO?ImageReadWrite.cxx , for my understanding , the<BR>
&gt; output image should be exactly &nbsp;same with the input image,<BR>
&gt; <BR>
&gt; But the result what I got the output image is a empty image , empty means<BR>
&gt; black image, nothing.<BR>
<BR>
The image contents will be the same, as it connects the writer directly to<BR>
the reader. &nbsp;However you can use this program to convert between file<BR>
formats, simply by giving a different file extension as the second argument.<BR>
<BR>
First, what type of file did you read, and what format did you save it in?<BR>
Second, which program are you using to view the result?<BR>
<BR>
It quite possible that you are trying to display a 16-bit data file, where<BR>
the data all lives in the lower end of the spectrum. &nbsp;Many graphics programs<BR>
will not rescale the intensity, so the image may appear black even though<BR>
there is non-zero data.<BR>
<BR>
The ImageViewer application (in InsightApplications) can view all supported<BR>
formats properly, including handling anisotropic data.<BR>
<BR>
&nbsp;&nbsp;:: Gavin<BR>
<BR>
-- <BR>
Gavin Baker &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Complex Systems Group<BR>
<FONT COLOR="#0000FF"><U><a href="http://www.cs.mu.oz.au/~gavinb">http://www.cs.mu.oz.au/~gavinb</a></U></FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The University of Melbourne<BR>
_______________________________________________<BR>
Insight-users mailing list<BR>
<FONT COLOR="#0000FF"><U>Insight-users@itk.org<BR>
<a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
</U></FONT></TT></FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Monaco"><TT><BR>
</TT></FONT><FONT FACE="Verdana"><BR>
<FONT COLOR="#0000FF">*******************************************************<BR>
Yingli Fan<BR>
</FONT></FONT><FONT COLOR="#0000FF"><FONT FACE="Monaco"><TT>Laboratory for Bioimaging and Anatomical Informatics<BR>
</TT></FONT><FONT FACE="Verdana">Department of Neurobiology &amp; Anatomy<BR>
Drexel University, College of Medicine<BR>
2900 Queen Lane PA 19129<BR>
Tel: 215-9918455 Fax: 215-843-9367<BR>
Email: Yingli.Fan@drexel.edu &nbsp;&nbsp;<BR>
*******************************************************<BR>
</FONT></FONT><FONT FACE="Verdana"><BR>
</FONT></SPAN>
</BODY>
</HTML>