<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C61B78.AF43A7F0">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi all,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have a collection of potentially many images that I&#8217;m
trying to write out as files.<span style='mso-spacerun:yes'>&nbsp; </span>Most
of these images are small, and some are only 1 pixel in size. <span
style='mso-spacerun:yes'>&nbsp;</span>I seem to have a problem with any images
that are 1x1, 1x2, or 2x1 in size.<span style='mso-spacerun:yes'>&nbsp;
</span>Images that are <span class=GramE>2x2</span> in size or bigger don&#8217;t
seem to have a problem.<span style='mso-spacerun:yes'>&nbsp; </span>I get an
error like this:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=SpellE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>itk::ERROR</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>: <span
class=SpellE><span class=GramE>PNGImageIO</span></span><span class=GramE>(</span>064DD690):
PNG Writer can only write 2-dimensional images. You are requesting to write an
image of dimension = 0 with filename C:\images\1x2output.png<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>My code is straightforward....<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>itk::ImageFileReader</span></font></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>&lt;Grayscale8ImageType&gt;:<span
class=GramE>:Pointer</span> r = <span class=SpellE>itk::ImageFileReader</span>&lt;Grayscale8ImageType&gt;::New();<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=SpellE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>itk::ImageFileWriter</span></font></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>&lt;Grayscale8ImageType&gt;:<span
class=GramE>:Pointer</span> w = <span class=SpellE>itk::ImageFileWriter</span>&lt;Grayscale8ImageType&gt;::New();<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=GramE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>r</span></font></span><font size=1 face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New"'>-&gt;<span class=SpellE>SetFileName</span>(&quot;C:\\images\\1x2black.tif&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=GramE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>w</span></font></span><font size=1 face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New"'>-&gt;<span class=SpellE>SetFileName</span>(&quot;C:\\images\\1x2output.png&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
class=GramE><font size=1 face="Courier New"><span style='font-size:8.0pt;
font-family:"Courier New"'>w</span></font></span><font size=1 face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New"'>-&gt;<span class=SpellE>SetInput</span>(r-&gt;<span
class=SpellE>GetOutput</span>());<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=1 face="Courier New"><span
style='font-size:8.0pt;font-family:"Courier New"'>w</span></font></span><font
size=1 face="Courier New"><span style='font-size:8.0pt;font-family:"Courier New"'>-&gt;Update();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>A similar error occurs for other output types that I tried. <span
style='mso-spacerun:yes'>&nbsp;</span>Is there anything I can do to write out a
small file like this?<span style='mso-spacerun:yes'>&nbsp; </span>Yeah, I know
there&#8217;s not much to be gained by looking at a 1-by-1 image, but&#8230;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I&#8217;m currently using ITK 2.2 on Windows, but am not
opposed to updating to a newer version.<span style='mso-spacerun:yes'>&nbsp;
</span>My test images are linked below.<span style='mso-spacerun:yes'>&nbsp;
</span>I don&#8217;t have my own publicly accessible web server, and all my <span
class=SpellE>tif</span> files seem to get converted to <span class=SpellE>png</span>
at the free image hosting sites, but <span class=SpellE>png</span> source files
seem to give the same error.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><a href="http://xs64.xs.to/pics/06033/1x1black.png">http://xs64.xs.to/pics/06033/1x1black.png</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><a href="http://xs64.xs.to/pics/06033/1x2black.png">http://xs64.xs.to/pics/06033/1x2black.png</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>thanks</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Chris<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>