parameters: (data: DataSet, points, image_list, output, undistorted)
docstring: Export reconstruction to PLY format
  
      Args:
          points: export points
          image_list: export only the shots included in this file (path to .txt file)
          output: output pmvs directory
          undistorted: export the undistorted reconstruction
docstring_summary: Export reconstruction to PLY format
docstring_tokens: Export reconstruction to PLY format
function: def run_dataset(data: DataSet, points, image_list, output, undistorted):
      """Export reconstruction to PLY format
  
      Args:
          points: export points
          image_list: export only the shots included in this file (path to .txt file)
          output: output pmvs directory
          undistorted: export the undistorted reconstruction
  
      """
  
      udata = data.undistorted_dataset()
  
      base_output_path = output if output else os.path.join(data.data_path, "pmvs")
      io.mkdir_p(base_output_path)
      logger.info(
          "Converting dataset [%s] to PMVS dir [%s]" % (data.data_path, base_output_path)
      )
  
      if undistorted:
          reconstructions = udata.load_undistorted_reconstruction()
      else:
          reconstructions = data.load_reconstruction()
  
      # load tracks for vis.dat
      try:
          if undistorted:
              tracks_manager = udata.load_undistorted_tracks_manager()
          else:
              tracks_manager = data.load_tracks_manager()
          image_graph = tracking.as_weighted_graph(tracks_manager)
      except IOError:
          image_graph = None
  
      export_only = None
      if image_list:
          export_only = {}
          with open(image_list, "r") as f:
              for image in f:
                  export_only[image.strip()] = True
  
      for h, reconstruction in enumerate(reconstructions):
          export(
              reconstruction,
              h,
              image_graph,
              # pyre-fixme[61]: `tracks_manager` may not be initialized here.
              tracks_manager,
              base_output_path,
              data,
              undistorted,
              udata,
              points,
              export_only,
          )
function_tokens: def run_dataset ( data : DataSet , points , image_list , output , undistorted ) : udata = data . undistorted_dataset ( ) base_output_path = output if output else os . path . join ( data . data_path , "pmvs" ) io . mkdir_p ( base_output_path ) logger . info ( "Converting dataset [%s] to PMVS dir [%s]" % ( data . data_path , base_output_path ) ) if undistorted : reconstructions = udata . load_undistorted_reconstruction ( ) else : reconstructions = data . load_reconstruction ( ) # load tracks for vis.dat try : if undistorted : tracks_manager = udata . load_undistorted_tracks_manager ( ) else : tracks_manager = data . load_tracks_manager ( ) image_graph = tracking . as_weighted_graph ( tracks_manager ) except IOError : image_graph = None export_only = None if image_list : export_only = { } with open ( image_list , "r" ) as f : for image in f : export_only [ image . strip ( ) ] = True for h , reconstruction in enumerate ( reconstructions ) : export ( reconstruction , h , image_graph , # pyre-fixme[61]: `tracks_manager` may not be initialized here. tracks_manager , base_output_path , data , undistorted , udata , points , export_only , )