monai.deploy.operators.PNGConverterOperator

class monai.deploy.operators.PNGConverterOperator(fragment, *args, output_folder, **kwargs)[source]

Bases: holoscan.core.Operator

This operator writes out a 3D Volumetric Image to to a file folder in a slice by slice manner.

Named input:

image: Image object or numpy ndarray

Named output:

None

File output:

Generated PNG image file(s) saved in the provided output folder.

Class to write out a 3D Volumetric Image to a file folder in a slice by slice manner.

Parameters
  • fragment (Fragment) – An instance of the Application class which is derived from Fragment.

  • output_folder (str or Path) – The folder for saving the generated DICOM instance file.

Methods

__init__(fragment, *args, output_folder, …)

Class to write out a 3D Volumetric Image to a file folder in a slice by slice manner.

add_arg(*args, **kwargs)

Overloaded function.

compute(self, arg0, arg1, arg2)

Operator compute method.

convert_and_save(image, path)

extracts the slices in originally acquired direction (often axial) and saves them in PNG format slice by slice in the specified directory

initialize(self)

Operator initialization method.

setup(spec)

Default implementation of setup method.

start(self)

Operator start method.

stop(self)

Operator stop method.

Attributes

DEFAULT_OUTPUT_FOLDER

args

The list of arguments associated with the component.

conditions

Conditions associated with the operator.

description

YAML formatted string describing the operator.

fragment

The fragment that the operator belongs to.

id

The identifier of the component.

name

The name of the operator.

operator_type

The operator type.

resources

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, output_folder, **kwargs)[source]

Class to write out a 3D Volumetric Image to a file folder in a slice by slice manner.

Parameters
  • fragment (Fragment) – An instance of the Application class which is derived from Fragment.

  • output_folder (str or Path) – The folder for saving the generated DICOM instance file.

add_arg(*args, **kwargs)

Overloaded function.

  1. add_arg(self: holoscan.core._core.Component, arg: holoscan.core._core.Arg) -> None

Add an argument to the component.

  1. 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[source]

Operator compute method. This method defines the primary computation to be executed by the operator.

property conditions

Conditions associated with the operator.

convert_and_save(image, path)[source]

extracts the slices in originally acquired direction (often axial) and saves them in PNG format slice by slice in the specified directory

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.

setup(spec)[source]

Default implementation of setup method.

start(self: holoscan.core._core.Operator) None

Operator start method.

stop(self: holoscan.core._core.Operator) None

Operator stop method.