[ITK] ITK IO Plugin only loads after calling itk::ObjectFactoryBase::ReHash()
Silvio Bauer
silvio.bauer01 at gmail.com
Fri May 9 15:02:38 EDT 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140509/a94082ed/attachment-0001.html>
More information about the Community
mailing list