docstr: Crop into a rectangle or ellipse, guided by UI
docstr_tok: ["Crop","into","a","rectangle","or","ellipse",",","guided","by","UI"]
code: def ui_crop(self, workspace, orig_image):
      """Crop into a rectangle or ellipse, guided by UI"""
      d = self.get_dictionary(workspace.image_set_list)
      if (
          self.shape.value not in d
      ) or self.individual_or_once == IO_INDIVIDUALLY:
          d[self.shape.value] = workspace.interaction_request(
              self, d.get(self.shape.value, None), orig_image.pixel_data
          )
      if self.shape == SH_ELLIPSE:
          return self.apply_ellipse_cropping(workspace, orig_image)
      else:
          return self.apply_rectangle_cropping(workspace, orig_image)
  
imports: import logging
  import math
  import centrosome.filter
  import matplotlib.axes
  import matplotlib.cm
  import matplotlib.figure
  import matplotlib.patches
  import numpy
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import get_primary_outline_color
  from cellprofiler_core.setting import Coordinates
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.range import IntegerOrUnboundedRange
  from cellprofiler_core.setting.subscriber import CropImageSubscriber
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import CropImageName
  from cellprofiler_core.setting.text import Integer
  from cellprofiler_core.utilities.image import crop_image
label_desc: Use image node_id 7 for calling the Crop obj's underlying member method code with example usage: obj.ui_crop(workspace, orig_image) and returns: self, self