There is a file called TwoPhotonUserInit.m that is present in the vhtools/configuration directory that allows one to add custom plugins or features that the TwoPhoton tools can employ in performing analysis. This file is run whenever the TwoPhoton tools library is initialized. Some notes:
One common use of the TwoPhotonUserInit.m file is to define custom cell drawing devices or to set a custom set of parameters for draw devices. For example, to set up a draw device that uses the routine "draw_adaptivethreshold" you might use the following code (which is already present in the default TwoPhotonUserInit.m file):
See help analyzetpstack_active_draw_devices to learn more about draw devices, and see help draw_adaptivethreshold to learn about the parameters for the draw_adaptivethreshold draw device.