CWidgetOutput

class ikomia.dataprocess.pydataprocess.CWidgetOutput

Define a widget output for a task. This class is designed to handle widget as output of a workflow task. A widget must be a derived object from QWidget of the Qt framework (PyQt5 or PySide2). Derived from CWorkflowTaskIO.

Import

from ikomia.dataprocess import CWidgetOutput

Methods

__init__(arg1)

__init__( (object)self) -> None :

set_widget(self, widget)

Set the widget instance: use qtconversion module to get C++ handle from Python Qt-based framework.

Overridden methods

clear_data(self)

Clear the output data: sets the widget handle to null.

is_data_available(self)

Check whether the output contains a valid widget.

Inherited methods

copy_static_data(self, io)

Copy the static data from the given input or ouput.

get_unit_element_count(self)

Get the number of unit elements in terms of processing scheme.

Attributes

auto_save

Auto-save status

data_type

I/O data type

dim_count

Number of dimensions

description

Custom description to explain input/output type and use

displayable

Displayable status (Ikomia Studio)

name

I/O name

source_file_path

Path to the source file used as workflow input (if any)

Details

__init__((object)arg1) None
__init__( (object)self) -> None :

Default constructor

__init__( (object)self, (IODataType)data_type) -> None :

Construct a CWidgetOutput instance with the given data type.By default, the widget data type is IODataType.WIDGET (see IODataType).

__init__( (object)self, (IODataType)data_type, (str)name) -> None :

Construct a CWidgetOutput instance with the given data type and name.By default, the widget data type is IODataType.WIDGET (see IODataType).

clear_data((CWidgetOutput)self) None :

Clear the output data: sets the widget handle to null.

clear_data( (CWidgetOutput)self) -> None

copy_static_data((CWorkflowTaskIO)self, (CWorkflowTaskIO)io) None :

Copy the static data from the given input or ouput. Static data are those which are not generated at runtime. Should be overriden for custom input or output.

Args:

CWorkflowTaskIO: input or ouput instance from which data is copied

copy_static_data( (CWorkflowTaskIO)self, (CWorkflowTaskIO)io) -> None

get_unit_element_count((CWorkflowTaskIO)self) int :

Get the number of unit elements in terms of processing scheme. This value is used to define the number of progress steps for progress bar component in Ikomia STUDIO. For an image, the count is 1. For Z-stack volume, the count is the number of Z levels. Should be overriden for custom input or output.

Returns:

int: number of unit element to process

get_unit_element_count( (CWorkflowTaskIO)self) -> int

is_data_available((CWidgetOutput)self) bool :

Check whether the output contains a valid widget.

Returns:

bool: True if the widget handle is valid, False otherwise

is_data_available( (CWidgetOutput)self) -> bool

set_widget((CWidgetOutput)self, (int)widget) None :

Set the widget instance: use qtconversion module to get C++ handle from Python Qt-based framework.

Parameters:

widget – C++ compatible widget handle