class_docstr: A class to represent a generic intensity-based image registration
  algorithm.
class_docstr_tok: ["A","class","to","represent","a","generic","intensity-based","image","registration","algorithm","."]
docstr: Evaluate the Hessian of the similarity function wrt
  transformation parameters.
  
  The Hessian or its diagonal is approximated at the
  transformation specified by `T` using central finite
  differences. The input transformation object `T` is modified
  in place unless it has a ``copy`` method.
  
  Parameters
  ----------
  T : Transform
      Transform object implementing ``apply`` method
  epsilon : float
      Step size for finite differences in units of the
      transformation parameters
  diag : bool
      If True, approximate the Hessian by a diagonal matrix.
  
  Returns
  -------
  H : ndarray
      Similarity Hessian matrix estimate
docstr_tok: ["Evaluate","the","Hessian","of","the","similarity","function","wrt","transformation","parameters",".","The","Hessian","or","its","diagonal","is","approximated","at","the","transformation","specified","by","`","T","`","using","central","finite","differences",".","The","input","transformation","object","`","T","`","is","modified","in","place","unless","it","has","a","``","copy","``","method",".","Parameters","--","--","--","--","--","T",":","Transform","Transform","object","implementing","``","apply","``","method","epsilon",":","float","Step","size","for","finite","differences","in","units","of","the","transformation","parameters","diag",":","bool","If","True",",","approximate","the","Hessian","by","a","diagonal","matrix",".","Returns","--","--","--","-","H",":","ndarray","Similarity","Hessian","matrix","estimate"]
code: def eval_hessian(self, T, epsilon=1e-1, diag=False):
      """
      Evaluate the Hessian of the similarity function wrt
      transformation parameters.
  
      The Hessian or its diagonal is approximated at the
      transformation specified by `T` using central finite
      differences. The input transformation object `T` is modified
      in place unless it has a ``copy`` method.
  
      Parameters
      ----------
      T : Transform
          Transform object implementing ``apply`` method
      epsilon : float
          Step size for finite differences in units of the
          transformation parameters
      diag : bool
          If True, approximate the Hessian by a diagonal matrix.
  
      Returns
      -------
      H : ndarray
          Similarity Hessian matrix estimate
      """
      param0 = T.param.copy()
      if hasattr(T, "copy"):
          T = T.copy()
  
      def simi(param):
          T.param = param
          return self.eval(T)
  
      if diag:
          return np.diag(approx_hessian_diag(simi, param0, epsilon))
      else:
          return approx_hessian(simi, param0, epsilon)
  
imports: import numpy
  import scipy.ndimage
  from ...core.image.image_spaces import as_xyz_image, make_xyz_image, xyz_affine
  from ._registration import _joint_histogram
  from .affine import affine_transforms, inverse_affine, subgrid_affine
  from .chain_transform import ChainTransform
  from .optimizer import configure_optimizer
  from .similarity_measures import similarity_measures
label_desc: Use image node_id 11 for calling the HistogramRegistration obj's underlying member method code with example usage: obj.eval_hessian(T, epsilon, diag) and returns: self, np, approx_hessian