예제 #1
0
 def display(self, workspace, figure):
     if self.show_window:
         figure.set_subplots((1, 1))
         figure.clf()
         ax = figure.subplot(0, 0)
         gridding = cpg.CPGridInfo()
         gridding.deserialize(workspace.display_data.gridding)
         self.display_grid(workspace.display_data.background_image,
                           gridding,
                           workspace.display_data.image_set_number, ax)
예제 #2
0
 def display(self, workspace, figure):
     if self.show_window:
         figure.set_subplots((1, 1))
         figure.clf()
         ax = figure.subplot(0, 0)
         gridding = cpg.CPGridInfo()
         gridding.deserialize(workspace.display_data.gridding)
         self.display_grid(
             workspace.display_data.background_image, gridding, workspace.display_data.image_set_number, ax
         )
예제 #3
0
    def display(self, workspace, figure):
        orig_image_pixel_data = workspace.display_data.orig_image_pixel_data
        cropped_pixel_data = workspace.display_data.cropped_pixel_data
        figure.set_subplots((2, 1))

        title = "Original: %s, cycle # %d" % (self.image_name.value,
                                              workspace.display_data.image_set_number)
        figure.subplot_imshow_grayscale(0, 0, orig_image_pixel_data, title)
        figure.subplot_imshow_bw(1, 0, cropped_pixel_data,
                                 self.cropped_image_name.value,
                                 sharexy=figure.subplot(0, 0))
예제 #4
0
    def display(self, workspace, figure):
        orig_image_pixel_data = workspace.display_data.orig_image_pixel_data
        cropped_pixel_data = workspace.display_data.cropped_pixel_data
        figure.set_subplots((2, 1))

        title = "Original: %s, cycle # %d" % (
            self.image_name.value, workspace.display_data.image_set_number)
        figure.subplot_imshow_grayscale(0, 0, orig_image_pixel_data, title)
        figure.subplot_imshow_bw(1,
                                 0,
                                 cropped_pixel_data,
                                 self.cropped_image_name.value,
                                 sharexy=figure.subplot(0, 0))
예제 #5
0
    def display(self, workspace, figure):
        figure.set_subplots((1, 1))
        ax = figure.subplot(0, 0)
        title = "%s_%s" % (
            self.objects_name.value if self.objects_or_image == OI_OBJECTS else
            cellprofiler_core.measurement.IMAGE,
            self.measurement.value,
        )

        def imshow_fn(pixel_data):
            if pixel_data.ndim == 3:
                figure.subplot_imshow_color(0, 0, pixel_data, title=title)
            else:
                figure.subplot_imshow_grayscale(0, 0, pixel_data, title=title)

        self.display_on_figure(workspace, ax, imshow_fn)