docstr: Create your settings by subclassing this function
  
  create_settings is called at the end of initialization.
docstr_tok: ["Create","your","settings","by","subclassing","this","function","create_settings","is","called","at","the","end","of","initialization","."]
code: def create_settings(self):
      """Create your settings by subclassing this function
  
      create_settings is called at the end of initialization.
      """
      self.grid_name = GridSubscriber(
          "Select the defined grid",
          "None",
          doc="""Select the name of a grid created by a previous **DefineGrid** module.""",
      )
  
      self.output_objects_name = LabelName(
          "Name the objects to be identified",
          "Wells",
          doc="""\
  Enter the name of the grid objects identified by this module. These objects
  will be available for further measurement and processing in subsequent modules.""",
      )
  
      self.shape_choice = Choice(
          "Select object shapes and locations",
          [
              SHAPE_RECTANGLE,
              SHAPE_CIRCLE_FORCED,
              SHAPE_CIRCLE_NATURAL,
              SHAPE_NATURAL,
          ],
          doc="""\
  Use this setting to choose the method to be used to determine the grid
  objects’ shapes and locations:
  
  -  *%(SHAPE_RECTANGLE)s:* Each object will be created as a rectangle,
     completely occupying the entire grid compartment (rectangle). This
     option creates the rectangular objects based solely on the grid’s
     specifications, not on any previously identified guiding objects.
  -  *%(SHAPE_CIRCLE_FORCED)s:* Each object will be created as a circle,
     centered in the middle of each grid compartment. This option places
     the circular objects’ locations based solely on the grid’s
     specifications, not on any previously identified guiding objects. The
     radius of all circles in a grid will be constant for the entire grid
     in each image cycle, and can be determined automatically for each
     image cycle based on the average radius of previously identified
     guiding objects for that image cycle, or instead it can be specified
     as a single radius for all circles in all grids in the entire
     analysis run.
  -  *%(SHAPE_CIRCLE_NATURAL)s:* Each object will be created as a
     circle, and each circle’s location within its grid compartment will
     be determined based on the location of any previously identified
     guiding objects within that grid compartment. Thus, if a guiding
     object lies within a particular grid compartment, that object’s
     center will be the center of the created circular object. If no
     guiding objects lie within a particular grid compartment, the
     circular object is placed within the center of that grid compartment.
     If more than one guiding object lies within the grid compartment,
     they will be combined and the centroid of this combined object will
     be the location of the created circular object. Note that guiding
     objects whose centers are close to the grid edge are ignored.
  -  *%(SHAPE_NATURAL)s:* Within each grid compartment, the object will
     be identified based on combining all of the parts of guiding objects,
     if any, that fall within the grid compartment. Note that guiding
     objects whose centers are close to the grid edge are ignored. If a
     guiding object does not exist within a grid compartment, an object
     consisting of one single pixel in the middle of the grid compartment
     will be created.
  """
          % globals(),
      )
  
      self.diameter_choice = Choice(
          "Specify the circle diameter automatically?",
          [AM_AUTOMATIC, AM_MANUAL],
          doc="""\
  *(Used only if "Circle" is selected as object shape)*
  
  There are two methods for selecting the circle diameter:
  
  -  *%(AM_AUTOMATIC)s:* Uses the average diameter of previously
     identified guiding objects as the diameter.
  -  *%(AM_MANUAL)s:* Lets you specify the diameter directly, as a
     number.
  """
          % globals(),
      )
  
      self.diameter = Integer(
          "Circle diameter",
          20,
          minval=2,
          doc="""\
  *(Used only if "Circle" is selected as object shape and diameter is
  specified manually)*
  
  Enter the diameter to be used for each grid circle, in pixels.
  {dist}
  """.format(
              dist=HELP_ON_MEASURING_DISTANCES
          ),
      )
  
      self.guiding_object_name = LabelSubscriber(
          "Select the guiding objects",
          "None",
          doc="""\
  *(Used only if "Circle" is selected as object shape and diameter is
  specified automatically, or if "Natural Location" is selected as the
  object shape)*
  
  Select the names of previously identified objects that will be used to
  guide the shape and/or location of the objects created by this module,
  depending on the method chosen.
  """,
      )
  
imports: from cellprofiler_core.constants.module import HELP_ON_MEASURING_DISTANCES
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import LabelSubscriber, GridSubscriber
  from cellprofiler_core.setting.text import LabelName, Integer
  from cellprofiler_core.utilities.core.module.identify import add_object_location_measurements, add_object_count_measurements, get_object_measurement_columns
  from cellprofiler.modules import _help
  import numpy
  from centrosome.cpmorphology import centers_of_labels
  from cellprofiler_core.utilities.grid import Grid
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects
label_desc: Use image node_id 1 for calling the IdentifyObjectsInGrid obj's underlying member method code with example usage: obj.create_settings() without return types