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

Bill Lorensen bill.lorensen at gmail.com
Fri May 9 15:06:40 EDT 2014


Try running this test:

ITK/Modules/IO/ImageBase/test/itkIOPluginTest

it works wihtout a rehash...

On Fri, 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
>



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the Community mailing list