<div dir="ltr">Are you building your app with CMake? If so, does, your CMakeLists.txt file contain<div><br><div><div>  FIND_PACKAGE(ITK REQUIRED)</div><div>  INCLUDE(${ITK_USE_FILE})</div></div><div><br></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, May 9, 2013 at 12:05 PM, Karl Diedrich <span dir="ltr">&lt;<a href="mailto:karl.diedrich@azeresearch.com" target="_blank">karl.diedrich@azeresearch.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I was writing NRRD images with code like this in an earlier version 3.20 of ITK<div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">typedef</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">itk</span><span style>::</span><span style="color:rgb(128,0,128)">Image</span><span style>&lt;</span><span style="color:rgb(128,0,128)">short</span><span style>,</span><span style="color:rgb(192,192,192)"> </span>3<span style>&gt;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">ImageType</span><span style>;</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,128,0)">typedef</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">itk</span><span style>::</span><span style="color:rgb(128,0,128)">ImageFileWriter</span><span style>&lt;</span><span style="color:rgb(128,0,128)">ImageType</span><span style>&gt;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">WriterType</span><span style>;</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,128,0)">typename</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">WriterType</span><span style>::</span><span style="color:rgb(128,0,128)">Pointer</span><span style="color:rgb(192,192,192)"> </span><span style>writer</span><span style="color:rgb(192,192,192)"> </span><span style>=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">WriterType</span><span style>::</span>New<span style>();</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style>writer</span><span style>-&gt;</span>SetInput<span style>(</span><span style>image</span><span style>);</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style>writer</span><span style>-&gt;</span>SetFileName<span style>(&quot;output.nrrd&quot;</span><span style>);</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,128,0)">try</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style>{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style>writer</span><span style>-&gt;</span>Update<span style>();</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style>}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,128,0)">catch</span><span style="color:rgb(192,192,192)"> </span><span style>(</span><span style="color:rgb(128,0,128)">itk</span><span style>::</span><span style="color:rgb(128,0,128)">ExceptionObject</span><span style="color:rgb(192,192,192)"> </span><span style>e</span><span style>)</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style>{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">std</span><span style>::</span>cerr<span style="color:rgb(192,192,192)"> </span><span style>&lt;&lt;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">&quot;Error writing file &quot;</span><span style="color:rgb(192,192,192)"> </span><span style>&lt;&lt;</span><span style="color:rgb(192,192,192)"> &quot;output.nrrd&quot; </span><span style>&lt;&lt;</span><span style="color:rgb(192,192,192)"> </span><span style>e</span><span style="color:rgb(192,192,192)"> </span><span style>&lt;&lt;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span><span style>::</span>endl<span style>;</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style>}</span></pre><div><br></div><div>And in ITK 4.3.1 I get the error </div><div><br></div>
<div><div>Error writing file output.nrrd</div><div>itk::ExceptionObject (0x7fff106e2d00)</div><div>Location: &quot;void itk::ImageFileWriter&lt;TInputImage&gt;::Write() [with TInputImage = itk::Image&lt;short int, 2u&gt;]&quot; </div>

<div>File: ../../linux/include/ITK-4.3/itkImageFileWriter.hxx</div><div>Line: 152</div><div>Description:  Could not create IO object for file centerdot.nrrd</div><div>  Tried to create one of the following:</div><div>  You probably failed to set a file suffix, or</div>

<div>    set the suffix to an unsupported type.</div></div><div><br></div><div>I also tried writing a 2D image with the filename output.png and output.jpg but got the same error.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>
Karl </div><div><br></div><div><br></div>-- <br><font color="#888888">Karl Diedrich, Ph.D.<br>Principal Engineer<br>----------------------------------------<br>
AZE Research and Development<br>1 Broadway, 14th floor<br>Cambridge, MA 02142<br>Tel: <a value="+16174751502">+1 (617) 475-1502</a><br><a href="http://www.azeofamerica.com/" target="_blank">http://www.azeresearch.com/</a></font>
</font></span></div></div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>