Hi Marcos,<br><br>Please try using CMake with QtCreator.  Do &quot;File -&gt; Open Project...&quot; and select the top level project. CMakeLists.txt<br><br>See, e.g. <br><br>  <a href="http://doc.qt.digia.com/qtcreator-2.4/creator-project-cmake.html">http://doc.qt.digia.com/qtcreator-2.4/creator-project-cmake.html</a><br>
<br>HTH,<br>Matt<br><br><br><div class="gmail_quote">On Wed, Dec 12, 2012 at 9:29 AM, Marcos <span dir="ltr">&lt;<a href="mailto:fotosentido@gmail.com" target="_blank">fotosentido@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m not using a CmakeLists.txt. It&#39;s a existing Qt Creator project, so I&#39;m using a <a href="http://project.pro" target="_blank">project.pro</a> file, where you configure the directories with libraries and header files. The same for vtk. I was trying to use mitk, but it I think it only works with cmake files (still trying).<br>

<br>In the .pro file:<br><br>INCLUDEPATH     +=  /usr/local/include/vtk-5.10<br>LIBS            +=  -L/usr/local/lib/vtk-5.10 \<br>                    -lvtkNetCDF_cxx -lvtkVolumeRendering \<br>                    -lvtkCommon -lvtksys...<br>

<br><br>INCLUDEPATH     +=  /usr/local/include/ITK-4.2<br>LIBS            +=  -L/usr/local/lib \<br>                    -lvtkNetCDF_cxx -lvtkVolumeRendering \<br>                    -lITKVideoIO-4.2 -lITKVideoCore-4.2 -lITKReview-4.2 -lITKOptimizersv4-4.2 \<br>

                    -lITKIOTransformMatlab-4.2 -lITKIOTransformInsightLegacy-4.2 -lITKIOTransformHDF5-4.2 \<br>                    -lITKIOTransformBase-4.2 -lITKIOHDF5-4.2 -lITKIOCSV-4.2 -litkhdf5_cpp-4.2 \<br>                    -litkhdf5-4.2 -lITKWatersheds-4.2 -lITKVTK-4.2 -lITKKLMRegionGrowing-4.2 \<br>

                    -lITKIOSiemens-4.2 -lITKIOGE-4.2 -lITKIOIPL-4.2 -lITKFEM-4.2 -lITKDICOMParser-4.2 \<br>                    -lITKBioCell-4.2 -lITKBiasCorrection-4.2 -lITKPolynomials-4.2 -lITKQuadEdgeMesh-4.2 \<br>                    -lITKLabelMap-4.2 -lITKIOMesh-4.2 -lITKgiftiio-4.2 -lITKIOSpatialObjects-4.2 \<br>

                    -lITKIOXML-4.2 -lITKOptimizers-4.2 -lITKSpatialObjects-4.2 -lITKMesh-4.2 \<br>                    -lITKPath-4.2 -lITKStatistics-4.2 -litkNetlibSlatec-4.2 -lITKIOLSM-4.2 \<br>                    -lITKIOVTK-4.2 -lITKIOStimulate-4.2 -lITKIONRRD-4.2 -lITKNrrdIO-4.2 -lITKIOBMP-4.2 \<br>

                    -lITKIOBioRad-4.2 -lITKIOGDCM-4.2 -litkgdcmMSFF-4.2 -litkgdcmjpeg12-4.2 \<br>                    -litkgdcmjpeg8-4.2 -litkgdcmuuid-4.2 -litkgdcmjpeg16-4.2 -litkopenjpeg-4.2 \<br>                    -litkgdcmDICT-4.2 -litkgdcmIOD-4.2 -lITKEXPAT-4.2 -litkgdcmDSED-4.2 -litkgdcmCommon-4.2 \<br>

                    -lITKIOMeta-4.2 -lITKMetaIO-4.2 -lITKIOTIFF-4.2 -litktiff-4.2 -lITKIOGIPL-4.2 \<br>                    -lITKIOJPEG-4.2 -litkjpeg-4.2 -lITKIONIFTI-4.2 -lITKniftiio-4.2 -lITKznz-4.2 \<br>                    -lITKIOPNG-4.2 -litkpng-4.2 -litkzlib-4.2 -lITKIOImageBase-4.2 -lITKCommon-4.2 \<br>

                    -lITKVNLInstantiation-4.2 -litkvnl_algo-4.2 -litkvnl-4.2 -litkv3p_lsqr-4.2 \<br>                    -litkvcl-4.2 -litkv3p_netlib-4.2 -litksys-4.2<br><br>I think I added all libs, even those I don&#39;t need.<div class="HOEnZb">
<div class="h5"><br>
<br><div class="gmail_extra"><br><br><div class="gmail_quote">2012/12/12 Bradley Lowekamp <span dir="ltr">&lt;<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div>It sounds like ITK&#39;s imageIO factories are not being registered.</div><div><br></div>What does your cmake code look like?<div><br></div><div><br><div><div><div><div>On Dec 12, 2012, at 7:54 AM, Marcos &lt;<a href="mailto:fotosentido@gmail.com" target="_blank">fotosentido@gmail.com</a>&gt; wrote:</div>

<br></div></div><blockquote type="cite"><div><div><div><p>I&#39;m using ITK 4.2 with Qt Creator.</p><p>Trying to read several images, I always get the same:</p>

<blockquote><p>itk::ImageFileReaderException (0x1efccb0)
  Location: &quot;void itk::ImageFileReader::GenerateOutputInformation() 
[with TOutputImage = itk::Image; ConvertPixelTraits = 
itk::DefaultConvertPixelTraits]&quot; </p><p>File: /usr/local/include/ITK-4.2/itkImageFileReader.hxx
  Line: 143</p><p>Description:  <b>Could not create IO object</b> for file /home/marcos/d2.dcm</p><p>Tried to create one of the following:
  You probably failed to set a file suffix, or
      set the suffix to an unsupported type.</p>
</blockquote><p>I&#39;ve successfully readed it with </p>

<pre><code>vtkGDCMImageReader* reader = vtkGDCMImageReader::New();
reader-&gt;SetFileName(fileName);
reader-&gt;Update();
vtkImageData* imageData = reader-&gt;GetOutput();
cout &lt;&lt; &quot;imageData-&gt;GetScalarTypeAsString(): &quot; &lt;&lt; imageData-&gt;GetScalarTypeAsString() &lt;&lt; endl;
</code></pre><p>And <i>GetScalarTypeAsString()</i> returns <b>unsigned short</b>.
Anyway, I tried with unsigned long, unsigned int, double, int, short, short unsigned int, unsigned char... I got the same.</p><p>Edit: other tip, with gdcminfo I get UINT16 as ScalarType.<br></p><p>This is the code:</p>

<pre><code>typedef itk::Image &lt;unsigned short&gt; ImageType;
typedef itk::ImageFileReader&lt;ImageType&gt; ReaderType;
ReaderType::Pointer reader = ReaderType::New();
try
{
    reader-&gt;SetFileName(nombreFichero);
}
catch (itk::ExceptionObject&amp; excep)
{
    cerr &lt;&lt; excep &lt;&lt; endl;
    return;
}
<br><br>Any ideas? Thanks in advance.<br></code></pre>

    </div></div></div>
_____________________________________<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>

</blockquote></div><br></div></div></blockquote></div><br></div>
</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>