monai.deploy.core.Operator¶
- class monai.deploy.core.Operator(self: holoscan.core._core.Operator, arg0: object, arg1: holoscan::Fragment, *args, **kwargs) None [source]¶
Bases:
holoscan.core._core.Operator
Operator class.
Can be initialized with any number of Python positional and keyword arguments.
If a name keyword argument is provided, it must be a str and will be used to set the name of the Operator.
Condition classes will be added to
self.conditions
, Resource classes will be added toself.resources
, and any other arguments will be cast from a Python argument type to a C++ Arg and stored inself.args
. (For details on how the casting is done, see the py_object_to_arg utility). When a Condition or Resource is provided via a kwarg, it’s name will be automatically be updated to the name of the kwarg.- fragmentholoscan.core.Fragment
The holoscan.core.Fragment (or holoscan.core.Application) to which this Operator will belong.
- *args
Positional arguments.
- **kwargs
Keyword arguments.
- RuntimeError
If name kwarg is provided, but is not of str type. If multiple arguments of type Fragment are provided. If any other arguments cannot be converted to Arg type via py_object_to_arg.
Operator class.
Can be initialized with any number of Python positional and keyword arguments.
If a name keyword argument is provided, it must be a str and will be used to set the name of the Operator.
Condition classes will be added to
self.conditions
, Resource classes will be added toself.resources
, and any other arguments will be cast from a Python argument type to a C++ Arg and stored inself.args
. (For details on how the casting is done, see the py_object_to_arg utility). When a Condition or Resource is provided via a kwarg, it’s name will be automatically be updated to the name of the kwarg.- fragmentholoscan.core.Fragment
The holoscan.core.Fragment (or holoscan.core.Application) to which this Operator will belong.
- *args
Positional arguments.
- **kwargs
Keyword arguments.
- RuntimeError
If name kwarg is provided, but is not of str type. If multiple arguments of type Fragment are provided. If any other arguments cannot be converted to Arg type via py_object_to_arg.
Methods
__init__
(self, arg0, arg1, *args, **kwargs)__init__(self: holoscan.core._core.Operator, arg0: object, arg1: holoscan::Fragment, *args, **kwargs) -> None
add_arg
(*args, **kwargs)Overloaded function.
compute
(self, arg0, arg1, arg2)Operator compute method.
initialize
(self)Operator initialization method.
setup
(spec)Default implementation of setup method.
start
(self)Operator start method.
stop
(self)Operator stop method.
Attributes
The list of arguments associated with the component.
Conditions associated with the operator.
YAML formatted string describing the operator.
The fragment that the operator belongs to.
The identifier of the component.
The name of the operator.
The operator type.
Resources associated with the operator.
spec
- class OperatorType(self: holoscan.core._core.Operator.OperatorType, value: int) None ¶
Bases:
pybind11_builtins.pybind11_object
Members:
NATIVE
GXF
- property name¶
- __init__(self: holoscan.core._core.Operator, arg0: object, arg1: holoscan::Fragment, *args, **kwargs) None [source]¶
__init__(self: holoscan.core._core.Operator, arg0: object, arg1: holoscan::Fragment, *args, **kwargs) -> None
Operator class.
Can be initialized with any number of Python positional and keyword arguments.
If a name keyword argument is provided, it must be a str and will be used to set the name of the Operator.
Condition classes will be added to
self.conditions
, Resource classes will be added toself.resources
, and any other arguments will be cast from a Python argument type to a C++ Arg and stored inself.args
. (For details on how the casting is done, see the py_object_to_arg utility). When a Condition or Resource is provided via a kwarg, it’s name will be automatically be updated to the name of the kwarg.- fragmentholoscan.core.Fragment
The holoscan.core.Fragment (or holoscan.core.Application) to which this Operator will belong.
- *args
Positional arguments.
- **kwargs
Keyword arguments.
- RuntimeError
If name kwarg is provided, but is not of str type. If multiple arguments of type Fragment are provided. If any other arguments cannot be converted to Arg type via py_object_to_arg.
- add_arg(*args, **kwargs)¶
Overloaded function.
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None
Add an argument to the component.
add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.ArgList) -> None
Add a list of arguments to the component.
- property args¶
The list of arguments associated with the component.
arglist : holoscan.core.ArgList
- compute(self: holoscan.core._core.Operator, arg0: holoscan.core._core.InputContext, arg1: holoscan.core._core.OutputContext, arg2: holoscan.core._core.ExecutionContext) None ¶
Operator compute method. This method defines the primary computation to be executed by the operator.
- property conditions¶
Conditions associated with the operator.
- property description¶
YAML formatted string describing the operator.
- property fragment¶
The fragment that the operator belongs to.
name : holoscan.core.Fragment
- property id¶
The identifier of the component.
The identifier is initially set to -1, and will become a valid value when the component is initialized.
With the default executor (holoscan.gxf.GXFExecutor), the identifier is set to the GXF component ID.
id : int
- initialize(self: holoscan.core._core.Operator) None ¶
Operator initialization method.
- property name¶
The name of the operator.
name : str
- property operator_type¶
The operator type.
holoscan.core.Operator.OperatorType enum representing the type of the operator. The two types currently implemented are native and GXF.
- property resources¶
Resources associated with the operator.
- start(self: holoscan.core._core.Operator) None ¶
Operator start method.
- stop(self: holoscan.core._core.Operator) None ¶
Operator stop method.