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 similarity at the transformations specified by
  sequences of parameter values.
  
  For instance:
  
  s, p = explore(T, (0, [-1,0,1]), (4, [-2.,2]))
  
  Parameters
  ----------
  T : object
    Transformation around which the similarity function is to be
    evaluated. It is modified in place unless it has a ``copy``
    method.
  args : tuple
    Each element of `args` is a sequence of two elements, where
    the first element specifies a transformation parameter axis
    and the second element gives the successive parameter values
    to evaluate along that axis.
  
  Returns
  -------
  s : ndarray
    Array of similarity values
  p : ndarray
    Corresponding array of evaluated transformation parameters
docstr_tok: ["Evaluate","the","similarity","at","the","transformations","specified","by","sequences","of","parameter","values",".","For","instance",":","s",",","p","=","explore","(","T",",","(","0",",","[","-1,0,1","]",")",",","(","4",",","[","-2.,2","]",")",")","Parameters","--","--","--","--","--","T",":","object","Transformation","around","which","the","similarity","function","is","to","be","evaluated",".","It","is","modified","in","place","unless","it","has","a","``","copy","``","method",".","args",":","tuple","Each","element","of","`","args","`","is","a","sequence","of","two","elements",",","where","the","first","element","specifies","a","transformation","parameter","axis","and","the","second","element","gives","the","successive","parameter","values","to","evaluate","along","that","axis",".","Returns","--","--","--","-","s",":","ndarray","Array","of","similarity","values","p",":","ndarray","Corresponding","array","of","evaluated","transformation","parameters"]
code: def explore(self, T, *args):
      """
      Evaluate the similarity at the transformations specified by
      sequences of parameter values.
  
      For instance:
  
      s, p = explore(T, (0, [-1,0,1]), (4, [-2.,2]))
  
      Parameters
      ----------
      T : object
        Transformation around which the similarity function is to be
        evaluated. It is modified in place unless it has a ``copy``
        method.
      args : tuple
        Each element of `args` is a sequence of two elements, where
        the first element specifies a transformation parameter axis
        and the second element gives the successive parameter values
        to evaluate along that axis.
  
      Returns
      -------
      s : ndarray
        Array of similarity values
      p : ndarray
        Corresponding array of evaluated transformation parameters
      """
      nparams = T.param.size
      if hasattr(T, "copy"):
          T = T.copy()
      deltas = [[0] for i in range(nparams)]
      for a in args:
          deltas[a[0]] = a[1]
      grids = np.mgrid[[slice(0, len(d)) for d in deltas]]
      ntrials = np.prod(grids.shape[1:])
      Deltas = [
          np.asarray(deltas[i])[grids[i, :]].ravel()
          for i in range(nparams)
      ]
      simis = np.zeros(ntrials)
      params = np.zeros([nparams, ntrials])
  
      Tv = ChainTransform(
          T, pre=self._from_affine, post=self._to_inv_affine
      )
      param0 = Tv.param
      for i in range(ntrials):
          param = param0 + np.array([D[i] for D in Deltas])
          Tv.param = param
          simis[i] = self._eval(Tv)
          params[:, i] = param
  
      return simis, params
  
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 14 for calling the HistogramRegistration obj's underlying member method code with example usage: obj.explore(T) and returns: simis,  params