docstr: An abstract class for the metric used for streamline registration.
  
  If the two sets of streamlines match exactly then method ``distance``
  of this object should be minimum.
  
  Parameters
  ----------
  num_threads : int, optional
      Number of threads to be used for OpenMP parallelization. If None
      (default) the value of OMP_NUM_THREADS environment variable is used
      if it is set, otherwise all available threads are used. If < 0 the
      maximal number of threads minus |num_threads + 1| is used (enter -1
      to use as many threads as possible). 0 raises an error. Only
      metrics using OpenMP will use this variable.
docstr_tok: ["An","abstract","class","for","the","metric","used","for","streamline","registration",".","If","the","two","sets","of","streamlines","match","exactly","then","method","``","distance","``","of","this","object","should","be","minimum",".","Parameters","--","--","--","--","--","num_threads",":","int",",","optional","Number","of","threads","to","be","used","for","OpenMP","parallelization",".","If","None","(","default",")","the","value","of","OMP_NUM_THREADS","environment","variable","is","used","if","it","is","set",",","otherwise","all","available","threads","are","used",".","If","<","0","the","maximal","number","of","threads","minus","|num_threads","+","1|","is","used","(","enter","-1","to","use","as","many","threads","as","possible",")",".","0","raises","an","error",".","Only","metrics","using","OpenMP","will","use","this","variable","."]
code: def __init__(self, num_threads=None):
      """An abstract class for the metric used for streamline registration.
  
      If the two sets of streamlines match exactly then method ``distance``
      of this object should be minimum.
  
      Parameters
      ----------
      num_threads : int, optional
          Number of threads to be used for OpenMP parallelization. If None
          (default) the value of OMP_NUM_THREADS environment variable is used
          if it is set, otherwise all available threads are used. If < 0 the
          maximal number of threads minus |num_threads + 1| is used (enter -1
          to use as many threads as possible). 0 raises an error. Only
          metrics using OpenMP will use this variable.
  
      """
      self.static = None
      self.moving = None
      self.num_threads = num_threads
  
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 to create a new StreamlineDistanceMetric object  with example: obj = StreamlineDistanceMetric(num_threads)