acia.segm.omero.utils#

Utils for OMERO segmenation data

acia.segm.omero.utils.getImage(conn, imageId)[source]#
Get omero image by id

Note: only images in your current group are accessible

Parameters:
  • conn (BlitzGateway) – current omero connection

  • imageId (int) – image id

Returns:

ImageWrapper – image object

Return type:

omero.gateway.ImageWrapper

acia.segm.omero.utils.getDataset(conn, datasetId)[source]#
Get omero dataset by id

Note: only datasets in your current group are accessible

Parameters:
  • conn (BlitzGateway) – active omero connection

  • datasetId (int) – dataset id

Returns:

DatasetWrapper – dataset object

Return type:

omero.gateway.DatasetWrapper

acia.segm.omero.utils.getProject(conn, projectId)[source]#
Get omero project by id

Note: only projects in your current group are accessible

Parameters:
  • conn (BlitzGateway) – active omero connection

  • projectId (int) – project id

Returns:

ProjectWrapper – project object

Return type:

omero.gateway.ProjectWrapper

acia.segm.omero.utils.list_projects(conn)[source]#
List projects in the current user group

Note: only projects in your current group are accessible

Parameters:

conn (BlitzGateway) – Current omero BlitzGateway connection

Returns:

List[ProjectWrapper] – List of project wrappers

Return type:

list[omero.gateway.ProjectWrapper]

acia.segm.omero.utils.list_image_ids_in_dataset(conn, datasetId)[source]#

[summary]

Parameters:
  • conn (BlitzGateway) – active omero connection

  • datasetId (int) – dataset id

Returns:

List[int] – array of all image ids of the dataset

Return type:

list[int]

acia.segm.omero.utils.list_images_in_dataset(conn, datasetId)[source]#

List all images in the omero dataset

Parameters:
  • conn (BlitzGateway) – active omero connection

  • datasetId (int) – dataset id

Returns:

List[ImageWrapper] – List of omero images

Return type:

list[omero.gateway.ImageWrapper]

acia.segm.omero.utils.list_datasets_in_project(conn, projectId)[source]#
Parameters:
  • conn (omero.gateway.BlitzGateway)

  • projectId (int)

Return type:

list[omero.gateway.DatasetWrapper]

acia.segm.omero.utils.list_images_in_project(conn, projectId)[source]#
Parameters:
  • conn (omero.gateway.BlitzGateway)

  • projectId (int)

Return type:

list[omero.gateway.ImageWrapper]

acia.segm.omero.utils.list_image_ids_in(omero_id, omero_type, conn)[source]#

List all image sequences in an omero source (dataset, project or image)

Parameters:
  • omero_id (int) – the omero id specifying the resource on the omero server

  • omero_type (str) – the type of the omero source. Can be ‘project’, ‘dataset’ or ‘image’.

  • conn (BlitzGateway) – the connection to omero

Raises:

Exception – when wrong omero_type is specified

Returns:

List[int] – list of image ids contained in the OMERO resource

Return type:

list[int]

acia.segm.omero.utils.get_image_name(conn, imageId)[source]#
Parameters:
  • conn (omero.gateway.BlitzGateway)

  • imageId (int)

Return type:

str

acia.segm.omero.utils.get_project_name(conn, projectId)[source]#
Parameters:
  • conn (omero.gateway.BlitzGateway)

  • projectId (int)

Return type:

str

acia.segm.omero.utils.image_iterator(conn, object)[source]#
Parameters:

conn (omero.gateway.BlitzGateway)

Return type:

omero.gateway.ImageWrapper

acia.segm.omero.utils.create_project(conn, project_name)[source]#
Parameters:
  • conn (omero.gateway.BlitzGateway)

  • project_name (str)

Return type:

omero.gateway.ProjectWrapper

acia.segm.omero.utils.create_dataset(conn, projectId, dataset_name)[source]#
Parameters:
  • conn (omero.gateway.BlitzGateway)

  • projectId (int)

  • dataset_name (str)

Return type:

omero.gateway.DatasetWrapper

class acia.segm.omero.utils.OmeroScaleBar[source]#

Bases: ScaleBar

Renderer for scale bar to show metric size of pixels on image

__init__(oss, width, unit='MICROMETER', short_title='μm', color=(255, 255, 255), font_size=25)[source]#
Parameters:

oss (OmeroSequenceSource)

draw(image, xstart, ystart)[source]#
acia.segm.omero.utils.has_all_tags(object, tag_list=None)[source]#
Parameters:

tag_list (list[str] | None)