... | @@ -18,17 +18,25 @@ AnyWave will detect runtimes installed on the computer if they have been install |
... | @@ -18,17 +18,25 @@ AnyWave will detect runtimes installed on the computer if they have been install |
|
|
|
|
|
Use user.json file to change path where runtimes are located in order for AnyWave to find them.
|
|
Use user.json file to change path where runtimes are located in order for AnyWave to find them.
|
|
|
|
|
|
# 1. Use the Plugin Creation Assistant
|
|
# Use the Plugin Creation Assistant
|
|

|
|

|
|
|
|
|
|

|
|

|
|
|
|
|
|
# 1.1 desc.txt
|
|
# What is a Plugin?
|
|
|
|
It's a folder placed on Plugins/MATLAB subfolders of AnyWave.
|
|
|
|
When AnyWave starts the first time it creates a folder named AnyWave in the user's home directory.
|
|
|
|
In the AnyWave folder you will find a Plugins\MATLAB folder.
|
|
|
|
Create a directory for you plugin in that location.
|
|
|
|
This is done four you in the previous section if you use the Plugin Creation Assistant of AnyWave.
|
|
|
|
|
|
|
|
## desc.txt
|
|
|
|
A file called desct.txt must be put in your Plugin.
|
|
This file is a simple text file that must contain the following lines:
|
|
This file is a simple text file that must contain the following lines:
|
|
*name = My Plugin*
|
|
*name = My Plugin*
|
|
*description = Do something on data*
|
|
*description = Do something on data*
|
|
|
|
|
|
# 1.1.1 optional lines
|
|
### optional lines
|
|
To tune up the behavior of your plugin you may add some flags to tell AnyWave what you plugin can do:
|
|
To tune up the behavior of your plugin you may add some flags to tell AnyWave what you plugin can do:
|
|
*flags=nodatarequired* -> this line will inform anywave that your plugin can run even if no data file is open.
|
|
*flags=nodatarequired* -> this line will inform anywave that your plugin can run even if no data file is open.
|
|
*flags=canrunfromcommandline* -> this flag indicates that your plugin can be run from the command line.
|
|
*flags=canrunfromcommandline* -> this flag indicates that your plugin can be run from the command line.
|
... | @@ -39,7 +47,9 @@ Put your plugin in a submenu, by adding the following line: |
... | @@ -39,7 +47,9 @@ Put your plugin in a submenu, by adding the following line: |
|
*category=Process:MyCategory:My plugin*
|
|
*category=Process:MyCategory:My plugin*
|
|
This line will create a sub menu called MyCategory in the Processes Menu of AnyWave and a link to launch the plugin.
|
|
This line will create a sub menu called MyCategory in the Processes Menu of AnyWave and a link to launch the plugin.
|
|
|
|
|
|
# 1.2 main.m
|
|
## main.m
|
|
|
|
A filed called main.m must also be put in your Plugin.
|
|
|
|
This file along with desc.txt fill will make your folder an AnyWave MATLAB plugin.
|
|
This is a MATLAB function you can create within MATLAB.
|
|
This is a MATLAB function you can create within MATLAB.
|
|
````matlab
|
|
````matlab
|
|
function main(varargin)
|
|
function main(varargin)
|
... | @@ -47,8 +57,9 @@ args = anywave('init', varargin); |
... | @@ -47,8 +57,9 @@ args = anywave('init', varargin); |
|
% args contains all the properties related to AnyWave current data file and the plugin context.
|
|
% args contains all the properties related to AnyWave current data file and the plugin context.
|
|
% my plugin code starts here
|
|
% my plugin code starts here
|
|
````
|
|
````
|
|
|
|
When using the Plugin Creation Assistant of AnyWave, the file is automatically created.
|
|
|
|
|
|
# 2. Compiled plugin
|
|
# Compiled plugin
|
|
Using the MATLAB Compiler, you can create a standalone version of your plugin.
|
|
Using the MATLAB Compiler, you can create a standalone version of your plugin.
|
|
AnyWave can call the standalone version of your plugin if you add the following line in desc.txt:
|
|
AnyWave can call the standalone version of your plugin if you add the following line in desc.txt:
|
|
*compiled plugin=nameofexefile*
|
|
*compiled plugin=nameofexefile*
|
... | @@ -62,9 +73,9 @@ runtime=R2024b |
... | @@ -62,9 +73,9 @@ runtime=R2024b |
|
You have to install the matching runtime version on your system.
|
|
You have to install the matching runtime version on your system.
|
|
AnyWave should detect it when starting up and when the time comes to run the plugin, it will setup the context to run the plugin with the required Runtime version.
|
|
AnyWave should detect it when starting up and when the time comes to run the plugin, it will setup the context to run the plugin with the required Runtime version.
|
|
|
|
|
|
# 5. [MATLAB API functions](/anywave/documentation/-/wikis/MATLAB_functions)
|
|
# [MATLAB API functions](/anywave/documentation/-/wikis/MATLAB_functions)
|
|
|
|
|
|
## 5.1 [Make your plugin BIDS Pipeline compatible](/anywave/documentation/-/wikis/MATLAB_BIDS)
|
|
# [Make your plugin BIDS Pipeline compatible](/anywave/documentation/-/wikis/MATLAB_BIDS)
|
|
|
|
|
|
## 5.2 [DEBUG PLUGINS directly in MATLAB](/anywave/documentation/-/wikis/MATLAB_debug)
|
|
# [DEBUG PLUGINS directly in MATLAB](/anywave/documentation/-/wikis/MATLAB_debug)
|
|
|
|
|