neurocarto.util.edit
How to write a blueprint script function
Real examples are:
src/neurocarto/util/edit/_actions.pytests/bp_example.py
Prepare a python file example.py with following contents.
from neurocarto.util.util_blueprint import BlueprintFunctions
def my_blueprint_script_function(bp: BlueprintFunctions, a0: str, a1: int):
"""
Script Document, which is used in GUI.
:param bp:
:param a0: (str) the first string argument
:param a1: (int) the second int argument
"""
bp.log_message(f'{a0=}', f'{a1=}')
For more detail information of how to declare a blueprint function,
please check BlueprintScript.
Add example.py into neurocarto.config.json.
{
"BlueprintScriptView": {
"actions" : {
"my": "example:my_blueprint_script_function"
}
}
}
Start an application with the commandline option --view=script,
then you can test your script.
Internal blueprint functions
It is an internal package for providing functions to the BlueprintFunctions
- neurocarto.util.edit.script
- neurocarto.util.edit.checking
- neurocarto.util.edit.clustering
- neurocarto.util.edit.data
- neurocarto.util.edit.category
- neurocarto.util.edit.moving
- neurocarto.util.edit.surrounding
- neurocarto.util.edit.optimize
- neurocarto.util.edit.probe
- neurocarto.util.edit.plot
- neurocarto.util.edit.atlas
- neurocarto.util.edit.actions
- neurocarto.util.edit.debug