docstr: Prepares the metric to compute one displacement field iteration.
  
  This method will be called before any compute_forward or
  compute_backward call, this allows the Metric to pre-compute any useful
  information for speeding up the update computations. This
  initialization was needed in ANTS because the updates are called once
  per voxel. In Python this is unpractical, though.
docstr_tok: ["Prepares","the","metric","to","compute","one","displacement","field","iteration",".","This","method","will","be","called","before","any","compute_forward","or","compute_backward","call",",","this","allows","the","Metric","to","pre-compute","any","useful","information","for","speeding","up","the","update","computations",".","This","initialization","was","needed","in","ANTS","because","the","updates","are","called","once","per","voxel",".","In","Python","this","is","unpractical",",","though","."]
code: def initialize_iteration(self):
      r"""Prepares the metric to compute one displacement field iteration.
  
      This method will be called before any compute_forward or
      compute_backward call, this allows the Metric to pre-compute any useful
      information for speeding up the update computations. This
      initialization was needed in ANTS because the updates are called once
      per voxel. In Python this is unpractical, though.
      """
  
imports: import abc
  import numpy
  from numpy import gradient
  from scipy import ndimage
  from dipy.align import vector_fields
  from dipy.align import sumsqdiff
  from dipy.align import crosscorr
  from dipy.align import expectmax
  from dipy.align import floating
label_desc: Use image node_id 8 for calling the SimilarityMetric obj's underlying member method code with example usage: obj.initialize_iteration() without return types