CNumericIO

Float specialization of C++ template class CNumericIO.

class ikomia.dataprocess.pydataprocess.CNumericIO

Define input or output for a task consuming or producing data as numeric values. C++ implementation uses template to handle various data types. In Python, Ikomia API exposes only the double precision (float) and string specializations. The class is designed to handle row/column data structure, it consists on a list of values, a list of associated labels and a display type (see NumericOutputType). For the specific case of plot display, a plot type property is available (see PlotType). Derived from CWorkflowTaskIO

Import

from ikomia.dataprocess import CNumericIO

Methods

__init__(arg1)

__init__( (object)self) -> None :

add_value_list(self, values)

Append a new value list.

get_all_header_labels(self)

Get all header labels (column labels).

get_all_label_list(self)

Get all label lists associated with value lists.

get_all_value_list(self)

Get all value lists.

get_output_type(self)

Get output display type.

get_plot_type(self)

Get plot type.

get_value_list(self, index)

Get value list at position index.

set_output_type(self, type)

Set output display type.

set_plot_type(self, type)

Set plot type.

Overridden methods

clear_data(self)

See clear_data().

from_json(self, jsonStr)

Set input/output data from JSON formatted string.

is_data_available(self)

See is_data_available().

load(self, path)

Load data values (double or string) from previsouly exported file.

save(self, path)

Save data values (double or string) to file.

to_json(self)

Return input/output data in JSON formatted string (compact mode).

Inherited methods

copy_static_data(self, io)

See copy_static_data().

get_unit_element_count(self)

See get_unit_elementCount().

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 CNumericIO instance with the given name.

Args:

name (str): input or output custom name (to give insights to end user)

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

Copy constructor

add_value_list((CNumericIO)self, (object)values) None :

Append a new value list.

Args:

values (list): list of values (float or string)

add_value_list( (CNumericIO)self, (object)values, (str)header_label) -> None :

Append a new value list with the corresponding header label. A header label can be seen as a column name in a table representation.

Args:

values (list): list of values (float or string)

header_label (str): header label

add_value_list( (CNumericIO)self, (object)values, (object)labels) -> None :

Append a new value list with a label for each value.

Args:

values (list): list of values (float or string)

labels (list of str): store label for each numeric value

add_value_list( (CNumericIO)self, (object)values, (str)header_label, (object)labels) -> None :

Append a new value list with the corresponding header label and a label for each value.

Args:

values (list): list of values (float or string)

header_label (str): header label

labels (list of str): store label for each numeric value

clear_data((CNumericIO)self) None :

See clear_data().

clear_data( (CNumericIO)self) -> None

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

See copy_static_data().

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

from_json((CNumericIO)self, (str)jsonStr) None :

Set input/output data from JSON formatted string.

Args:

str: data as JSON formatted string

from_json( (CNumericIO)self, (str)jsonStr) -> None

get_all_header_labels((CNumericIO)self) object :

Get all header labels (column labels).

Returns:

list of str

get_all_label_list((CNumericIO)self) object :

Get all label lists associated with value lists.

Returns:

all labels

Return type:

list of list of str

get_all_value_list((CNumericIO)self) object :

Get all value lists.

Returns:

all values

Return type:

list of list (float or string)

get_output_type((CNumericIO)self) NumericOutputType :

Get output display type. Can be one of the values defined in NumericOutputType.

Returns:

display type

Return type:

int

get_plot_type((CNumericIO)self) PlotType :

Get plot type. Can be one of the values defined in PlotType. Meaningful only if output display type is set to PLOT.

Returns:

plot type

Return type:

PlotType

get_unit_element_count((CNumericIO)self) int :

See get_unit_elementCount().

get_unit_element_count( (CNumericIO)self) -> int

get_value_list((CNumericIO)self, (int)index) object :

Get value list at position index.

Parameters:

index (int) – index of value list

Returns:

values

Return type:

list (float or string)

is_data_available((CNumericIO)self) bool :

See is_data_available().

is_data_available( (CNumericIO)self) -> bool

load((CNumericIO)self, (str)path) None :

Load data values (double or string) from previsouly exported file. At this time, file must be in CSV format.

Args:

path (str)

load( (CNumericIO)self, (str)path) -> None

save((CNumericIO)self, (str)path) None :

Save data values (double or string) to file. At this time, file must be in CSV format.

Args:

path (str)

save( (CNumericIO)self, (str)path) -> None

set_output_type((CNumericIO)self, (NumericOutputType)type) None :

Set output display type. See NumericOutputType for possible values.

Parameters:

type (int) – display type

set_plot_type((CNumericIO)self, (PlotType)type) None :

Set plot type. See PlotType for possible values. Only used if output display type is set to PLOT (see set_output_type()).

Parameters:

type (PlotType) – plot type

to_json((CNumericIO)self) str :

Return input/output data in JSON formatted string (compact mode).

Returns:

string: JSON formatted string

to_json( (CNumericIO)self) -> str

to_json( (CNumericIO)self, (object)options) -> str :

Return input/output data in JSON formatted string. JSON format option can be set, possible values are:

  • [‘json_format’, ‘compact’] (default)

  • [‘json_format’, ‘indented’]

Args:

list of str: format-specific options encoded as pairs [option_name, option_value]

Returns:

string: JSON formatted string

to_json( (CNumericIO)self, (object)options) -> str