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
qtconversionmodule 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_saveAuto-save status
data_typeI/O data type
dim_countNumber of dimensions
descriptionCustom description to explain input/output type and use
displayableDisplayable status (Ikomia Studio)
nameI/O name
source_file_pathPath 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 copiedcopy_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
qtconversionmodule to get C++ handle from Python Qt-based framework.- Parameters:
widget – C++ compatible widget handle