docstr: Crop into a rectangle using user-specified coordinates
docstr_tok: ["Crop","into","a","rectangle","using","user-specified","coordinates"]
code: def get_rectangle_cropping(self, workspace, orig_image):
      """Crop into a rectangle using user-specified coordinates"""
      cropping = numpy.ones(orig_image.pixel_data.shape[:2], bool)
      if not self.horizontal_limits.unbounded_min:
          cropping[:, : self.horizontal_limits.min] = False
      if not self.horizontal_limits.unbounded_max:
          cropping[:, self.horizontal_limits.max :] = False
      if not self.vertical_limits.unbounded_min:
          cropping[: self.vertical_limits.min, :] = False
      if not self.vertical_limits.unbounded_max:
          cropping[self.vertical_limits.max :, :] = False
      return cropping
  
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 11 for calling the Crop obj's underlying member method code with example usage: obj.get_rectangle_cropping(workspace, orig_image) and returns: cropping