aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/gaze_analysis_pipeline/advanced_topics
diff options
context:
space:
mode:
authorThéo de la Hogue2023-08-10 09:04:31 +0200
committerThéo de la Hogue2023-08-10 09:04:31 +0200
commit293d1cc9b0fe6d7e871511cd716001f5765d9118 (patch)
tree444cff250f3a3e9997288dedf1d88c6dd8499209 /docs/user_guide/gaze_analysis_pipeline/advanced_topics
parent80e122453c1120b4211015a3b7625be089db8a9f (diff)
downloadargaze-293d1cc9b0fe6d7e871511cd716001f5765d9118.zip
argaze-293d1cc9b0fe6d7e871511cd716001f5765d9118.tar.gz
argaze-293d1cc9b0fe6d7e871511cd716001f5765d9118.tar.bz2
argaze-293d1cc9b0fe6d7e871511cd716001f5765d9118.tar.xz
Working on gaze analysis pipeline documentation. Still in progress...
Diffstat (limited to 'docs/user_guide/gaze_analysis_pipeline/advanced_topics')
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/plugin_loading.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/plugin_loading.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/plugin_loading.md
new file mode 100644
index 0000000..21e1f8b
--- /dev/null
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/plugin_loading.md
@@ -0,0 +1,46 @@
+Loading plugins from another package
+====================================
+
+It possible to load GazeMovementIdentifier, ScanPathAnalyzer or AOIScanPathAnalyzer plugins from another [python package](https://docs.python.org/3/tutorial/modules.html#packages).
+
+To do so, simply prepend the package where to find the plugin into the JSON configuration file:
+
+```
+{
+ ...
+ "gaze_movement_identifier": {
+ "my_package.MyGazeMovementIdentifierMethod": {
+ "specific_plugin_parameter": 0
+ }
+ },
+ ...
+ "scan_path_analyzers": {
+ "my_package.MyScanPathAnalyzerAlgorithm": {
+ "specific_plugin_parameter": 0
+ }
+ }
+ ...
+ "aoi_scan_path_analyzers": {
+ "my_package.MyAOIScanPathAnalyzerAlgorithm": {
+ "specific_plugin_parameter": 0
+ }
+ }
+}
+```
+
+Then, load your package from the python script where the ArFrame is created.
+
+```python
+from argaze import ArFeatures
+
+# Import your own package
+import my_package
+
+# Load ArFrame
+ar_frame = ArFeatures.ArFrame.from_json('./configuration.json')
+
+# Print ArFrame attributes
+
+for name, scan_path_analyzer in ar_frame.scan_path_analyzers.items():
+ print('scan path analyzer type:', type(scan_path_analyzer))
+```