Dynamic Contrast-Enhanced MRI (DCE-MRI) Plugins

With the DCE-MRI Tool, you can build your own data analysis model for the concentration of contrast agent, and load the model into DCE-MRI as a plugin. Using a simple example, this section details how to create your model, which is written using the Java programming language. If you are not a java programmer, or find this task too daunting, you can commission Xinapse Systems to write your analysis plugin.

The steps needed to create and use a plugin are:

  1. Write the java source code for the class that extends com.xinapse.apps.perfusion.DCEMRIModel.
  2. Compile the source code to produce java class files.
  3. Either place your plugin in a standard location or extend Jim's classpath so that Jim knows where to find the new class.
  4. Import the new plugin into Jim.
  5. Restart Jim.

Source code for the example plugin

The example plugin we will create calculates a single parametric image - the maximum upslope in the contrast agent concentration-time curve. The class you will create must extend the class com.xinapse.apps.perfusion.DCEMRIModel The source code for our example can be found in Upslope.java. The source code contains explanations of the forms that must be followed. Save the example source code into a folder of your choice.

Compiling the source code

Compile the source code using the command:

javac Upslope.java

Note: you must use javac version 17.
This will generate the class files Upslope.class and Upslope$UpslopeResult.class.

Telling Jim where to find your new class

Jim can find your plugin if either:

  1. You place all the .class files for your plugin in one of two standard locations. These are:
  2. You modify Jim's standard classpath to include the folder where your new class files are. Please see the relevant sections about customising an installation on Windows, Unix or Mac OS.

If necessary, copy the plugin .class files created by the compilation above to your chosen location.

Import the plugin into Jim

To import the new plugin, select Import plugin ... from the tool's Plugins menu: plugins_import_plugin, and tell Jim the fully-qualified class name for your new plugin. In our example, we simply enter "Upslope", but if you had put you plugin into a particular package such as "edu.myuni.plugins", you would enter "edu.myuni.plugins.Upslope".

dce_mri_plugin_import

Then click the ok button.

Restart Jim and your new plugin will be in the list of Models that can be applied to DCE-MRI data:

dce_mri_model_with_plugin

Note: if you recompile your plugin, you will need to restart Jim for the change to take effect.

Removing a plugin from Jim

If, at sometime in the future, you wish to stop using a plugin, you can simply delete the .class files from the plugin folder. When you do this, Jim will give you a warning message next time you try to use the tool, like this:

dce_mri_plugin_not_found

After this one warning, Jim will not try to use the plugin again.

If you temporarily want to stop using the plugin, but without deleting the .class files, select Manage plugins ... from the tool's Plugins menu: plugins_manage_plugins and delete the plugin from the list of current plugins that pops up. To start using the plugin again you will have to repeat the procedure of importing your plugin into Jim.

Jim Home