Setting up and checking plugins in ossim

Adding plugins:

OSSIM plugins can be loaded in two ways.

1) By putting an entry in you ossim preference file. Note that this system allows for ordering. Sample:

plugin.file1: /ossim/ossim_plugins/lib/libossimpng_plugin.so
plugin.file2: /ossim/ossim_plugins/lib/libossimKakaduPlugin.so
plugin.file3: /ossim/ossim_plugins/lib/libossim_plugin.so
plugin.file4: /ossim/ossim_plugins/lib/libossimOpenJpeg_plugin.so
plugin.file5: /ossim/ossim_plugins/lib/libossimreg_plugin.so

2) Placing the plugin in a directory that is automatically searched at run time. On windows this is the directory where the applications are. This system does not allow for ordering.

Checking plugins:

There are three ways to check your plugins:

1) Use "ossim-info --plugins" to dump them:

$ ossim-info --plugins
Plugin: /ossim/ossim_plugins/lib/libossimpng_plugin.so
Plugin: /ossim/ossim_plugins/lib/libossimKakaduPlugin.so
Plugin: /ossim/ossim_plugins/lib/libossim_plugin.so
Plugin: /ossim/ossim_plugins/lib/libossimOpenJpeg_plugin.so
Plugin: /ossim/ossim_plugins/lib/libossimreg_plugin.so
Plugin: /ossim/ossim_plugins/lib/libossimgdal_plugin.so

2) Use "ossim-info --plugin-test" to check the plugin:

$ ossim-info --plugin-test /ossim/ossim_plugins/lib/libossimKakaduPlugin.so 
Plugin loaded: /ossim/ossim_plugins/lib/libossimKakaduPlugin.so

3) Turn trace on for ossimDynamicLibrary:

$  imagelinker -T ossimDynamic
ossimDynamicLibrary::load DEBUG:
Loaded library:  /ossim/ossim_plugins/lib/libossimpng_plugin.so
ossimDynamicLibrary::load DEBUG:
Loaded library:  /ossim/ossim_plugins/lib/libossimKakaduPlugin.so
ossimDynamicLibrary::load DEBUG:
Loaded library:  /ossim/ossim_plugins/lib/libossim_plugin.so
ossimDynamicLibrary::load DEBUG:
Loaded library:  /ossim/ossim_plugins/lib/libossimOpenJpeg_plugin.so
ossimDynamicLibrary::load DEBUG:
Loaded library:  /ossim/ossim_plugins/lib/libossimreg_plugin.so
ossimDynamicLibrary::load DEBUG:
Loaded library:  /ossim/ossim_plugins/lib/libossimgdal_plugin.so

The third option will tell you if a plugin does not load.

Typically if a plugin does not load there is an undefined symbol due to a missing dependency. For instance a missing dll for gdal will cause the gdal plugin to not load. On windows there is an application "dependencewalker" to test this. See:
http://www.dependencywalker.com/

Last modified 10 years ago Last modified on Sep 4, 2009 5:57:42 AM