[ITK] ITK IO Plugin only loads after calling itk::ObjectFactoryBase::ReHash()

Silvio Bauer silvio.bauer01 at gmail.com
Fri May 9 15:42:32 EDT 2014


Sorry, think I used my wrong email address for my answer. Here it is again:

I tried both but currently its [2], RegisterFactory().

-Silvio


2014-05-09 13:09 GMT-06:00 Bradley Lowekamp <blowekamp at mail.nih.gov>:

> In your IO plugin which method are you using to register your plug-in?
>
> [1]
> http://www.itk.org/Doxygen/html/classitk_1_1ObjectFactoryBase.html#a5ff348d83d1dcaa7a94f2bb36331b928
> [2]
> http://www.itk.org/Doxygen/html/classitk_1_1ObjectFactoryBase.html#afc60ab09e0ff668749b6b575d57386c0
>
> Brad
>
> On May 9, 2014, at 3:02 PM, Silvio Bauer <silvio.bauer01 at gmail.com> wrote:
>
> Hi,
>
> I'm working on an IO plugin for ITK to read and write in-house image file
> formats. I did everything as described in the wiki here<http://www.itk.org/Wiki/Plugin_IO_mechanisms>
> .
>
> I did everything by the book, put the dynamic library in the
> ITK_AUTOLOAD_PATH and set the ITK_AUTOLOAD_PATH environment variable.
>
> The library builds successfully, but when I try to read a file with the
> in-house format (with ImageReadExportVTK from the examples), I get this
> error message:
>
> ExceptionObject: Command not found.
>
> itk::ImageFileReaderException (0x7feab10f4eb8)Location: "virtual void itk::ImageFileReader<itk::Image<unsigned char, 3>, itk::DefaultConvertPixelTraits<unsigned char> >::GenerateOutputInformation() [TOutputImage = itk::Image<unsigned char, 3>, ConvertPixelTraits = itk::DefaultConvertPixelTraits<unsigned char>]" File: /people/seidel/ITK src/InsightToolkit-4.2.1/Modules/IO/ImageBase/include/itkImageFileReader.hxxLine: 143Description:  Could not create IO object for file little.lat
> Tried to create one of the following:
> JPEGImageIOGDCMImageIOBMPImageIOLSMImageIOPNGImageIOTIFFImageIOVTKImageIOStimulateImageIOBioRadImageIOMetaImageIONiftiImageIONrrdImageIOGiplImageIO
> HDF5ImageIOYou probably failed to set a file suffix, orset the suffix to an unsupported type
>
> However, if I put
>
> itk::ObjectFactoryBase::ReHash();
>
> before the reader is instantiated, everything works fine. But after that,
> no default factories are loaded. As I understand the plugin mechanism
> correctly, calling ReHash() shouldn't be necessary.
>
> Can anybody point me in the right direction?
>
> I'm on Mac OS 10.8.5 with ITK 4.2.1.
>
> Thanks in advance.
>
> -Silvio
>  _______________________________________________
>
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140509/aa47fcb3/attachment-0002.html>


More information about the Community mailing list