class_docstr: A setting that displays a filesystem path name
      
class_docstr_tok: ["A","setting","that","displays","a","filesystem","path","name"]
docstr: Return the absolute path specified by the setting
  
  Concoct an absolute path based on the directory choice,
  the custom path and metadata taken from the measurements.
docstr_tok: ["Return","the","absolute","path","specified","by","the","setting","Concoct","an","absolute","path","based","on","the","directory","choice",",","the","custom","path","and","metadata","taken","from","the","measurements","."]
code: def get_absolute_path(self, measurements=None, image_set_number=None):
      """Return the absolute path specified by the setting
  
      Concoct an absolute path based on the directory choice,
      the custom path and metadata taken from the measurements.
      """
      if self.dir_choice == DEFAULT_INPUT_FOLDER_NAME:
          return get_default_image_directory()
      if self.dir_choice == DEFAULT_OUTPUT_FOLDER_NAME:
          return get_default_output_directory()
      if self.dir_choice == DEFAULT_INPUT_SUBFOLDER_NAME:
          root_directory = get_default_image_directory()
      elif self.dir_choice == DEFAULT_OUTPUT_SUBFOLDER_NAME:
          root_directory = get_default_output_directory()
      elif self.dir_choice == ABSOLUTE_FOLDER_NAME:
          root_directory = os.curdir
      elif self.dir_choice == URL_FOLDER_NAME:
          root_directory = ""
      elif self.dir_choice == NO_FOLDER_NAME:
          return ""
      else:
          raise ValueError(
              "Unknown directory choice: %s" % self.dir_choice
          )
      if self.allow_metadata:
          if measurements is not None:
              custom_path = measurements.apply_metadata(
                  self.custom_path, image_set_number
              )
          else:
              # For UI, get the path up to the metadata.
              custom_path = self.custom_path
              md_start = custom_path.find("\\g<")
              if md_start != -1:
                  custom_path = custom_path[:md_start].replace(
                      "\\\\", "\\"
                  )
                  custom_path = os.path.split(custom_path)[0]
              else:
                  custom_path = custom_path.replace("\\\\", "\\")
      else:
          custom_path = self.custom_path
      if self.dir_choice == URL_FOLDER_NAME:
          return custom_path
      path = os.path.join(root_directory, custom_path)
      return os.path.abspath(path)
  
imports: import os
  import sys
  from ._text import Text
  from .._validation_error import ValidationError
  from ...preferences import ABSOLUTE_FOLDER_NAME
  from ...preferences import DEFAULT_INPUT_FOLDER_NAME
  from ...preferences import DEFAULT_INPUT_SUBFOLDER_NAME
  from ...preferences import DEFAULT_OUTPUT_FOLDER_NAME
  from ...preferences import DEFAULT_OUTPUT_SUBFOLDER_NAME
  from ...preferences import NO_FOLDER_NAME
  from ...preferences import URL_FOLDER_NAME
  from ...preferences import get_default_image_directory
  from ...preferences import get_default_output_directory
  from ...preferences import standardize_default_folder_names
label_desc: Use image node_id 14 for calling the Directory obj's underlying member method code with example usage: obj.get_absolute_path(measurements, image_set_number) and returns: os, get_default_image_directory, get_default_output_directory, custom_path, str