[ITK-users] [ITK] Exception when running IO example ImageReadCastWrite in Xcode

Matt McCormick matt.mccormick at kitware.com
Fri Mar 28 11:04:54 EDT 2014


Hi,

Use CMake to generate the XCode project for the HelloWorld or
ImageReadCastWrite, and it will automatically generate all the
factories.

Hope this helps,
Matt

On Fri, Mar 28, 2014 at 9:44 AM, padillr <ramonpadilla1 at yahoo.co.uk> wrote:
> Hi,
>
> I have successfully built ITK version 4.5.1 on OS X using cmake.
>
> The following are options that I'm passing to cmake.
>
> -DCMAKE_BUILD_TYPE=Debug \
> -DCMAKE_C_COMPILER=clang \
> -DCMAKE_CXX_COMPILER=clang++ \
> -DITK_USE_64BITS_IDS=Yes \
> -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++" \
> -DITK_DIR=/temp/itk/build/
>
> I then created an Xcode project, imported the Hello World example, set up
> paths to the headers and linked to the ITK libraries that I built previously
> using cmake. The example built and ran successfully.
>
> Next, I tried to do the same with the ImageReadCastWrite example in IO. This
> also builds successfully but when I run it I get the following exception.
>
> ExceptionObject caught !
>
> itk::ImageFileWriterException (0x100304788)
> Location: "virtual void itk::ImageFileWriter<itk::Image<unsigned char, 2>
>>::Write() [TInputImage = itk::Image<unsigned char, 2>]"
> File: /temp/itk/Modules/IO/ImageBase/include/itkImageFileWriter.hxx
> Line: 151
> Description:  Could not create IO object for file
> /temp/itk-sample/T1_MAP.png
>   Tried to create one of the following:
>   You probably failed to set a file suffix, or
>     set the suffix to an unsupported type.
>
> I'm using ITK for the first time. A quick investigation suggests that there
> are no factories being loaded. Any ideas why this may be the case?
>
> Please note that I can successfully execute ImageReadCastWrite in the bin
> directory that was created as part of building ITK.
>
>
>
>
>
>
>
> --
> View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Exception-when-running-IO-example-ImageReadCastWrite-in-Xcode-tp7585270.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> 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
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community


More information about the Insight-users mailing list