monai.deploy.operators.NiftiDataLoader¶
- class monai.deploy.operators.NiftiDataLoader(fragment, *args, input_path, **kwargs)[source]¶
Bases:
holoscan.core.Operator
This operator reads a nifti image, extracts the numpy array and forwards it to the next operator
- Named input:
image_path: Path to the image file, optional. Use it to override the input path set on the object.
- Named output:
image: A Numpy array object. Downstream receiver optional.
Creates an instance with the file path to load image from.
- Parameters
fragment (Fragment) – An instance of the Application class which is derived from Fragment.
input_path (Path) – The file Path to read from, overridden by valid named input on compute.
Methods
__init__
(fragment, *args, input_path, **kwargs)Creates an instance with the file path to load image from.
add_arg
(*args, **kwargs)Overloaded function.
compute
(op_input, op_output, context)Performs computation with the provided context.
convert_and_save
(nii_path)reads the nifti image and returns a numpy image array
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__(fragment, *args, input_path, **kwargs)[source]¶
Creates an instance with the file path to load image from.
- Parameters
fragment (Fragment) – An instance of the Application class which is derived from Fragment.
input_path (Path) – The file Path to read from, overridden by valid named input on compute.
- 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
- 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.