How to develop an Osirix Plugin - part 1: basics
It’s not easy to find documentation or examples on how to develop one’s own Osirix plugin. I gathered here some materials and my experience.
- Update 2017-08-12: Check the new version of this tutorial.
Useful websites
OsiriX website
OsiriX plugin basics website
OsiriX plugin by osirixnewby
OsiriX plugin development tutorial by Kyung Hyun Sung
OsiriX ITK plugin development tutorial by Brian Jensen
My how-to
- Get available plugins code from github repository to your
<osirx_plugins_dir>
- Use Osirix Plugin Generator.app from
<osirx_plugins_dir>/_help
. Move it to<your_plugin_dir>
- Configure build settings -Change
Base SDK
toLatest OSX
- Build and … Voila! - you should be able to install your plugin, restart osirix and run your plugin.
It works, but it would be nice to have debugger before we start messing with the code.
- Click Edit Scheme. As executable choose Osirix (one installed in Application is OK).
- Go to Arguments, Arguments Passed on Launch and add
--LoadPlugin $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)
- Change architecture to one corresponding to your Osirix version.
- Build and … Voila! Osirix should open, your plugin should be in plugins menu and you should be able to play with breakpoints in the plugin code.