class_docstr: Bundle-based Minimum Distance aka BMD
  
  This is the cost function used by the StreamlineLinearRegistration.
  
  Methods
  -------
  setup(static, moving)
  distance(xopt)
  
  References
  ----------
  .. [Garyfallidis14] Garyfallidis et al., "Direct native-space fiber
                      bundle alignment for group comparisons", ISMRM,
                      2014.
class_docstr_tok: ["Bundle-based","Minimum","Distance","aka","BMD","This","is","the","cost","function","used","by","the","StreamlineLinearRegistration",".","Methods","--","--","--","-","setup","(","static",",","moving",")","distance","(","xopt",")","References","--","--","--","--","--","..","[","Garyfallidis14","]","Garyfallidis","et","al.",",","``","Direct","native-space","fiber","bundle","alignment","for","group","comparisons","''",",","ISMRM",",","2014","."]
docstr: Setup static and moving sets of streamlines.
  
  Parameters
  ----------
  static : streamlines
      Fixed or reference set of streamlines.
  moving : streamlines
      Moving streamlines.
  
  Notes
  -----
  Call this after the object is initiated and before distance.
docstr_tok: ["Setup","static","and","moving","sets","of","streamlines",".","Parameters","--","--","--","--","--","static",":","streamlines","Fixed","or","reference","set","of","streamlines",".","moving",":","streamlines","Moving","streamlines",".","Notes","--","--","-","Call","this","after","the","object","is","initiated","and","before","distance","."]
code: def setup(self, static, moving):
      """Setup static and moving sets of streamlines.
  
      Parameters
      ----------
      static : streamlines
          Fixed or reference set of streamlines.
      moving : streamlines
          Moving streamlines.
  
      Notes
      -----
      Call this after the object is initiated and before distance.
      """
  
      self._set_static(static)
      self._set_moving(moving)
  
imports: import logging
  import abc
  from itertools import combinations
  import numpy
  from dipy.core.optimize import Optimizer
  from dipy.align.bundlemin import _bundle_minimum_distance, _bundle_minimum_distance_asymmetric, distance_matrix_mdf
  from dipy.tracking.streamline import transform_streamlines, unlist_streamlines, center_streamlines, set_number_of_points, select_random_set_of_streamlines, length, Streamlines
  from dipy.segment.clustering import qbx_and_merge
  from dipy.core.geometry import compose_transformations, compose_matrix, decompose_matrix
  from time import time
label_desc: Use image node_id 1 for calling the BundleMinDistanceMetric obj's underlying member method code with example usage: obj.setup(static, moving) without return types