[ITK] [ITK-dev] Missing IO factories when building without cmake

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Apr 1 08:38:55 EDT 2014


Bill,

I think including code in an exception message is a mistake. This information is clearly geared to some one developing an ITK program. 

I think it would be better to have a wiki page or a FAQ entry with what needs to be done to fix when there are no ImageIO factories registered. Then is exception message can just refer to that.

Also there is the case when a developer using CMake did not correctly include the ITK_USE_FILE, we were getting a of those issues with ITK v4.0 first came out.

Additionally, the user would have to register all the ImageIO, and TransformIO files. I have previously recommend copying the itkImageIOFactoryRegisterManager.h and the itkTransformIOFactoryRegisterManager.h files form the ITK build directory into the project to perform the factory registration.

So my question, I thought some of the information was already in the WIKI some place? Anyone know where? Also the FAQ[1]  looks unmaintained. Is this not a useful resource the community should help keep up to date? Is there a better location for this type of information?

Brad

[1] http://www.itk.org/Wiki/ITK/FAQ

On Mar 31, 2014, at 7:32 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:

> Folks,
> 
> We have recently seen a couple of users who build their ITK apps
> without cmake. When they try to read or write images they get a
> message like this:
> Description:  Could not create IO object for file
> foo.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 submitted a gerrit patch:
> http://review.source.kitware.com/#/c/14909/
> 
> to provide a better description of the exception:
> 
> Description:  Could not create IO object for writing file foo.img
>  Tried to create one of the following:
>  There are no registered IO factories. You probably built your
> project without using cmake
>  You can register the IO factories you need with:
>    #include "itkXXXImageIOFactory.h"
>    itk::XXXImageIOFactory::RegisterOneFactory();
>     where XXX is e.g. Nifti, PNG, Meta...
>       #include "itkNiftImageIOFactory.h"
>       itk::NiftiImageIOFactory::RegisterOneFactory();
> _______________________________________________
> 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://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-developers

_______________________________________________
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://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-developers


More information about the Community mailing list