Perform the Giotto Wrapper of mesmer segmentation. This is for a model inference to generate segmentation mask file from input image. main parameters needed

doMesmerSegmentation(
  input,
  mask_output,
  python_env = "giotto_segmentation",
  nucleus_channel = 1,
  membrane_channel = 2,
  micron_scale = 0.25,
  verbose = NULL,
  ...
)

Arguments

input

character, required. Provide a path to a IF image.

mask_output

required. Provide a path to the output mask file.

python_env

python environment with deepcell installed. default = "giotto_segmentation". See deepcell official website for more details.

nucleus_channel

channel number for Nuclei, default to 1

membrane_channel

channel number for cell boundary, default to 2

micron_scale

numeric. Multiplicative scalefactor to convert pixel dimensions to physical microns.

Value

No return variable, as this will write directly to output path provided.

Examples

doMesmerSegmentation(
    input = input_image,
    mask_output = output,
    nucleus_channel = 1,
    membrane_channel = 2,
    micron_scale = 0.5
)
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.12
#> specified py env from `envname` = 'giotto_segmentation' not found
#> Error: package 'deepcell' is not yet installed
#> 
#>  To install:
#> ## active python env: '/usr/bin/python3' 
#> ## python version: 3.12
#> ## restart session then use GiottoClass::set_giotto_python_path() if this is incorrect
#> reticulate::conda_install(envname = '/usr/bin/python3', packages = c('deepcell'), pip = TRUE)