SegmentationAlgorithm Interface¶
All PLIs offer the class SegmentationAlgorithm which can be derived in order to communicate with the core module.
Properties¶
Properties of SegmentationAlgorithm.
data¶
- Type:
- DataExchangeProxy
- Description
- Proxy to exchange data between the PLI and the core module. This property is initialised by the corresponding PLI and must not be overwritten.
name¶
- Type:
- String
- Description:
- The name of the algorithm. The name must not be empty and must be alphanumeric and start with a character. Set this property in the constructor.
requiresTraining¶
- Type:
- bool
- Default:
- false
- Description:
- Flag to indicate whether the algorithm should be trained. Set this property in the constructor.
trainingGranularity¶
- Type:
- Granularity
- Default:
- Granularity.Medium
- Description:
- Used to filter the training ground truth data for the set granularity. Possible values are
Granularity.Fine,Granularity.Medium, andGranularity.Rough. Set this property in the constructor. This property is only considered ifrequiresTrainingis set to true.
Methods¶
Methods of SegmentationAlgorithm.
SegmentationAlgorithm() or __init__() or constructor.m¶
- Signature:
SegmentationAlgorithm()- Description:
- Constructor. Set properties like
name,requiresTrainingortrainingGranularityhere. Set algorithm parameters here.
train() or train.m¶
- Signature:
- void
train()- Return:
- void
- Description:
- This method will be called for each motion recording in the training dataset. You can fetch the current motion recording here using the
dataproperty and use it to train your variables.
resetTraining() or reset_training.m¶
- Signature:
- void
resetTraining()- Return:
- void
- Description:
- This method will be called after one part of the cross validation was executed. Make sure to reset all trained variables to not falsify the evaluation.
segment() or segment.m¶
- Signature:
- void
segment()- Return:
- void
- Description:
- This method will be called for each motion recording in the testing dataset.
registerBoolParameter()¶
- Signature:
- void
registerBoolParameter(Stringname, Stringdescription, booldefaultValue)- Return:
- void
- Description:
- Registers a boolean parameter
namewith a default value ofdefaultValueto tweak in the GUI.
registerIntParameter()¶
- Signature:
- void
registerIntParameter(Stringname, Stringdescription, intdefaultValue, intminimumValue= INT_MIN, intmaximumValue= INT_MAX)- Return:
- void
- Description:
- Registers an int parameter
namewith a default value ofdefaultValueto tweak in the GUI. The allowed range of values can be controlled withminimumValueandmaximumValue.
registerFloatParameter()¶
- Signature:
- void
registerFloatParameter(Stringname, Stringdescription, floatdefaultValue, intdecimals= 2, floatminimumValue= -FLOAT_MAX, floatmaximumValue= FLOAT_MAX)- Return:
- void
- Description:
- Registers a float parameter
namewith a default value ofdefaultValueto tweak in the GUI. The allowed range of values can be controlled withminimumValueandmaximumValue. The precision (number of decimals) can be controlled withdecimals.
registerStringParameter()¶
- Signature:
- void
registerStringParameter(Stringname, Stringdescription, StringdefaultValue)- Return:
- void
- Description:
- Registers a String parameter
namewith a default value ofdefaultValueto tweak in the GUI.
registerJsonParameter()¶
- Signature:
- void
registerJsonParameter(Stringname, Stringdescription, JSONdefaultValue)- Return:
- void
- Description:
- Registers a JSON parameter
namewith a default value ofdefaultValueto tweak in the GUI.
getBoolParameter()¶
- Signature:
- bool
getBoolParameter(Stringname)- Return:
- bool
- Description:
- Get a registered bool parameter by its
name.
getIntParameter()¶
- Signature:
- int
getIntParameter(Stringname)- Return:
- int
- Description:
- Get a registered int parameter by its
name.
getFloatParameter()¶
- Signature:
- float
getFloatParameter(Stringname)- Return:
- float
- Description:
- Get a registered float parameter by its
name.
getStringParameter()¶
- Signature:
- String
getStringParameter(Stringname)- Return:
- String
- Description:
- Get a registered String parameter by its
name.
getJsonParameter()¶
- Signature:
- JSON
getJsonParameter(Stringname)- Return:
- JSON
- Description:
- Get a registered JSON parameter by its
name.