docstr: Reconstruct the intensity image from the zernike features
  
  radius - the radius of the minimum enclosing circle
  
  feature_dictionary - keys are (n, m) tuples and values are the
  magnitudes.
  
  returns a greyscale image based on the feature dictionary.
docstr_tok: ["Reconstruct","the","intensity","image","from","the","zernike","features","radius","-","the","radius","of","the","minimum","enclosing","circle","feature_dictionary","-","keys","are","(","n",",","m",")","tuples","and","values","are","the","magnitudes",".","returns","a","greyscale","image","based","on","the","feature","dictionary","."]
code: def get_image_from_features(radius, feature_dictionary):
      """Reconstruct the intensity image from the zernike features
  
      radius - the radius of the minimum enclosing circle
  
      feature_dictionary - keys are (n, m) tuples and values are the
      magnitudes.
  
      returns a greyscale image based on the feature dictionary.
      """
      i, j = (
          numpy.mgrid[
              -radius : (radius + 1), -radius : (radius + 1)
          ].astype(float)
          / radius
      )
      mask = (i * i + j * j) <= 1
  
      zernike_indexes = numpy.array(list(feature_dictionary.keys()))
      zernike_features = numpy.array(list(feature_dictionary.values()))
  
      z = centrosome.zernike.construct_zernike_polynomials(
          j, i, numpy.abs(zernike_indexes), mask=mask
      )
      zn = (
          (2 * zernike_indexes[:, 0] + 2)
          / ((zernike_indexes[:, 1] == 0) + 1)
          / numpy.pi
      )
      z *= zn[numpy.newaxis, numpy.newaxis, :]
      z = (
          z.real
          * (zernike_indexes[:, 1] >= 0)[
              numpy.newaxis, numpy.newaxis, :
          ]
          + z.imag
          * (zernike_indexes[:, 1] <= 0)[
              numpy.newaxis, numpy.newaxis, :
          ]
      )
  
      return numpy.sum(
          z * zernike_features[numpy.newaxis, numpy.newaxis, :], 2
      )
  
imports: import centrosome.cpmorphology
  import centrosome.zernike
  import numpy
  import scipy.ndimage
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting.subscriber import ImageSubscriber, LabelSubscriber
  from cellprofiler_core.setting.text import Integer
label_desc: Use image node_id 14 for calling the MeasurementTemplate obj's underlying member method code with example usage: obj.get_image_from_features(radius, feature_dictionary) and returns: numpy