facebook360_dep
Facebook360 Depth Estimation Pipeline
Public Member Functions | Public Attributes | List of all members
calibration.Calibration Class Reference

Public Member Functions

def __init__ (self, parent)
 
def initialize_paths (self)
 
def switch_ui_elements_for_processing (self, state)
 
def on_process_finished (self, exitCode, exitStatus, p_id)
 
def setup_logs (self)
 
def set_default_top_level_paths (self, mkdirs=False)
 
def get_uncalibrated_jsons (self)
 
def get_frame_names (self)
 
def get_valid_color_paths (self)
 
def get_files (self, tag)
 
def update_buttons (self, gb)
 
def update_flags_from_data (self, flags)
 
def update_data_from_flags (self, flags)
 
def update_flagfile_edit (self, flagfile_fn, switch_to_flag_tab=True)
 
def refresh_data (self)
 
def setup_project (self, mkdirs=False)
 
def refresh (self)
 
def update_data_or_flags (self, flagfile_fn, flagfile_from_data, switch_to_flag_tab=False)
 
def update_flagfile (self, flagfile_fn)
 
def save_flag_file (self)
 
def retrieve_missing_flagfiles (self)
 
def add_default_flags (self)
 
def run_process (self)
 
def cancel_process (self)
 
def on_changed_flagfile_edit (self)
 
def get_logs (self)
 
def setup_flags (self)
 
def on_changed_dropdown (self, gb, dd)
 
def on_changed_preview (self)
 
def populate_dropdowns (self, gb)
 
def setup_data (self)
 
def disable_tab_if_no_data (self)
 

Public Attributes

 parent
 
 tag
 
 dlg
 
 log_reader
 

Detailed Description

Tab in UI responsible for running feature-less calibration.

Attributes:
    dlg (App(QDialog)): Main dialog box for the app initialized by QT.
    log_reader (LogReader(QtCore.QObject)): Object to interact with UI logging system.
    parent (App(QDialog)): Object corresponding to the parent UI element.
    tag (str): Semantic name for the tab.

Constructor & Destructor Documentation

◆ __init__()

def calibration.Calibration.__init__ (   self,
  parent 
)
Initializes the Calibration tab.

Args:
    parent (App(QDialog)): Object corresponding to the parent UI element.

Member Function Documentation

◆ add_default_flags()

def calibration.Calibration.add_default_flags (   self)
Retrieves the default flags to the local flagfile.

◆ cancel_process()

def calibration.Calibration.cancel_process (   self)
Stops a running process.

◆ disable_tab_if_no_data()

def calibration.Calibration.disable_tab_if_no_data (   self)
Prevents navigation to the tab if the required data is not present.

◆ get_files()

def calibration.Calibration.get_files (   self,
  tag 
)
Retrieves file names corresponding to the desired attribute.

Args:
    tag (str): Semantic name for the attribute.

Returns:
    list[str]: List of file names.

Raises:
    Exception: If a tag is requested with no associated files.

◆ get_frame_names()

def calibration.Calibration.get_frame_names (   self)
Gets frames in selected calibration directory.

Returns:
    list[str]: Sorted list of 6-digit zero-padded frame names
 in the directory.

Raises:
    Exception: If a directory other than background color or color
is requested.

◆ get_logs()

def calibration.Calibration.get_logs (   self)

◆ get_uncalibrated_jsons()

def calibration.Calibration.get_uncalibrated_jsons (   self)
Finds uncalibrated rigs in the project.

Returns:
    list[str]: List sorted by filename of uncalibrated rig files.

◆ get_valid_color_paths()

def calibration.Calibration.get_valid_color_paths (   self)
Gets the paths for valid color directories (either background
    or video or both).

Returns:
    list[str]: Paths to the directories with valid frames.

◆ initialize_paths()

def calibration.Calibration.initialize_paths (   self)
Initializes paths for scripts and flags.

◆ on_changed_dropdown()

def calibration.Calibration.on_changed_dropdown (   self,
  gb,
  dd 
)
Callback event handler for changed dropdown.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.
    dd (QtWidgets.QComboBox): Dropdown UI element.

◆ on_changed_flagfile_edit()

def calibration.Calibration.on_changed_flagfile_edit (   self)
Callback event handler for flagfile edits.

