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(
  Image_dir,
  python_env = "giotto_segmentation",
  Nucleus_channel = 1,
  Memberane_channel = 2,
  pixel_per_micron = 0.25,
  mask_output,
  verbose = F,
  ...
)

Arguments

Image_dir

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

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

Memberane_channel

channel number for cell boundary, default to 2

pixel_per_micron

physical micron size per pixel, default to 0.25

mask_output

required. Provide a path to the output mask file.

Value

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

Examples

# example code
doMesmerSegmentation(
    Image_dir = input_image,
    mask_output = output, 
    Nucleus_channel = 1,
    Memberane_channel = 2,
    pixel_per_micron = 0.5
)
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.10
#> 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.10
#> ## 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)