Skip to contents

Make a wholebrain compatible segmentation object for a slice in a slice object

Make a wholebrain compatible segmentation object for a slice in a mouse object

Usage

make_segmentation_object(x, ...)

# S3 method for slice
make_segmentation_object(
  s,
  mouse_ID = NA,
  channels = NULL,
  use_filter = FALSE,
  ...
)

# S3 method for mouse
make_segmentation_object(
  m,
  slice_ID = NA,
  hemisphere = NULL,
  channels = NULL,
  replace = FALSE,
  use_filter = FALSE,
  ...
)

Arguments

...

(optional) additional volume and overlap parameters for get.colabeled.cells().

s

slice object

mouse_ID

(str) ID of mouse

channels

(str vector, default = NULL) Channels to process. If NULL, defaults to the channels stored in the slice object attributes.

use_filter

(bool, default = FALSE). Use a filter to create more curated segmentation object from the raw segmentation data.

m

mouse object

slice_ID

(str) ID of slice

hemisphere

(str, default = NULL) 'left', 'right' or NULL (both)

replace

(bool, default = FALSE) replace existing raw segmentation data

Value

s slice object

Note

If you are processing the colabel channel, the X and Y positions of colabelled cells are the average of the x,y centroid coordinates of the colabelled objects

Examples

s <- make_segmentation_object(s, mouse_ID = "255", channels = c("cfos", "eyfp"), use_filter = FALSE)
#> Error in make_segmentation_object(s, mouse_ID = "255", channels = c("cfos",     "eyfp"), use_filter = FALSE): object 's' not found
m <-  make_segmentation_object(m, slice_ID = '1_9', hemisphere = 'left', channels = c('eyfp', 'cfos', 'colabel'), use_filter = FALSE)
#> Error in make_segmentation_object(m, slice_ID = "1_9", hemisphere = "left",     channels = c("eyfp", "cfos", "colabel"), use_filter = FALSE): object 'm' not found