docstr: Get a diamond-shaped structuring element
  
  angle - angle at which to tilt the diamond
  
  returns a binary array that can be used as a footprint for
  the erosion
docstr_tok: ["Get","a","diamond-shaped","structuring","element","angle","-","angle","at","which","to","tilt","the","diamond","returns","a","binary","array","that","can","be","used","as","a","footprint","for","the","erosion"]
code: def get_diamond(self, angle):
      """Get a diamond-shaped structuring element
  
      angle - angle at which to tilt the diamond
  
      returns a binary array that can be used as a footprint for
      the erosion
      """
      worm_width = self.worm_width.value
      worm_length = self.worm_length.value
      #
      # The shape:
      #
      #                   + x1,y1
      #
      # x0,y0 +                          + x2, y2
      #
      #                   + x3,y3
      #
      x0 = int(numpy.sin(angle) * worm_length / 2)
      x1 = int(numpy.cos(angle) * worm_width / 2)
      x2 = -x0
      x3 = -x1
      y2 = int(numpy.cos(angle) * worm_length / 2)
      y1 = int(numpy.sin(angle) * worm_width / 2)
      y0 = -y2
      y3 = -y1
      xmax = numpy.max(numpy.abs([x0, x1, x2, x3]))
      ymax = numpy.max(numpy.abs([y0, y1, y2, y3]))
      strel = numpy.zeros((ymax * 2 + 1, xmax * 2 + 1), bool)
      index, count, i, j = get_line_pts(
          numpy.array([y0, y1, y2, y3]) + ymax,
          numpy.array([x0, x1, x2, x3]) + xmax,
          numpy.array([y1, y2, y3, y0]) + ymax,
          numpy.array([x1, x2, x3, x0]) + xmax,
      )
      strel[i, j] = True
      strel = binary_fill_holes(strel)
      return strel
  
imports: import matplotlib.cm
  import numpy
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER, M_LOCATION_CENTER_X, M_LOCATION_CENTER_Y, M_NUMBER_OBJECT_NUMBER, FF_COUNT, COLTYPE_FLOAT, IMAGE, C_COUNT, C_LOCATION, C_NUMBER, FTR_CENTER_X, FTR_CENTER_Y, FTR_OBJECT_NUMBER
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.module import Module
  from cellprofiler_core.object import Objects, ObjectSet
  from cellprofiler_core.preferences import get_default_colormap
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.text import LabelName, Integer, Float
  from centrosome.cpmorphology import all_connected_components
  from centrosome.cpmorphology import fixup_scipy_ndimage_result
  from centrosome.cpmorphology import get_line_pts
  from scipy.ndimage import binary_erosion, binary_fill_holes
  from scipy.ndimage import mean
label_desc: Use image node_id 6 for calling the IdentifyDeadWorms obj's underlying member method code with example usage: obj.get_diamond(angle) and returns: strel