◆ on_changed_preview()

def calibration.Calibration.on_changed_preview (   self)
Callback event handler for changed image previews.

◆ on_process_finished()

def calibration.Calibration.on_process_finished (   self,
  exitCode,
  exitStatus,
  p_id 
)
Callback event handler for a process completing.

Args:
    exitCode (int): Return code from running the process.
    exitStatus (str): Description message of process exit.
    p_id (str): PID of completed process.

◆ populate_dropdowns()

def calibration.Calibration.populate_dropdowns (   self,
  gb 
)
Populates the dropdowns in the tab.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ refresh()

def calibration.Calibration.refresh (   self)
Resets the UI tab to its start state.

◆ refresh_data()

def calibration.Calibration.refresh_data (   self)
Updates UI elements to be in sync with data on disk.

◆ retrieve_missing_flagfiles()

def calibration.Calibration.retrieve_missing_flagfiles (   self)
Copies the missing flagfiles to project for local modification.

◆ run_process()

def calibration.Calibration.run_process (   self)
Runs the default binary associated with the tab.

◆ save_flag_file()

def calibration.Calibration.save_flag_file (   self)
Saves flagfile from the UI to disk.

◆ set_default_top_level_paths()

def calibration.Calibration.set_default_top_level_paths (   self,
  mkdirs = False 
)
Defines class referenceable attributes for paths. See common for full set
of definitions.

Args:
    mkdirs (bool, optional): Whether or not to make the defined directories.

◆ setup_data()

def calibration.Calibration.setup_data (   self)
Sets up callbacks and initial UI element statuses.

◆ setup_flags()

def calibration.Calibration.setup_flags (   self)
Sets up the flags according to the corresponding flagfile.

◆ setup_logs()

def calibration.Calibration.setup_logs (   self)
Sets up logging system for dialog on the current tab.

◆ setup_project()

def calibration.Calibration.setup_project (   self,
  mkdirs = False 
)
Retrieves any missing flagfiles and sets the default flags for the tab.

Args:
    mkdirs (bool, optional): Whether or not to make the directories where the
outputs are saved by default.

◆ switch_ui_elements_for_processing()

def calibration.Calibration.switch_ui_elements_for_processing (   self,
  state 
)
Switches element interaction when processing.

Args:
    state (bool): State to which elements should be changed to (i.e.
True for enabled, False for disabled)

◆ update_buttons()

def calibration.Calibration.update_buttons (   self,
  gb 
)
Enables buttons and dropdowns according to whether or not data is present.

Args:
    gb (QtWidgets.QGroupBox): Group box for the tab.

◆ update_data_from_flags()

def calibration.Calibration.update_data_from_flags (   self,
  flags 
)
Updates UI elements from the flags.

Args:
    flags (dict[str, _]): Flags corresponding to the tab default binary.

◆ update_data_or_flags()

def calibration.Calibration.update_data_or_flags (   self,
  flagfile_fn,
  flagfile_from_data,
  switch_to_flag_tab = False 
)
Updates the flagfile from the UI elements or vice versa.

Args:
    flagfile_fn (str): Name of the flagfile.
    flagfile_from_data (bool): Whether to load the flagfile from the data (True) or
vice versa (False).
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_flagfile()

def calibration.Calibration.update_flagfile (   self,
  flagfile_fn 
)
Updates the flagfile from UI elements.

Args:
    flagfile_fn (str): Name of the flagfile.

◆ update_flagfile_edit()

def calibration.Calibration.update_flagfile_edit (   self,
  flagfile_fn,
  switch_to_flag_tab = True 
)
Updates the edit box for the flagfile.

Args:
    flagfile_fn (str): Name of the flagfile.
    switch_to_flag_tab (bool, optional): Whether or not to switch tabs after updating.

◆ update_flags_from_data()

def calibration.Calibration.update_flags_from_data (   self,
  flags 
)
Updates flags from the UI elements.

Args:
    flags (dict[str, _]): Flags corresponding to the tab default binary.

Member Data Documentation

◆ dlg

calibration.Calibration.dlg

◆ log_reader

calibration.Calibration.log_reader

◆ parent

calibration.Calibration.parent

◆ tag

calibration.Calibration.tag

The documentation for this class was generated from the following file: