def overlay_cells_w_image(self, image): """Creates an overlay of the cells over the base image. Besides the base image this method also requires the clipping coordinates for the image""" img = rgb2gray(img_as_float(image)) img = rescale_intensity(img) return cp.overlay_cells(self.cells, img, self.cell_colors)
def overlay_cells_w_base(self, base_image, clip): """Creates an overlay of the cells over the base image. Besides the base image this method also requires the clipping coordinates for the image""" x0, y0, x1, y1 = clip base = color.rgb2gray(img_as_float(base_image[x0:x1, y0:y1])) base = exposure.rescale_intensity(base) self.base_w_cells = cp.overlay_cells(self.cells, base, self.cell_colors)
def overlay_cells_w_optional(self, optional_image): """Creates an overlay of the cells over the optional image""" optional = color.rgb2gray(img_as_float(optional_image)) optional = exposure.rescale_intensity(optional) self.optional_w_cells = cp.overlay_cells(self.cells, optional, self.cell_colors)
def overlay_cells_w_fluor(self, fluor_image): """Creates na overlay of the cells over the fluor image)""" fluor = color.rgb2gray(img_as_float(fluor_image)) fluor = exposure.rescale_intensity(fluor) self.fluor_w_cells = cp.overlay_cells(self.cells, fluor, self.cell_colors)