<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 :</span></b> Bill
Lorensen <bill.lorensen@gmail.com><br> <b><span style="font-weight: bold;">À :</span></b> Malsoaz James <jmalsoaz@yahoo.fr> <br><b><span style="font-weight: bold;">Cc :</span></b> "insight-users@itk.org" <insight-users@itk.org> <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 :</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 <<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>> wrote:<br>> Yes.<br>><br>> I also disabled Examples and Testing.<br>><br>> ________________________________<br>> De : Bill
Lorensen <<a ymailto="mailto:bill.lorensen@gmail.com" href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>> À : Malsoaz James <<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>><br>> Cc : "<a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>" <<a ymailto="mailto:insight-users@itk.org" href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>> Envoyé le : Mardi 13 Décembre 2011 17h49<br>> Objet : Re: [Insight-users] ITK v4 + IO factory classes : runtime error<br>><br>> When you build ITK, did you build it with all of the modules:<br>> ITK_BUILD_ALL_MODULES ON<br>><br>> <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>><br>><br>>
On Tue, Dec 13, 2011 at 10:42 AM, Malsoaz James <<a ymailto="mailto:jmalsoaz@yahoo.fr" href="mailto:jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>> wrote:<br>>> Hi,<br>>><br>>> I'm trying to use ITK v4. I have been able to install it successfully<br>>> (note<br>>> that the option ITK_USE_SYSTEM_GDCM doesn't work, it produce a link error<br>>> to<br>>> gdcmMSFF).<br>>> Anyway, I built it with the internal version of GDCM.<br>>><br>>> Unfortunately, when I try a reader class such as itkImageFileReader, I got<br>>> an error regarding the IO factory classes :<br>>> " Could not create IO object for file "C:/test.png"<br>>> Tried to create one of the following:<br>>> You probably failed to set a file suffix, or set the suffix to an<br>>> unsupported type."<br>>><br>>> As you can see, the list of IO object is empty. It seems ITK can't
find<br>>> them. I checked in the include dir and several IO files are available such<br>>> as itkGDCMImageIO<br>>><br>>> Can someone tell me what's wrong ?<br>>><br>>> Regarding the CMakeLists, I created and used two variables<br>>> - a ITK_INCLUDE_DIR (path to the include dir) to find the include files<br>>> - a ITK_LIBRARIES list (list of path to the libs). Since the libs are not<br>>> the same compared to ITKv3, I'm not sure which libraries to include in<br>>> this<br>>> list and in which order (if it matters), thus I listed all of them in<br>>> alphabetical order.<br>>><br>>> I have no warning/error at compilation time.<br>>><br>>> I hope someone will be able to help me.<br>>> Best<br>>> James.<br>>><br>>> _____________________________________<br>>> Powered by www.kitware.com<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>><br>><br>><br>> --<br>> Unpaid intern in BillsBasement at noware dot com<br>><br>><br><br><br><br>-- <br>Unpaid intern in BillsBasement at
noware dot com<br><br><br> </div> </div> </div></body></html>