<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><span>Same problem with testing enabled.</span></div><div><br><span></span></div><div><span>I found a solution by using the CMake directives as in the ITK examples:</span></div><div><span>FIND_PACKAGE(ITK REQUIRED)</span></div><div><span>include ( ${ITK_USE_FILE} )</span></div><div><br><span></span></div><div><span>I found strange that ITK_USE_FILE was set to a file in the src directory (and not in the bin directory). But it seems to work.</span></div><div><br><span></span></div><div><span>Best.<br></span></div><div><br></div>  <div style="font-family: Courier New, courier, monaco, monospace, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">De&nbsp;:</span></b> Bill
 Lorensen &lt;bill.lorensen@gmail.com&gt;<br> <b><span style="font-weight: bold;">À&nbsp;:</span></b> Malsoaz James &lt;jmalsoaz@yahoo.fr&gt; <br><b><span style="font-weight: bold;">Cc&nbsp;:</span></b> "insight-users@itk.org" &lt;insight-users@itk.org&gt; <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Mardi 13 Décembre 2011 19h58<br> <b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: Re : [Insight-users] ITK v4 + IO factory classes : runtime error<br> </font> <br>There may be a side-effect if you disable testing. Can you try<br>enabling it? You can leave examples off.<br><br>If this resolves it, then it is certainly a bug.<br><br><br>On Tue, Dec 13, 2011 at 1:44 PM, Malsoaz James &lt;<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>&gt; wrote:<br>&gt; Yes.<br>&gt;<br>&gt; I also disabled Examples and Testing.<br>&gt;<br>&gt; ________________________________<br>&gt; De&nbsp;: Bill
 Lorensen &lt;<a ymailto="mailto:bill.lorensen@gmail.com" href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;<br>&gt; À&nbsp;: Malsoaz James &lt;<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>&gt;<br>&gt; Cc&nbsp;: "<a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>" &lt;<a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>&gt;<br>&gt; Envoyé le : Mardi 13 Décembre 2011 17h49<br>&gt; Objet&nbsp;: Re: [Insight-users] ITK v4 + IO factory classes : runtime error<br>&gt;<br>&gt; When you build ITK, did you build it with all of the modules:<br>&gt; ITK_BUILD_ALL_MODULES ON<br>&gt;<br>&gt; <a href="http://www.vtk.org/Wiki/ITK_Release_4/Modularization/Configure_and_build_ITK" target="_blank">http://www.vtk.org/Wiki/ITK_Release_4/Modularization/Configure_and_build_ITK</a><br>&gt;<br>&gt;<br>&gt;
 On Tue, Dec 13, 2011 at 10:42 AM, Malsoaz James &lt;<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>&gt; wrote:<br>&gt;&gt; Hi,<br>&gt;&gt;<br>&gt;&gt; I'm trying to use ITK v4. I have been able to install it successfully<br>&gt;&gt; (note<br>&gt;&gt; that the option ITK_USE_SYSTEM_GDCM doesn't work, it produce a link error<br>&gt;&gt; to<br>&gt;&gt; gdcmMSFF).<br>&gt;&gt; Anyway, I built it with the internal version of GDCM.<br>&gt;&gt;<br>&gt;&gt; Unfortunately, when I try a reader class such as itkImageFileReader, I got<br>&gt;&gt; an error regarding the IO factory classes :<br>&gt;&gt; " Could not create IO object for file "C:/test.png"<br>&gt;&gt; &nbsp; Tried to create one of the following:<br>&gt;&gt; &nbsp; You probably failed to set a file suffix, or set the suffix to an<br>&gt;&gt; unsupported type."<br>&gt;&gt;<br>&gt;&gt; As you can see, the list of IO object is empty. It seems ITK can't
 find<br>&gt;&gt; them. I checked in the include dir and several IO files are available such<br>&gt;&gt; as itkGDCMImageIO<br>&gt;&gt;<br>&gt;&gt; Can someone tell me what's wrong ?<br>&gt;&gt;<br>&gt;&gt; Regarding the CMakeLists, I created and used two variables<br>&gt;&gt; - a ITK_INCLUDE_DIR (path to the include dir) to find the include files<br>&gt;&gt; - a ITK_LIBRARIES list (list of path to the libs). Since the libs are not<br>&gt;&gt; the same compared to ITKv3, I'm not sure which libraries to include in<br>&gt;&gt; this<br>&gt;&gt; list and in which order (if it matters), thus I listed all of them in<br>&gt;&gt; alphabetical order.<br>&gt;&gt;<br>&gt;&gt; I have no warning/error at compilation time.<br>&gt;&gt;<br>&gt;&gt; I hope someone will be able to help me.<br>&gt;&gt; Best<br>&gt;&gt; James.<br>&gt;&gt;<br>&gt;&gt; _____________________________________<br>&gt;&gt; Powered by www.kitware.com<br>&gt;&gt;<br>&gt;&gt; Visit other Kitware
 open-source projects at<br>&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;&gt;<br>&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>&gt;&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>&gt;&gt;<br>&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>&gt;&gt;<br>&gt;&gt; Follow this link to subscribe/unsubscribe:<br>&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Unpaid intern in BillsBasement at noware dot com<br>&gt;<br>&gt;<br><br><br><br>-- <br>Unpaid intern in BillsBasement at
 noware dot com<br><br><br> </div> </div>  </div></body></html>