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.

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

  1. Get available plugins code from github repository to your <osirx_plugins_dir>
  2. Use Osirix Plugin Generator.app from <osirx_plugins_dir>/_help. Move it to <your_plugin_dir>
  3. Configure build settings -Change Base SDK to Latest OSX
  4. 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.

  1. Click Edit Scheme. As executable choose Osirix (one installed in Application is OK).
  2. Go to Arguments, Arguments Passed on Launch and add
    --LoadPlugin $(BUILT_PRODUCTS_DIR)/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)
  3. Change architecture to one corresponding to your Osirix version.
  4. 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.
Build Settings Edit Scheme

[top]