[Insight-users] Problems with ReadUnknownImageType and with tiff images

Bill Lorensen bill.lorensen at gmail.com
Thu Feb 7 23:18:29 EST 2013


Are you using the source code from the wiki example and the
corresponding CMakeLists.txt file?

On Thu, Feb 7, 2013 at 12:23 PM, Françoise LEFEBVRE
<lefebvre at imnc.in2p3.fr> wrote:
> Hi,
>
> I am working with MSVC2010, ITK4.3 and QT5.0.1 and I've got two issues
> regarding the reading of images  :
>
> 1. The following code is extracted from
> http://www.itk.org/Wiki/ITK/Examples/IO/ReadUnknownImageType makes the
> program crashed on the fourth line :
>
>   std::string inputFilename = "vtk.png";
>   typedef itk::ImageIOBase::IOComponentType ScalarPixelType;
>   itk::ImageIOBase::Pointer imageIO =
> itk::ImageIOFactory::CreateImageIO(inputFilename.c_str(),
> itk::ImageIOFactory::ReadMode);
>   imageIO->SetFileName(inputFilename);
>   imageIO->ReadImageInformation();
>
> The image file exists in the current directory, and the result is the same
> with a .jpeg or .png file.
>
>
> 2. When including the file "itkTIFFImageIO.h"
> #include <itkTIFFImageIO.h>
> the project does not compile because of the following error :
>
> c:\appli\itk\include\itk-4.3\itktiff\tiff.h(31): fatal error C1083: unable
> to open include : 'tif_config.h' : No such file or directory
>
> Indeed the file tif_config.h is not in the
> "(CMAKE_INSTALL_PREFIX)\include\itk-4.3\itktif"  directory whereas the
> installation seemed to be OK. I don't have any problem with png or jpeg
> files.
>
> Thank you for your help
>
> Françoise L.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-users mailing list