Adding user interaction and preferences
The plugin that we have created thus far runs fine as a standalone plugin. However, it is also very easy to increase its power by allowing it to run in batch mode over a folder containing a large set of data files. This section will look at some of the changes that need to be incorporated for it to work. By setting certain steps as individual methods that can be called when the main class is instantiated, we can perform specific steps in a similar way as we have been doing for other classes. In our example, we used the ParticleAnalyzer
, ThresholdToSelection
and the Binary
plugin classes in a similar way. The only requirements that we need to add are some constants and default settings that allow this class to work with minimal configuration. In the following sections, I will show you a few alterations that can make this class a bit more flexible to use in other plugins.
Settings and options dialog
We have several parameters in our plugin that will influence...