[ITK] ITK IO Plugin only loads after calling itk::ObjectFactoryBase::ReHash()
Bradley Lowekamp
blowekamp at mail.nih.gov
Fri May 9 15:09:12 EDT 2014
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.
> 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.hxx
> Line: 143
> Description: Could not create IO object for file little.lat
>
> Tried to create one of the following:
>
> JPEGImageIO
> GDCMImageIO
> BMPImageIO
> LSMImageIO
> PNGImageIO
> TIFFImageIO
> VTKImageIO
> StimulateImageIO
> BioRadImageIO
> MetaImageIO
> NiftiImageIO
> NrrdImageIO
> GiplImageIO
> HDF5ImageIO
> You probably failed to set a file suffix, or
> set 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/1f4a9de8/attachment-0002.html>
More information about the Community
mailing list