<div dir="ltr">Hi Matt,<div>I compiled using CMake, changing the tests and examples to be turned off and I have the same issue using both windows and mac.  When are the different IO types registered with the factory?  Does that happen when the libraries are compiles or is that done at run time?</div>
<div><br></div><div>Thanks,</div><div>Scott</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 8:59 PM, Matt McCormick <span dir="ltr">&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Scott,<br>
<br>
Is CMake used to configure your project?  If not, please try that.<br>
<br>
Thanks,<br>
Matt<br>
<div><div class="h5"><br>
On Thu, Oct 24, 2013 at 5:42 PM, Scott Pfeifer &lt;<a href="mailto:scottfivefour@gmail.com">scottfivefour@gmail.com</a>&gt; wrote:<br>
&gt; I believe that I am probably not registering the IO type but when I run a<br>
&gt; program that looks like this:<br>
&gt;<br>
&gt; #include &lt;itkImageFileReader.h&gt;<br>
&gt; #include &lt;metaImage.h&gt;<br>
&gt; #include &lt;iostream&gt;<br>
&gt; #include &lt;itkMetaImageIO.h&gt;<br>
&gt;<br>
&gt; using namespace std;<br>
&gt;<br>
&gt; int main()<br>
&gt; {<br>
&gt;     typedef short VoxelT;<br>
&gt;     typedef itk::Image&lt;VoxelT,4&gt; VolumeT;<br>
&gt;     typedef itk::ImageFileReader&lt;VolumeT&gt; ReaderT;<br>
&gt;<br>
&gt;     try<br>
&gt;     {<br>
&gt;         ReaderT::Pointer reader;<br>
&gt;         reader=ReaderT::New();<br>
&gt;<br>
&gt; reader-&gt;SetFileName(&quot;/ControlledInstalls/SFT-5002-1.3.0/Imaging/RIH-20080905-1053/RIH-20080905-1053.mhd&quot;);<br>
&gt;         reader-&gt;Update();<br>
&gt;     }<br>
&gt;     catch( itk::ExceptionObject &amp; err )<br>
&gt;         {<br>
&gt;         std::cerr &lt;&lt; &quot;ExceptionObject caught !&quot; &lt;&lt; std::endl;<br>
&gt;         std::cerr &lt;&lt; err &lt;&lt; std::endl;<br>
&gt;     }<br>
&gt;     catch( ... )<br>
&gt;     {<br>
&gt;         cout&lt;&lt;&quot;caught the god dam thing&quot;&lt;&lt;endl;<br>
&gt;     }<br>
&gt; }<br>
&gt;<br>
&gt; &amp;lt;b&gt;I Get This*<br>
&gt; File:<br>
&gt; c:\controlledinstalls\itk-4.2.2.0\x86-64_windows-7_vc10\itk\itkImageFileReader.hxx<br>
&gt; Line: 143<br>
&gt; Description:  Could not create IO object for file<br>
&gt; /ControlledInstalls/SFT-5002-1.3.0/Imaging/RIH-20080905-1053/RIH-20080905-1053.mhd<br>
&gt;   Tried to create one of the following:<br>
&gt;   You probably failed to set a file suffix, or<br>
&gt;     set the suffix to an unsupported type.<br>
&gt;<br>
&gt;<br>
&gt; *However* if I add reader-&gt;SetImageIO( itk::MetaImageIO::New() ); before<br>
&gt; updating everything works fine.<br>
&gt; If anyone has seen this problem before or has an Idea of how I might get<br>
&gt; everything working I would greatly appreciate it.<br>
&gt;<br>
&gt; If it helps at all what I am trying to read was created by itk 3.20.0 by<br>
&gt; reading dicom slices.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://itk-users.7.n7.nabble.com/object-factory-mechanism-for-ImageFileReader-not-working-with-mhd-tp32630.html" target="_blank">http://itk-users.7.n7.nabble.com/object-factory-mechanism-for-ImageFileReader-not-working-with-mhd-tp32630.html</a><br>

&gt; Sent from the ITK - Users mailing list archive at Nabble.com.<br>
&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div>&gt; _______________________________________________<br>
&gt; Community mailing list<br>
&gt; <a href="mailto:Community@itk.org">Community@itk.org</a><br>
&gt; <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
</blockquote></div><br></div>