docstr: Get Tracking Direction Getter object.
  
  Parameters
  ----------
  strategy_name : str
      String representing direction getter name.
  pam : instance of PeaksAndMetrics
      An object with ``gfa``, ``peak_directions``, ``peak_values``,
      ``peak_indices``, ``odf``, ``shm_coeffs`` as attributes.
  pmf_threshold : float
      Threshold for ODF functions.
  max_angle : float
      Maximum angle between streamline segments.
  
  Returns
  -------
  direction_getter : instance of DirectionGetter
      Used to get directions for fiber tracking.
docstr_tok: ["Get","Tracking","Direction","Getter","object",".","Parameters","--","--","--","--","--","strategy_name",":","str","String","representing","direction","getter","name",".","pam",":","instance","of","PeaksAndMetrics","An","object","with","``","gfa","``",",","``","peak_directions","``",",","``","peak_values","``",",","``","peak_indices","``",",","``","odf","``",",","``","shm_coeffs","``","as","attributes",".","pmf_threshold",":","float","Threshold","for","ODF","functions",".","max_angle",":","float","Maximum","angle","between","streamline","segments",".","Returns","--","--","--","-","direction_getter",":","instance","of","DirectionGetter","Used","to","get","directions","for","fiber","tracking","."]
code: def _get_direction_getter(
      self, strategy_name, pam, pmf_threshold, max_angle
  ):
      """Get Tracking Direction Getter object.
  
      Parameters
      ----------
      strategy_name : str
          String representing direction getter name.
      pam : instance of PeaksAndMetrics
          An object with ``gfa``, ``peak_directions``, ``peak_values``,
          ``peak_indices``, ``odf``, ``shm_coeffs`` as attributes.
      pmf_threshold : float
          Threshold for ODF functions.
      max_angle : float
          Maximum angle between streamline segments.
  
      Returns
      -------
      direction_getter : instance of DirectionGetter
          Used to get directions for fiber tracking.
  
      """
      dg, msg = None, ""
      if strategy_name.lower() in ["deterministic", "det"]:
          msg = "Deterministic"
          dg = DeterministicMaximumDirectionGetter.from_shcoeff(
              pam.shm_coeff,
              sphere=pam.sphere,
              max_angle=max_angle,
              pmf_threshold=pmf_threshold,
          )
      elif strategy_name.lower() in ["probabilistic", "prob"]:
          msg = "Probabilistic"
          dg = ProbabilisticDirectionGetter.from_shcoeff(
              pam.shm_coeff,
              sphere=pam.sphere,
              max_angle=max_angle,
              pmf_threshold=pmf_threshold,
          )
      elif strategy_name.lower() in ["closestpeaks", "cp"]:
          msg = "ClosestPeaks"
          dg = ClosestPeakDirectionGetter.from_shcoeff(
              pam.shm_coeff,
              sphere=pam.sphere,
              max_angle=max_angle,
              pmf_threshold=pmf_threshold,
          )
      elif strategy_name.lower() in [
          "eudx",
      ]:
          msg = "Eudx"
          dg = pam
      else:
          msg = "No direction getter defined. Eudx"
          dg = pam
  
      logging.info("{0} direction getter strategy selected".format(msg))
      return dg
  
file_path: dipy/dipy/workflows/tracking.py
imports: import logging
  from dipy.direction import DeterministicMaximumDirectionGetter, ProbabilisticDirectionGetter, ClosestPeakDirectionGetter
  from dipy.io.image import load_nifti
  from dipy.io.peaks import load_peaks
  from dipy.io.stateful_tractogram import Space, StatefulTractogram
  from dipy.io.streamline import save_tractogram
  from dipy.tracking import utils
  from dipy.tracking.local_tracking import LocalTracking, ParticleFilteringTracking
  from dipy.tracking.stopping_criterion import BinaryStoppingCriterion, CmcStoppingCriterion, ThresholdStoppingCriterion
  from dipy.workflows.workflow import Workflow
label_desc: Use image node_id 2 for calling the LocalFiberTrackingPAMFlow obj's underlying member method code with example usage: obj._get_direction_getter(strategy_name, pam, pmf_threshold, max_angle) and returns: dg