code: def enhance_neurites(self, image, radius, method):
      data = self.__mask(image.pixel_data, image.mask)
  
      if method == N_GRADIENT:
          # desired effect = img + white_tophat - black_tophat
          footprint = self.__structuring_element(
              radius, image.volumetric
          )
  
          white = skimage.morphology.white_tophat(
              data, footprint=footprint
          )
  
          black = skimage.morphology.black_tophat(
              data, footprint=footprint
          )
  
          result = data + white - black
  
          result[result > 1] = 1
  
          result[result < 0] = 0
      else:
          sigma = self.smoothing.value
  
          smoothed = scipy.ndimage.gaussian_filter(
              data, numpy.divide(sigma, image.spacing)
          )
  
          if image.volumetric:
              result = numpy.zeros_like(smoothed)
  
              for index, plane in enumerate(smoothed):
                  hessian = centrosome.filter.hessian(
                      plane,
                      return_hessian=False,
                      return_eigenvectors=False,
                  )
  
                  result[index] = (
                      -hessian[:, :, 0]
                      * (hessian[:, :, 0] < 0)
                      * (sigma**2)
                  )
          else:
              hessian = centrosome.filter.hessian(
                  smoothed,
                  return_hessian=False,
                  return_eigenvectors=False,
              )
  
              #
              # The positive values are darker pixels with lighter
              # neighbors. The original ImageJ code scales the result
              # by sigma squared - I have a feeling this might be
              # a first-order correction for e**(-2*sigma), possibly
              # because the hessian is taken from one pixel away
              # and the gradient is less as sigma gets larger.
              result = (
                  -hessian[:, :, 0]
                  * (hessian[:, :, 0] < 0)
                  * (sigma**2)
              )
  
      return self.__unmask(result, image.pixel_data, image.mask)
  
imports: import centrosome.filter
  import numpy
  import scipy.ndimage
  import skimage.exposure
  import skimage.filters
  import skimage.morphology
  import skimage.transform
  from cellprofiler_core.image import Image
  from cellprofiler_core.module import ImageProcessing
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.range import IntegerRange
  from cellprofiler_core.setting.text import Float
  from cellprofiler_core.setting.text import Integer
  from cellprofiler.modules import _help
label_desc: Use image node_id 9 for calling the EnhanceOrSuppressFeatures obj's underlying member method code with example usage: obj.enhance_neurites(image, radius, method) and returns: self