Python API

jipipe

jipipe.data_slot

This file provides functions that are used to manage the contents of a data slot

Zoltán Cseresnyés, Ruman Gerst

Research Group Applied Systems Biology - Head: Prof. Dr. Marc Thilo Figge https://www.leibniz-hki.de/en/applied-systems-biology.html HKI-Center for Systems Biology of Infection Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI) Adolf-Reichwein-Straße 23, 07745 Jena, Germany

The project code is licensed under BSD 2-Clause. See the LICENSE file provided with the code for the full license.

DataSlot Objects

class DataSlot()

Models a JIPipe data slot.

__init__

 | __init__(data_type: str, storage_path: Path, node_id="", internal_path: Path = "", name: str = "", slot_type: str = "")

Initializes a new data slot

Arguments:

get_row_storage_path

 | get_row_storage_path(row: int)

Returns the storage path for the provided row

Arguments:

Returns:

the storage path for the row

copy_row

 | copy_row(source_data_slot, source_row: int)

Copies data from the source slot into this slot

Arguments:

add_row

 | add_row(n: int = 1, annotations: dict = None, true_data_type: str = None)

Adds n rows into the slot

Arguments:

Returns:

the last row index

to_table

 | to_table()

Converts the data slot into a Pandas table.The format is equivalent to data-table.csv generated by JIPipe.

Returns:

Pandas table

to_dict

 | to_dict()

Converts the data slot into a dict that can be serialized into JSON

Returns:

a dictionary that describes this slot

save

 | save(with_csv=False)

Saves all metadata related to this slot in the storage folder. This will overwrite data-table.json and data-table.csv (if enabled)

Arguments:

Returns:

None

import_from_folder

import_from_folder(storage_path: Path)

Imports a data slot from a storage path. A valid storage path contains ‘data-table.json’ and multiple numeric folders.

Arguments:

Returns:

a DataSlot instance

jipipe.imagej

This file provides functions to read/write ImageJ data types

Zoltán Cseresnyés, Ruman Gerst

Research Group Applied Systems Biology - Head: Prof. Dr. Marc Thilo Figge https://www.leibniz-hki.de/en/applied-systems-biology.html HKI-Center for Systems Biology of Infection Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI) Adolf-Reichwein-Straße 23, 07745 Jena, Germany

The project code is licensed under BSD 2-Clause. See the LICENSE file provided with the code for the full license.

get_image_file

get_image_file(data_slot: DataSlot, row: int)

Finds the image file located in imagej-imgplus-* data slot rows

Arguments:

Returns:

path to the image file or None if not found

get_table_file

get_table_file(data_slot: DataSlot, row: int)

Finds the CSV table file located in imagej-results-table (and related) data slow rows

Arguments:

Returns:

path to the CSV file or None if not found

load_image_file

load_image_file(data_slot: DataSlot, row: int)

Finds and loads the image file located in imagej-imgplus-* data slot rows and loads it with Skimage. Requires that Skimage is installed.

Arguments:

Returns:

Image data or None if no image was found

load_table_file

load_table_file(data_slot: DataSlot, row: int)

Finds and loads the CSV table file in imagej-results-table (and related) data slow rows as pandas data frame Requires that pandas is installed.

Arguments:

Returns:

Image data or None if no image was found

add_table

add_table(table, data_slot: DataSlot, annotations: dict = None)

Adds a new table into a new row of the specified slot

Arguments:

Returns:

index of the newly added row

add_image

add_image(image, data_slot: DataSlot, annotations: dict = None)

Adds a new image into a new row of the specified slot. The image will be saved as TIFF. Requires Skimage.

Arguments:

Returns:

index of the newly added row