CArrayIO

class ikomia.dataprocess.pydataprocess.CArrayIO

Define multi-dimensional array as input or output of a task. A CArrayIO instance can be added as input or output to a CWorkflowTask or derived object. The internal image data structure is a numpy array. Derived from CWorkflowTaskIO.

Import

from ikomia.dataprocess import CArrayIO

Methods

__init__(arg1)

__init__( (object)self) -> None :

get_array(self)

Get the array data.

set_array(self, array)

Set the array data

Overridden methods

clear_data(self)

Clear array so that it becomes empty.

get_unit_element_count(self)

Get the number of unit elements when the data is processed.

is_data_available(self)

Check whether the input/output has valid array.

Inherited methods

copy_static_data(self, io)

Copy the static data from the given input or ouput.

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, (str)name) -> None :

Construct a CArrayIO instance with the given array.

Args:

name (str): custom name (to give insights to end user)

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

Construct a CArrayIO instance with the given array.

Args:

array (Numpy array): nd array

name (str): custom name (to give insights to end user)

__init__( (object)arg1, (CArrayIO)arg2) -> None :

Copy constructor

clear_data((CArrayIO)self) None :

Clear array so that it becomes empty.

clear_data( (CArrayIO)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_array((CArrayIO)self) object :

Get the array data.

Returns:

nd array

Return type:

Numpy array

get_unit_element_count((CArrayIO)self) int :

Get the number of unit elements when the data is processed. The number of unit elements is used to calculate the number of progress steps needed to perform a task. Ikomia Studio consider array as a whole entity.

Returns:

int: number of unit element to process (always 1).

get_unit_element_count( (CArrayIO)self) -> int

is_data_available((CArrayIO)self) bool :

Check whether the input/output has valid array.

Returns:

bool: True if array is not empty, False otherwise.

is_data_available( (CArrayIO)self) -> bool

set_array((CArrayIO)self, (object)array) None :

Set the array data

Parameters:

array (Numpy array) – nd array